FA-11296 / Media playlist lifecycle / Open access
Play next queue: Removes all equal queued requests after playing one occurrence · case 01
Removes all equal queued requests after playing one occurrence and produces an incorrect media-control or presentation result.
ROOT CAUSE
Removes all equal queued requests after playing one occurrence. The fixture suite isolates this decision from network delivery and codec details.
VERIFIED REPAIR
Consume the first enabled play-next queue occurrence before advancing the playlist. Queue plays do not move the playlist cursor; disabled queued occurrences are discarded. Return [selected ID or None,remaining queue,new playlist cursor]. Queue duplicates are independent requests.
Unsuccessful approach: The alternative still fails because it moves the playlist cursor to a queued override.
Case contract
Consume the first enabled play-next queue occurrence before advancing the playlist. Queue plays do not move the playlist cursor; disabled queued occurrences are discarded. Return [selected ID or None,remaining queue,new playlist cursor]. Queue duplicates are independent requests.
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(playlist, cursor, queue, disabled):
pending=list(queue)
while pending:
candidate=pending.pop(0)
if candidate in disabled: continue
return [candidate,[v for v in pending if v!=candidate],cursor]
start=playlist.index(cursor) if cursor in playlist else -1
for candidate in playlist[start+1:]:
if candidate not in disabled:
return [candidate,pending,candidate]
return [None,pending,cursor]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('queue has priority', solve(['a', 'b'], 'a', ['x', 'y'], []), ['x', ['y'], 'a'])
check('same track queued twice', solve(['a', 'b'], 'a', ['x', 'x', 'y'], []), ['x', ['x', 'y'], 'a'])
check('disabled queue discarded', solve(['a', 'b'], 'a', ['x', 'y'], ['x']), ['y', [], 'a'])
check('fallback advances cursor', solve(['a', 'b'], 'a', [], []), ['b', [], 'b'])
check('all queued disabled falls back', solve(['a', 'b'], 'a', ['x'], ['x']), ['b', [], 'b'])
check('end has no track', solve(['a'], 'a', [], []), [None, [], 'a'])
check('queue works without playlist', solve([], None, ['x'], []), ['x', [], 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 |
|---|---|---|---|
| queue has priority | ['x', ['y'], 'a'] | ['x', ['y'], 'a'] | Passed |
| same track queued twice | ['x', ['y'], 'a'] | ['x', ['x', 'y'], 'a'] | Failed |
| disabled queue discarded | ['y', [], 'a'] | ['y', [], 'a'] | Passed |
| fallback advances cursor | ['b', [], 'b'] | ['b', [], 'b'] | Passed |
| all queued disabled falls back | ['b', [], 'b'] | ['b', [], 'b'] | Passed |
| end has no track | [None, [], 'a'] | [None, [], 'a'] | Passed |
| queue works without playlist | ['x', [], None] | ['x', [], None] | Passed |
SHA-256 / 9a301acbb98887e3755a79879b51c0c3f932ad022d1ec333641338534a2aa90d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(playlist, cursor, queue, disabled):
pending=list(queue)
while pending:
candidate=pending.pop(0)
if candidate in disabled: continue
return [candidate,pending,candidate]
start=playlist.index(cursor) if cursor in playlist else -1
for candidate in playlist[start+1:]:
if candidate not in disabled:
return [candidate,pending,candidate]
return [None,pending,cursor]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('queue has priority', solve(['a', 'b'], 'a', ['x', 'y'], []), ['x', ['y'], 'a'])
check('same track queued twice', solve(['a', 'b'], 'a', ['x', 'x', 'y'], []), ['x', ['x', 'y'], 'a'])
check('disabled queue discarded', solve(['a', 'b'], 'a', ['x', 'y'], ['x']), ['y', [], 'a'])
check('fallback advances cursor', solve(['a', 'b'], 'a', [], []), ['b', [], 'b'])
check('all queued disabled falls back', solve(['a', 'b'], 'a', ['x'], ['x']), ['b', [], 'b'])
check('end has no track', solve(['a'], 'a', [], []), [None, [], 'a'])
check('queue works without playlist', solve([], None, ['x'], []), ['x', [], 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 |
|---|---|---|---|
| queue has priority | ['x', ['y'], 'x'] | ['x', ['y'], 'a'] | Failed |
| same track queued twice | ['x', ['x', 'y'], 'x'] | ['x', ['x', 'y'], 'a'] | Failed |
| disabled queue discarded | ['y', [], 'y'] | ['y', [], 'a'] | Failed |
| fallback advances cursor | ['b', [], 'b'] | ['b', [], 'b'] | Passed |
| all queued disabled falls back | ['b', [], 'b'] | ['b', [], 'b'] | Passed |
| end has no track | [None, [], 'a'] | [None, [], 'a'] | Passed |
| queue works without playlist | ['x', [], 'x'] | ['x', [], None] | Failed |
SHA-256 / 83f7f8bda879b5d726c81f4579bf72e1d412d30b1faa3b50d1aed59d896a7eb5
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(playlist, cursor, queue, disabled):
pending=list(queue)
while pending:
candidate=pending.pop(0)
if candidate in disabled: continue
return [candidate,pending,cursor]
start=playlist.index(cursor) if cursor in playlist else -1
for candidate in playlist[start+1:]:
if candidate not in disabled:
return [candidate,pending,candidate]
return [None,pending,cursor]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('queue has priority', solve(['a', 'b'], 'a', ['x', 'y'], []), ['x', ['y'], 'a'])
check('same track queued twice', solve(['a', 'b'], 'a', ['x', 'x', 'y'], []), ['x', ['x', 'y'], 'a'])
check('disabled queue discarded', solve(['a', 'b'], 'a', ['x', 'y'], ['x']), ['y', [], 'a'])
check('fallback advances cursor', solve(['a', 'b'], 'a', [], []), ['b', [], 'b'])
check('all queued disabled falls back', solve(['a', 'b'], 'a', ['x'], ['x']), ['b', [], 'b'])
check('end has no track', solve(['a'], 'a', [], []), [None, [], 'a'])
check('queue works without playlist', solve([], None, ['x'], []), ['x', [], 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 |
|---|---|---|---|
| queue has priority | ['x', ['y'], 'a'] | ['x', ['y'], 'a'] | Passed |
| same track queued twice | ['x', ['x', 'y'], 'a'] | ['x', ['x', 'y'], 'a'] | Passed |
| disabled queue discarded | ['y', [], 'a'] | ['y', [], 'a'] | Passed |
| fallback advances cursor | ['b', [], 'b'] | ['b', [], 'b'] | Passed |
| all queued disabled falls back | ['b', [], 'b'] | ['b', [], 'b'] | Passed |
| end has no track | [None, [], 'a'] | [None, [], 'a'] | Passed |
| queue works without playlist | ['x', [], None] | ['x', [], None] | Passed |
SHA-256 / 56916a6d2ba54f92ccbcfd620cd4015ac7afdeff5ebaea521ce8f88a3c45aaf1
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.742806+00:00.
Case digest / 947058fbd2f8696b5522b109a931188cc472546076be78a346acb7f490333e37