FA-11086 / Media playlist state / Open access
Playlist move destination after removal · case 01
Inserting without removal duplicates the moved entry.
ROOT CAUSE
Inserting without removal duplicates the moved entry.
VERIFIED REPAIR
Preserve the media contract: Move source entry to destination index measured in the list after source removal; both indices are valid final positions.
Unsuccessful approach: Subtracting one from an already post-removal destination shifts moves too far left.
Case contract
Move source entry to destination index measured in the list after source removal; both indices are valid final positions.
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, source, destination):
return entries[:destination]+[entries[source]]+entries[destination:]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b', 'c', 'd'], 0, 2)),['b', 'c', 'a', 'd'])
check('fixture 2',solve(*(['a', 'b', 'c'], 2, 0)),['c', 'a', 'b'])
check('fixture 3',solve(*(['a'], 0, 0)),['a'])
check('fixture 4',solve(*(['a', 'b', 'c'], 1, 1)),['a', 'b', 'c'])
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', 'b', 'a', 'c', 'd'] | ['b', 'c', 'a', 'd'] | Failed |
| fixture 2 | ['c', 'a', 'b', 'c'] | ['c', 'a', 'b'] | Failed |
| fixture 3 | ['a', 'a'] | ['a'] | Failed |
| fixture 4 | ['a', 'b', 'b', 'c'] | ['a', 'b', 'c'] | Failed |
SHA-256 / 0907848f550227b55c0f07d74cb61962c2ce709586e36cf2469968071676a964
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(entries, source, destination):
return (entries[:source]+entries[source+1:])[:max(0,destination-1)]+[entries[source]]+(entries[:source]+entries[source+1:])[max(0,destination-1):]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b', 'c', 'd'], 0, 2)),['b', 'c', 'a', 'd'])
check('fixture 2',solve(*(['a', 'b', 'c'], 2, 0)),['c', 'a', 'b'])
check('fixture 3',solve(*(['a'], 0, 0)),['a'])
check('fixture 4',solve(*(['a', 'b', 'c'], 1, 1)),['a', 'b', 'c'])
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 | ['b', 'a', 'c', 'd'] | ['b', 'c', 'a', 'd'] | Failed |
| fixture 2 | ['c', 'a', 'b'] | ['c', 'a', 'b'] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | ['b', 'a', 'c'] | ['a', 'b', 'c'] | Failed |
SHA-256 / 7e5a13e6837b6090a1d5d430f15a6299671f7edf50dd6ddce20af0318cc16f28
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(entries, source, destination):
return (entries[:source]+entries[source+1:])[:destination]+[entries[source]]+(entries[:source]+entries[source+1:])[destination:]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b', 'c', 'd'], 0, 2)),['b', 'c', 'a', 'd'])
check('fixture 2',solve(*(['a', 'b', 'c'], 2, 0)),['c', 'a', 'b'])
check('fixture 3',solve(*(['a'], 0, 0)),['a'])
check('fixture 4',solve(*(['a', 'b', 'c'], 1, 1)),['a', 'b', 'c'])
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 | ['b', 'c', 'a', 'd'] | ['b', 'c', 'a', 'd'] | Passed |
| fixture 2 | ['c', 'a', 'b'] | ['c', 'a', 'b'] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
SHA-256 / a28831cb8815301160cb02e51dc8d9225039ce8f54b30501784b0d4532600d51
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.909717+00:00.
Case digest / c42ce82efd7f2dcc5c63e9709d86a057429536eecafc871c44296db52fcc5839