FAILURE MAP
← Case archive

FA-11051 / Media playlist state / Open access

Duplicate track removal by entry id · case 01

Removing a track occurrence deletes every playlist occurrence of that track.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Removing a track occurrence deletes every playlist occurrence of that track.

VERIFIED REPAIR

Preserve the media contract: Entries are [unique entry-ID,track-ID]. Remove exactly the selected entry identity, retaining other appearances of the same track.

Unsuccessful approach: Keeping only the targeted identity reverses the removal predicate.

Case contract

Entries are [unique entry-ID,track-ID]. Remove exactly the selected entry identity, retaining other appearances of the same track.

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, identity):
    return [x for x in entries if x[1]!=next((y[1] for y in entries if y[0]==identity),None)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([['e1', 'song'], ['e2', 'song'], ['e3', 'other']], 'e1')),[['e2', 'song'], ['e3', 'other']])
check('fixture 2',solve(*([], 'x')),[])
check('fixture 3',solve(*([['a', 'song']], 'x')),[['a', 'song']])
check('fixture 4',solve(*([['a', 'song']], 'a')),[])
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 fixtureActualExpectedOutcome
fixture 1[['e3', 'other']][['e2', 'song'], ['e3', 'other']]Failed
fixture 2[][]Passed
fixture 3[['a', 'song']][['a', 'song']]Passed
fixture 4[][]Passed

SHA-256 / f34a471dbf507cdd2f0fa957f2539d343a2079372e1156a80346702bb18bbef7

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(entries, identity):
    return [x for x in entries if x[0]==identity]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([['e1', 'song'], ['e2', 'song'], ['e3', 'other']], 'e1')),[['e2', 'song'], ['e3', 'other']])
check('fixture 2',solve(*([], 'x')),[])
check('fixture 3',solve(*([['a', 'song']], 'x')),[['a', 'song']])
check('fixture 4',solve(*([['a', 'song']], 'a')),[])
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 fixtureActualExpectedOutcome
fixture 1[['e1', 'song']][['e2', 'song'], ['e3', 'other']]Failed
fixture 2[][]Passed
fixture 3[][['a', 'song']]Failed
fixture 4[['a', 'song']][]Failed

SHA-256 / 6caa4d57a79a7cf4e54aae63e36ff053fb17d28420760a0c648df4c05df7137e

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(entries, identity):
    return [x for x in entries if x[0]!=identity]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([['e1', 'song'], ['e2', 'song'], ['e3', 'other']], 'e1')),[['e2', 'song'], ['e3', 'other']])
check('fixture 2',solve(*([], 'x')),[])
check('fixture 3',solve(*([['a', 'song']], 'x')),[['a', 'song']])
check('fixture 4',solve(*([['a', 'song']], 'a')),[])
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 fixtureActualExpectedOutcome
fixture 1[['e2', 'song'], ['e3', 'other']][['e2', 'song'], ['e3', 'other']]Passed
fixture 2[][]Passed
fixture 3[['a', 'song']][['a', 'song']]Passed
fixture 4[][]Passed

SHA-256 / 066fa82747565db9a29d90b0efc8ddf79d3ca2704d10e9c1896310d791d1e3f8

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.468133+00:00.

Case digest / 1756e35fe3a6eabca7bc5376f806cb3e61b86fa1be486bf58f0b727cc1296f63