FA-11136 / Streaming segment lifecycle / Open access
Init segment before media · case 01
Media data is appended before its required decoder initialization data.
ROOT CAUSE
Media data is appended before its required decoder initialization data.
VERIFIED REPAIR
Preserve the media contract: Plan append operations for one media segment: append its non-None initialization segment first only when not already loaded.
Unsuccessful approach: Appending initialization before every segment redundantly resets unchanged decoder state.
Case contract
Plan append operations for one media segment: append its non-None initialization segment first only when not already loaded.
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(loaded_init, required_init, media):
return [["media",media]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*('old', 'new', 's1')),[['init', 'new'], ['media', 's1']])
check('fixture 2',solve(*('same', 'same', 's2')),[['media', 's2']])
check('fixture 3',solve(*(None, None, 's3')),[['media', 's3']])
check('fixture 4',solve(*(None, 'init', 's4')),[['init', 'init'], ['media', 's4']])
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 | [['media', 's1']] | [['init', 'new'], ['media', 's1']] | Failed |
| fixture 2 | [['media', 's2']] | [['media', 's2']] | Passed |
| fixture 3 | [['media', 's3']] | [['media', 's3']] | Passed |
| fixture 4 | [['media', 's4']] | [['init', 'init'], ['media', 's4']] | Failed |
SHA-256 / 9fff7f1e799a3fa969ef180edfb73a06f7adff5cd3abf5032df57a7a5695ceee
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(loaded_init, required_init, media):
return ([["init",required_init]] if required_init is not None else [])+[["media",media]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*('old', 'new', 's1')),[['init', 'new'], ['media', 's1']])
check('fixture 2',solve(*('same', 'same', 's2')),[['media', 's2']])
check('fixture 3',solve(*(None, None, 's3')),[['media', 's3']])
check('fixture 4',solve(*(None, 'init', 's4')),[['init', 'init'], ['media', 's4']])
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 | [['init', 'new'], ['media', 's1']] | [['init', 'new'], ['media', 's1']] | Passed |
| fixture 2 | [['init', 'same'], ['media', 's2']] | [['media', 's2']] | Failed |
| fixture 3 | [['media', 's3']] | [['media', 's3']] | Passed |
| fixture 4 | [['init', 'init'], ['media', 's4']] | [['init', 'init'], ['media', 's4']] | Passed |
SHA-256 / 04cdf3a339794a9fe6920d31fb0797f33cb09f34d655bd147b08afb900d3d744
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(loaded_init, required_init, media):
return ([] if required_init is None or required_init==loaded_init else [["init",required_init]])+[["media",media]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*('old', 'new', 's1')),[['init', 'new'], ['media', 's1']])
check('fixture 2',solve(*('same', 'same', 's2')),[['media', 's2']])
check('fixture 3',solve(*(None, None, 's3')),[['media', 's3']])
check('fixture 4',solve(*(None, 'init', 's4')),[['init', 'init'], ['media', 's4']])
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 | [['init', 'new'], ['media', 's1']] | [['init', 'new'], ['media', 's1']] | Passed |
| fixture 2 | [['media', 's2']] | [['media', 's2']] | Passed |
| fixture 3 | [['media', 's3']] | [['media', 's3']] | Passed |
| fixture 4 | [['init', 'init'], ['media', 's4']] | [['init', 'init'], ['media', 's4']] | Passed |
SHA-256 / 344ec7e95781d5997379f0b4887560c2083b353e98b0b8b7ebdcabc07704c536
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.316607+00:00.
Case digest / 7975bd6738905ad3ff89f11c1e00f8c051e7add4a566fd0843d5d88bca569247