FA-11281 / Media playlist lifecycle / Open access
Playlist natural advance: Repeats a current track that has been disabled · case 01
Repeats a current track that has been disabled and produces an incorrect media-control or presentation result.
ROOT CAUSE
Repeats a current track that has been disabled. The fixture suite isolates this decision from network delivery and codec details.
VERIFIED REPAIR
On natural completion, choose the next enabled track in playlist order. repeat=one retains the current track only if it remains enabled; repeat=all wraps once; repeat=none does not wrap. Unknown current starts before the first item. Track IDs are unique strings; disabled is a list of IDs.
Unsuccessful approach: The alternative still fails because it wraps at playlist end even with repeat disabled.
Case contract
On natural completion, choose the next enabled track in playlist order. repeat=one retains the current track only if it remains enabled; repeat=all wraps once; repeat=none does not wrap. Unknown current starts before the first item. Track IDs are unique strings; disabled is a list of IDs.
Why this case matters
A deterministic in-memory media application model with explicit playlist, timeline or synchronization semantics. Does not implement codecs, transport protocols, rendering hardware or concurrent playback.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tracks, current, repeat, disabled):
if not tracks: return None
if repeat=='one' and current in tracks: return current
start=tracks.index(current) if current in tracks else -1
order=list(range(start+1,len(tracks))) + (list(range(0,start+1)) if repeat=='all' else [])
for index in order:
candidate=tracks[index]
if candidate not in disabled: return candidate
return None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordinary successor', solve(['a', 'b', 'c'], 'a', 'none', []), 'b')
check('end without repeat', solve(['a', 'b'], 'b', 'none', []), None)
check('repeat all wraps', solve(['a', 'b'], 'b', 'all', []), 'a')
check('repeat one eligible', solve(['a', 'b'], 'a', 'one', []), 'a')
check('repeat one disabled skips', solve(['a', 'b'], 'a', 'one', ['a']), 'b')
check('skip disabled successor', solve(['a', 'b', 'c'], 'a', 'none', ['b']), 'c')
check('all disabled terminates', solve(['a', 'b'], 'b', 'all', ['a', 'b']), None)
check('missing current starts playlist', solve(['a', 'b'], 'gone', 'none', []), 'a')
check('empty playlist', solve([], 'a', 'all', []), None)
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 |
|---|---|---|---|
| ordinary successor | b | b | Passed |
| end without repeat | None | None | Passed |
| repeat all wraps | a | a | Passed |
| repeat one eligible | a | a | Passed |
| repeat one disabled skips | a | b | Failed |
| skip disabled successor | c | c | Passed |
| all disabled terminates | None | None | Passed |
| missing current starts playlist | a | a | Passed |
| empty playlist | None | None | Passed |
SHA-256 / c319ec0363aa3b64bb7178b2e22f05c929effc1b7989431f0839b63d92093c27
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tracks, current, repeat, disabled):
if not tracks: return None
if repeat=='one' and current in tracks and current not in disabled: return current
start=tracks.index(current) if current in tracks else -1
order=list(range(start+1,len(tracks)))+list(range(0,start+1))
for index in order:
candidate=tracks[index]
if candidate not in disabled: return candidate
return None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordinary successor', solve(['a', 'b', 'c'], 'a', 'none', []), 'b')
check('end without repeat', solve(['a', 'b'], 'b', 'none', []), None)
check('repeat all wraps', solve(['a', 'b'], 'b', 'all', []), 'a')
check('repeat one eligible', solve(['a', 'b'], 'a', 'one', []), 'a')
check('repeat one disabled skips', solve(['a', 'b'], 'a', 'one', ['a']), 'b')
check('skip disabled successor', solve(['a', 'b', 'c'], 'a', 'none', ['b']), 'c')
check('all disabled terminates', solve(['a', 'b'], 'b', 'all', ['a', 'b']), None)
check('missing current starts playlist', solve(['a', 'b'], 'gone', 'none', []), 'a')
check('empty playlist', solve([], 'a', 'all', []), None)
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 |
|---|---|---|---|
| ordinary successor | b | b | Passed |
| end without repeat | a | None | Failed |
| repeat all wraps | a | a | Passed |
| repeat one eligible | a | a | Passed |
| repeat one disabled skips | b | b | Passed |
| skip disabled successor | c | c | Passed |
| all disabled terminates | None | None | Passed |
| missing current starts playlist | a | a | Passed |
| empty playlist | None | None | Passed |
SHA-256 / 657e0fa3c172c9d8ed402ee5fe1cdd333a7a73ff935e885a38cc5917a33ff4fe
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tracks, current, repeat, disabled):
if not tracks: return None
if repeat=='one' and current in tracks and current not in disabled: return current
start=tracks.index(current) if current in tracks else -1
order=list(range(start+1,len(tracks))) + (list(range(0,start+1)) if repeat=='all' else [])
for index in order:
candidate=tracks[index]
if candidate not in disabled: return candidate
return None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordinary successor', solve(['a', 'b', 'c'], 'a', 'none', []), 'b')
check('end without repeat', solve(['a', 'b'], 'b', 'none', []), None)
check('repeat all wraps', solve(['a', 'b'], 'b', 'all', []), 'a')
check('repeat one eligible', solve(['a', 'b'], 'a', 'one', []), 'a')
check('repeat one disabled skips', solve(['a', 'b'], 'a', 'one', ['a']), 'b')
check('skip disabled successor', solve(['a', 'b', 'c'], 'a', 'none', ['b']), 'c')
check('all disabled terminates', solve(['a', 'b'], 'b', 'all', ['a', 'b']), None)
check('missing current starts playlist', solve(['a', 'b'], 'gone', 'none', []), 'a')
check('empty playlist', solve([], 'a', 'all', []), None)
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 |
|---|---|---|---|
| ordinary successor | b | b | Passed |
| end without repeat | None | None | Passed |
| repeat all wraps | a | a | Passed |
| repeat one eligible | a | a | Passed |
| repeat one disabled skips | b | b | Passed |
| skip disabled successor | c | c | Passed |
| all disabled terminates | None | None | Passed |
| missing current starts playlist | a | a | Passed |
| empty playlist | None | None | Passed |
SHA-256 / 687f0b46b4bdcc8eba2ccb9d605f785982929cf79efb89bb1727d9501fc2177d
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:46.581779+00:00.
Case digest / 30771f4a6ba5aad809099ec6866b83ee4641571bdde22f31e6f5d46dd2623338