FA-11091 / Media playlist state / Open access
Playlist deduplicate entry not track · case 01
Track-level deduplication collapses independently queued occurrences.
ROOT CAUSE
Track-level deduplication collapses independently queued occurrences.
VERIFIED REPAIR
Preserve the media contract: Return the first occurrence of each unique entry ID in original first-occurrence order; track IDs may repeat and later duplicate-entry payloads are ignored.
Unsuccessful approach: Dictionary overwrite keeps later duplicate payloads instead of first occurrence.
Case contract
Return the first occurrence of each unique entry ID in original first-occurrence order; track IDs may repeat and later duplicate-entry payloads are ignored.
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(entries):
return list({x[1]:x for x in entries}.values())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([['a', 'first'], ['b', 'same'], ['a', 'later'], ['c', 'same']],)),[['a', 'first'], ['b', 'same'], ['c', 'same']])
check('fixture 2',solve(*([],)),[])
check('fixture 3',solve(*([['a', 'x']],)),[['a', 'x']])
check('fixture 4',solve(*([['a', 'x'], ['b', 'x']],)),[['a', 'x'], ['b', 'x']])
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', 'first'], ['c', 'same'], ['a', 'later']] | [['a', 'first'], ['b', 'same'], ['c', 'same']] | Failed |
| fixture 2 | [] | [] | Passed |
| fixture 3 | [['a', 'x']] | [['a', 'x']] | Passed |
| fixture 4 | [['b', 'x']] | [['a', 'x'], ['b', 'x']] | Failed |
SHA-256 / 6a73e0ef377a618db31b8db96a970aecabbfc9ea9c678e2f153234f0a32f94c8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(entries):
return list({x[0]:x for x in entries}.values())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([['a', 'first'], ['b', 'same'], ['a', 'later'], ['c', 'same']],)),[['a', 'first'], ['b', 'same'], ['c', 'same']])
check('fixture 2',solve(*([],)),[])
check('fixture 3',solve(*([['a', 'x']],)),[['a', 'x']])
check('fixture 4',solve(*([['a', 'x'], ['b', 'x']],)),[['a', 'x'], ['b', 'x']])
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', 'later'], ['b', 'same'], ['c', 'same']] | [['a', 'first'], ['b', 'same'], ['c', 'same']] | Failed |
| fixture 2 | [] | [] | Passed |
| fixture 3 | [['a', 'x']] | [['a', 'x']] | Passed |
| fixture 4 | [['a', 'x'], ['b', 'x']] | [['a', 'x'], ['b', 'x']] | Passed |
SHA-256 / 8cd0149a5897b9c6f6010353a5996e93676bd3e14123110afe3fdd68abb9e34e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(entries):
return [entry for i,entry in enumerate(entries) if all(prior[0]!=entry[0] for prior in entries[:i])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([['a', 'first'], ['b', 'same'], ['a', 'later'], ['c', 'same']],)),[['a', 'first'], ['b', 'same'], ['c', 'same']])
check('fixture 2',solve(*([],)),[])
check('fixture 3',solve(*([['a', 'x']],)),[['a', 'x']])
check('fixture 4',solve(*([['a', 'x'], ['b', 'x']],)),[['a', 'x'], ['b', 'x']])
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', 'first'], ['b', 'same'], ['c', 'same']] | [['a', 'first'], ['b', 'same'], ['c', 'same']] | Passed |
| fixture 2 | [] | [] | Passed |
| fixture 3 | [['a', 'x']] | [['a', 'x']] | Passed |
| fixture 4 | [['a', 'x'], ['b', 'x']] | [['a', 'x'], ['b', 'x']] | Passed |
SHA-256 / 185afbf514be5c36a9e67a2cfe8ac2812e3193c97e70f362feaef252ecbe598c
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.915959+00:00.
Case digest / 128d5ed4ce660024d00bf172c6a608097c477baf15db53af2673a42f311ebc7d