FA-11156 / Streaming segment lifecycle / Open access
Download failure restores pending · case 01
Removing a failed download from inflight without requeueing permanently loses that segment.
ROOT CAUSE
Removing a failed download from inflight without requeueing permanently loses that segment.
VERIFIED REPAIR
Preserve the media contract: A retryable failure moves its segment ID from inflight to the end of pending only if not already pending, preserving unrelated work.
Unsuccessful approach: Appending a retry while leaving it inflight blocks dispatch and may duplicate pending identities.
Case contract
A retryable failure moves its segment ID from inflight to the end of pending only if not already pending, preserving unrelated work.
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(pending, inflight, identity):
return [list(pending),[x for x in inflight if x!=identity]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a'], ['b'], 'b')),[['a', 'b'], []])
check('fixture 2',solve(*(['b'], ['b'], 'b')),[['b'], []])
check('fixture 3',solve(*([], ['a', 'b'], 'a')),[['a'], ['b']])
check('fixture 4',solve(*([], ['a'], 'a')),[['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [['a'], []] | [['a', 'b'], []] | Failed |
| fixture 2 | [['b'], []] | [['b'], []] | Passed |
| fixture 3 | [[], ['b']] | [['a'], ['b']] | Failed |
| fixture 4 | [[], []] | [['a'], []] | Failed |
SHA-256 / e93eaa5394190fef31e94ae7697e50529e282eda179a440a89901900043a2359
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pending, inflight, identity):
return [list(pending)+[identity],list(inflight)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a'], ['b'], 'b')),[['a', 'b'], []])
check('fixture 2',solve(*(['b'], ['b'], 'b')),[['b'], []])
check('fixture 3',solve(*([], ['a', 'b'], 'a')),[['a'], ['b']])
check('fixture 4',solve(*([], ['a'], 'a')),[['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [['a', 'b'], ['b']] | [['a', 'b'], []] | Failed |
| fixture 2 | [['b', 'b'], ['b']] | [['b'], []] | Failed |
| fixture 3 | [['a'], ['a', 'b']] | [['a'], ['b']] | Failed |
| fixture 4 | [['a'], ['a']] | [['a'], []] | Failed |
SHA-256 / 70108be5b2f7155262f55c2dff8a8a8f16ae18d527402f323f518d8e2da3c04b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pending, inflight, identity):
return [list(pending)+([identity] if identity not in pending else []),[x for x in inflight if x!=identity]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a'], ['b'], 'b')),[['a', 'b'], []])
check('fixture 2',solve(*(['b'], ['b'], 'b')),[['b'], []])
check('fixture 3',solve(*([], ['a', 'b'], 'a')),[['a'], ['b']])
check('fixture 4',solve(*([], ['a'], 'a')),[['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [['a', 'b'], []] | [['a', 'b'], []] | Passed |
| fixture 2 | [['b'], []] | [['b'], []] | Passed |
| fixture 3 | [['a'], ['b']] | [['a'], ['b']] | Passed |
| fixture 4 | [['a'], []] | [['a'], []] | Passed |
SHA-256 / e785431dafa3957791b416b0b9dde41c8ace2965d2f00b71ecc8d0a84ffed5c5
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.521401+00:00.
Case digest / 50a0c048bf8f9b9860a07b3169be746c8168fa1bba61d3b15ee0b7c0ff231e9e