FA-11081 / Media playlist state / Open access
History back consumes last entry · case 01
Returning the newest history item without removing it traps repeated back operations.
ROOT CAUSE
Returning the newest history item without removing it traps repeated back operations.
VERIFIED REPAIR
Preserve the media contract: History is oldest-to-newest played entry IDs. Back consumes the newest history item as current; empty history retains current.
Unsuccessful approach: Queue-style removal chooses the oldest history instead of the most recent.
Case contract
History is oldest-to-newest played entry IDs. Back consumes the newest history item as current; empty history retains current.
Why this case matters
A deterministic local media controller stage; metadata and downloaded data are supplied explicitly. No external player, service or codec is required.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(history, current):
return [list(history),history[-1]] if history else [[],current]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b'], 'c')),[['a'], 'b'])
check('fixture 2',solve(*(['a'], 'b')),[[], 'a'])
check('fixture 3',solve(*([], 'a')),[[], 'a'])
check('fixture 4',solve(*(['a', 'b', 'c'], 'd')),[['a', 'b'], 'c'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [['a', 'b'], 'b'] | [['a'], 'b'] | Failed |
| fixture 2 | [['a'], 'a'] | [[], 'a'] | Failed |
| fixture 3 | [[], 'a'] | [[], 'a'] | Passed |
| fixture 4 | [['a', 'b', 'c'], 'c'] | [['a', 'b'], 'c'] | Failed |
SHA-256 / 73f6c8d926ec2c70bf835ccebb6ae12f312835709cc8613fa47efe2118bc1299
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(history, current):
return [history[1:],history[0]] if history else [[],current]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b'], 'c')),[['a'], 'b'])
check('fixture 2',solve(*(['a'], 'b')),[[], 'a'])
check('fixture 3',solve(*([], 'a')),[[], 'a'])
check('fixture 4',solve(*(['a', 'b', 'c'], 'd')),[['a', 'b'], 'c'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [['b'], 'a'] | [['a'], 'b'] | Failed |
| fixture 2 | [[], 'a'] | [[], 'a'] | Passed |
| fixture 3 | [[], 'a'] | [[], 'a'] | Passed |
| fixture 4 | [['b', 'c'], 'a'] | [['a', 'b'], 'c'] | Failed |
SHA-256 / 70febb9547d0a223c619de343c0821c029eef5c362f30a7c06279e93ea855b5c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(history, current):
return [history[:-1],history[-1]] if history else [[],current]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b'], 'c')),[['a'], 'b'])
check('fixture 2',solve(*(['a'], 'b')),[[], 'a'])
check('fixture 3',solve(*([], 'a')),[[], 'a'])
check('fixture 4',solve(*(['a', 'b', 'c'], 'd')),[['a', 'b'], 'c'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [['a'], 'b'] | [['a'], 'b'] | Passed |
| fixture 2 | [[], 'a'] | [[], 'a'] | Passed |
| fixture 3 | [[], 'a'] | [[], 'a'] | Passed |
| fixture 4 | [['a', 'b'], 'c'] | [['a', 'b'], 'c'] | Passed |
SHA-256 / 98e0fa6d7a2768decee62ceec8b7cf638cc0cb8bc4710d325f0f9fd765ffc08e
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:44.829426+00:00.
Case digest / 81d35cb640bf92121d5ce836b347aa6657eda0088d100c5e3560f26867871d27