FAILURE MAP
← Case archive

FA-11161 / Streaming segment lifecycle / Open access

Segment eviction retains shared init · case 01

Evicting one media segment deletes initialization bytes needed by other segments.

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

ROOT CAUSE

Evicting one media segment deletes initialization bytes needed by other segments.

VERIFIED REPAIR

Preserve the media contract: Segments are [ID,initialization-object ID]. Evict the named segment and collect init objects with no remaining references; preserve shared init data.

Unsuccessful approach: Never collecting init objects leaks unreferenced decoder initialization data.

Case contract

Segments are [ID,initialization-object ID]. Evict the named segment and collect init objects with no remaining references; preserve shared init data.

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(segments, remove, init_objects):
    return [[x for x in segments if x[0]!=remove],[]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 'i'], [2, 'i']], 1, ['i'])),[[[2, 'i']], ['i']])
check('fixture 2',solve(*([[1, 'i']], 1, ['i'])),[[], []])
check('fixture 3',solve(*([[1, 'i'], [2, 'j']], 1, ['i', 'j'])),[[[2, 'j']], ['j']])
check('fixture 4',solve(*([], 4, [])),[[], []])
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[[[2, 'i']], []][[[2, 'i']], ['i']]Failed
fixture 2[[], []][[], []]Passed
fixture 3[[[2, 'j']], []][[[2, 'j']], ['j']]Failed
fixture 4[[], []][[], []]Passed

SHA-256 / aadf6efa7c8f19181ba8930507451ac6aa7eb55dd1d9d7cd314b05af8d1c83a1

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(segments, remove, init_objects):
    return [[x for x in segments if x[0]!=remove],list(init_objects)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 'i'], [2, 'i']], 1, ['i'])),[[[2, 'i']], ['i']])
check('fixture 2',solve(*([[1, 'i']], 1, ['i'])),[[], []])
check('fixture 3',solve(*([[1, 'i'], [2, 'j']], 1, ['i', 'j'])),[[[2, 'j']], ['j']])
check('fixture 4',solve(*([], 4, [])),[[], []])
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[[[2, 'i']], ['i']][[[2, 'i']], ['i']]Passed
fixture 2[[], ['i']][[], []]Failed
fixture 3[[[2, 'j']], ['i', 'j']][[[2, 'j']], ['j']]Failed
fixture 4[[], []][[], []]Passed

SHA-256 / f3f4c8b796ea2af5c6a8585bade6d553bb9c434817fd9fc35f05edbadb461d3d

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(segments, remove, init_objects):
    return [[x for x in segments if x[0]!=remove],[i for i in init_objects if any(x[0]!=remove and x[1]==i for x in segments)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 'i'], [2, 'i']], 1, ['i'])),[[[2, 'i']], ['i']])
check('fixture 2',solve(*([[1, 'i']], 1, ['i'])),[[], []])
check('fixture 3',solve(*([[1, 'i'], [2, 'j']], 1, ['i', 'j'])),[[[2, 'j']], ['j']])
check('fixture 4',solve(*([], 4, [])),[[], []])
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[[[2, 'i']], ['i']][[[2, 'i']], ['i']]Passed
fixture 2[[], []][[], []]Passed
fixture 3[[[2, 'j']], ['j']][[[2, 'j']], ['j']]Passed
fixture 4[[], []][[], []]Passed

SHA-256 / e13fe481323981cd54fefa638a387c6091c5b3e9e9e0be0a2b4fc23b997cf2e7

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

Case digest / bfb2a2a8cfa0fe1eba67cf913e62199ab07e66a7778a55e2a0021cf0e967e5d5