FA-11066 / Media playlist state / Open access
Repeat policy next entry · case 01
Unconditional wrap ignores stop and repeat-one policies.
ROOT CAUSE
Unconditional wrap ignores stop and repeat-one policies.
VERIFIED REPAIR
Preserve the media contract: On natural completion of a valid current entry in a nonempty playlist, repeat-one stays current, repeat-all wraps, and off stops at the end.
Unsuccessful approach: Honoring repeat-one while omitting repeat-all stops a looping playlist.
Case contract
On natural completion of a valid current entry in a nonempty playlist, repeat-one stays current, repeat-all wraps, and off stops at the end.
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(current, length, repeat):
return (current+1)%length
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(1, 3, 'one')),1)
check('fixture 2',solve(*(2, 3, 'all')),0)
check('fixture 3',solve(*(2, 3, 'off')),None)
check('fixture 4',solve(*(0, 3, 'off')),1)
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 | 2 | 1 | Failed |
| fixture 2 | 0 | 0 | Passed |
| fixture 3 | 0 | None | Failed |
| fixture 4 | 1 | 1 | Passed |
SHA-256 / 9f94c9c9c3b63e20e9161ffcd047aa38cb44b7de5e39c5cba2766850886473b0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(current, length, repeat):
return current if repeat=="one" else (current+1 if current+1<length else None)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(1, 3, 'one')),1)
check('fixture 2',solve(*(2, 3, 'all')),0)
check('fixture 3',solve(*(2, 3, 'off')),None)
check('fixture 4',solve(*(0, 3, 'off')),1)
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 | 1 | 1 | Passed |
| fixture 2 | None | 0 | Failed |
| fixture 3 | None | None | Passed |
| fixture 4 | 1 | 1 | Passed |
SHA-256 / 9a6d164ed407b4ed400adb5d85b77429154284c76bda15be46d66ceb2ab60a64
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(current, length, repeat):
return current if repeat=="one" else (current+1 if current+1<length else (0 if repeat=="all" else None))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(1, 3, 'one')),1)
check('fixture 2',solve(*(2, 3, 'all')),0)
check('fixture 3',solve(*(2, 3, 'off')),None)
check('fixture 4',solve(*(0, 3, 'off')),1)
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 | 1 | 1 | Passed |
| fixture 2 | 0 | 0 | Passed |
| fixture 3 | None | None | Passed |
| fixture 4 | 1 | 1 | Passed |
SHA-256 / 517cbb45e2eee24354697678afe63eb3ac0b3e79956ca2d7fdd5a176c44bba57
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.714356+00:00.
Case digest / df53f9d0d6705ff5ccdfd9d87dc65751ddc088f3ea53f9a72616cc469e7a0586