FA-11336 / Media playlist lifecycle / Open access
Playlist removal selection: Selects a track even though no current identity existed · case 01
Selects a track even though no current identity existed and produces an incorrect media-control or presentation result.
ROOT CAUSE
Selects a track even though no current identity existed. The fixture suite isolates this decision from network delivery and codec details.
VERIFIED REPAIR
Remove listed IDs from a playlist with unique string IDs. Keep current identity when it survives. If current is removed, choose the first surviving original successor, otherwise the last survivor. If current was absent, leave selection None. Return [remaining playlist,current ID or None].
Unsuccessful approach: The alternative still fails because it keeps the old numeric index rather than current identity after preceding removals.
Case contract
Remove listed IDs from a playlist with unique string IDs. Keep current identity when it survives. If current is removed, choose the first surviving original successor, otherwise the last survivor. If current was absent, leave selection None. Return [remaining playlist,current ID or None].
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, current, removed):
items=list(playlist)
old_index=items.index(current) if current in items else None
items=[track for track in items if track not in removed]
if current in items:
return [items,current]
if not items: return [items,None]
if old_index is None: return [items,items[0]]
old=playlist
successors=old[old_index+1:]
for track in successors:
if track in items: return [items,track]
return [items,items[-1]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remove preceding item keeps identity', solve(['a', 'b', 'c'], 'b', ['a']), [['b', 'c'], 'b'])
check('current removed selects next', solve(['a', 'b', 'c'], 'b', ['b']), [['a', 'c'], 'c'])
check('skip removed successors', solve(['a', 'b', 'c', 'd'], 'b', ['b', 'c']), [['a', 'd'], 'd'])
check('removed last chooses predecessor', solve(['a', 'b', 'c'], 'c', ['c']), [['a', 'b'], 'b'])
check('absent selection remains absent', solve(['a', 'b'], None, []), [['a', 'b'], None])
check('everything removed', solve(['a'], 'a', ['a']), [[], 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 |
|---|---|---|---|
| remove preceding item keeps identity | [['b', 'c'], 'b'] | [['b', 'c'], 'b'] | Passed |
| current removed selects next | [['a', 'c'], 'c'] | [['a', 'c'], 'c'] | Passed |
| skip removed successors | [['a', 'd'], 'd'] | [['a', 'd'], 'd'] | Passed |
| removed last chooses predecessor | [['a', 'b'], 'b'] | [['a', 'b'], 'b'] | Passed |
| absent selection remains absent | [['a', 'b'], 'a'] | [['a', 'b'], None] | Failed |
| everything removed | [[], None] | [[], None] | Passed |
SHA-256 / 7aac1e0a49b86d85a8776764c9070f48dc1898274f3d8f3bd373f99369988832
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(playlist, current, removed):
items=list(playlist)
old_index=items.index(current) if current in items else None
items=[track for track in items if track not in removed]
if current in items:
return [items,items[min(old_index,len(items)-1)] if old_index is not None else current]
if not items: return [items,None]
if old_index is None: return [items,None]
old=playlist
successors=old[old_index+1:]
for track in successors:
if track in items: return [items,track]
return [items,items[-1]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remove preceding item keeps identity', solve(['a', 'b', 'c'], 'b', ['a']), [['b', 'c'], 'b'])
check('current removed selects next', solve(['a', 'b', 'c'], 'b', ['b']), [['a', 'c'], 'c'])
check('skip removed successors', solve(['a', 'b', 'c', 'd'], 'b', ['b', 'c']), [['a', 'd'], 'd'])
check('removed last chooses predecessor', solve(['a', 'b', 'c'], 'c', ['c']), [['a', 'b'], 'b'])
check('absent selection remains absent', solve(['a', 'b'], None, []), [['a', 'b'], None])
check('everything removed', solve(['a'], 'a', ['a']), [[], 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 |
|---|---|---|---|
| remove preceding item keeps identity | [['b', 'c'], 'c'] | [['b', 'c'], 'b'] | Failed |
| current removed selects next | [['a', 'c'], 'c'] | [['a', 'c'], 'c'] | Passed |
| skip removed successors | [['a', 'd'], 'd'] | [['a', 'd'], 'd'] | Passed |
| removed last chooses predecessor | [['a', 'b'], 'b'] | [['a', 'b'], 'b'] | Passed |
| absent selection remains absent | [['a', 'b'], None] | [['a', 'b'], None] | Passed |
| everything removed | [[], None] | [[], None] | Passed |
SHA-256 / 1def5f6cfaa171f862a85c8be22914e940728aaef2edf020d75fb263cb9f03e9
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(playlist, current, removed):
items=list(playlist)
old_index=items.index(current) if current in items else None
items=[track for track in items if track not in removed]
if current in items:
return [items,current]
if not items: return [items,None]
if old_index is None: return [items,None]
old=playlist
successors=old[old_index+1:]
for track in successors:
if track in items: return [items,track]
return [items,items[-1]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remove preceding item keeps identity', solve(['a', 'b', 'c'], 'b', ['a']), [['b', 'c'], 'b'])
check('current removed selects next', solve(['a', 'b', 'c'], 'b', ['b']), [['a', 'c'], 'c'])
check('skip removed successors', solve(['a', 'b', 'c', 'd'], 'b', ['b', 'c']), [['a', 'd'], 'd'])
check('removed last chooses predecessor', solve(['a', 'b', 'c'], 'c', ['c']), [['a', 'b'], 'b'])
check('absent selection remains absent', solve(['a', 'b'], None, []), [['a', 'b'], None])
check('everything removed', solve(['a'], 'a', ['a']), [[], 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 |
|---|---|---|---|
| remove preceding item keeps identity | [['b', 'c'], 'b'] | [['b', 'c'], 'b'] | Passed |
| current removed selects next | [['a', 'c'], 'c'] | [['a', 'c'], 'c'] | Passed |
| skip removed successors | [['a', 'd'], 'd'] | [['a', 'd'], 'd'] | Passed |
| removed last chooses predecessor | [['a', 'b'], 'b'] | [['a', 'b'], 'b'] | Passed |
| absent selection remains absent | [['a', 'b'], None] | [['a', 'b'], None] | Passed |
| everything removed | [[], None] | [[], None] | Passed |
SHA-256 / 00305bcf5cbfd6fd2e98cf3f1a34ed504c52d989188a44b792dc25cd307548b6
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:47.039115+00:00.
Case digest / ff8329a978432836e0aecbd25eb36bbe3665dc3645d20b05153931cdfcfe3f6c