FAILURE MAP
← Case archive

FA-11171 / Streaming segment lifecycle / Open access

Append failure keeps uncommitted segment · case 01

Append completion is treated as success even when the decoder rejected the segment.

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

ROOT CAUSE

Append completion is treated as success even when the decoder rejected the segment.

VERIFIED REPAIR

Preserve the media contract: An inflight segment becomes committed only after successful append; failure retains its ID for recovery and leaves committed order unchanged.

Unsuccessful approach: Clearing inflight state without recording successes or retaining failures loses lifecycle state.

Case contract

An inflight segment becomes committed only after successful append; failure retains its ID for recovery and leaves committed order unchanged.

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(committed, inflight, success):
    return [list(committed)+[inflight],None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a'], 'b', False)),[['a'], 'b'])
check('fixture 2',solve(*(['a'], 'b', True)),[['a', 'b'], None])
check('fixture 3',solve(*([], 'a', True)),[['a'], None])
check('fixture 4',solve(*([], 'a', False)),[[], '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[['a', 'b'], None][['a'], 'b']Failed
fixture 2[['a', 'b'], None][['a', 'b'], None]Passed
fixture 3[['a'], None][['a'], None]Passed
fixture 4[['a'], None][[], 'a']Failed

SHA-256 / 510eee2d7ef321fbd3ac4657d7591914ca879c23439ddf8aaad247c834aaecd8

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(committed, inflight, success):
    return [list(committed),None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a'], 'b', False)),[['a'], 'b'])
check('fixture 2',solve(*(['a'], 'b', True)),[['a', 'b'], None])
check('fixture 3',solve(*([], 'a', True)),[['a'], None])
check('fixture 4',solve(*([], 'a', False)),[[], '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[['a'], None][['a'], 'b']Failed
fixture 2[['a'], None][['a', 'b'], None]Failed
fixture 3[[], None][['a'], None]Failed
fixture 4[[], None][[], 'a']Failed

SHA-256 / fcd307aac4d17e55992ee165ddd03bf46ebb7d3f53678946a092817b7d0681af

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(committed, inflight, success):
    return [list(committed)+([inflight] if success else []),None if success else inflight]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a'], 'b', False)),[['a'], 'b'])
check('fixture 2',solve(*(['a'], 'b', True)),[['a', 'b'], None])
check('fixture 3',solve(*([], 'a', True)),[['a'], None])
check('fixture 4',solve(*([], 'a', False)),[[], '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[['a'], 'b'][['a'], 'b']Passed
fixture 2[['a', 'b'], None][['a', 'b'], None]Passed
fixture 3[['a'], None][['a'], None]Passed
fixture 4[[], 'a'][[], 'a']Passed

SHA-256 / b5e55ff534e6618dafa50c6c3595a5a1b33eda0ff7dc2920c04456699c02ef9f

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

Case digest / d0d212d7b4f0232ef3476828e9b5aaf22f2ffaca6b9368d7f1806d22f0c91374