FA-11096 / Media playlist state / Open access
Playlist duration unknown propagates · case 01
An unknown media duration is silently counted as zero.
ROOT CAUSE
An unknown media duration is silently counted as zero.
VERIFIED REPAIR
Preserve the media contract: Durations are nonnegative numbers or None for unknown. Total is unknown if any component is unknown, otherwise exact sum including empty total zero.
Unsuccessful approach: Truthiness mistakes valid zero-duration items and an empty playlist for unknown duration.
Case contract
Durations are nonnegative numbers or None for unknown. Total is unknown if any component is unknown, otherwise exact sum including empty total zero.
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(durations):
return sum(x or 0 for x in durations)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([2, None, 3],)),None)
check('fixture 2',solve(*([0, 2],)),2)
check('fixture 3',solve(*([],)),0)
check('fixture 4',solve(*([2, 3],)),5)
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 | 5 | None | Failed |
| fixture 2 | 2 | 2 | Passed |
| fixture 3 | 0 | 0 | Passed |
| fixture 4 | 5 | 5 | Passed |
SHA-256 / b6171ecba274469fee441dbbb94ce4c51434932cf4534d84e6fa167e86c032d0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(durations):
return None if not all(durations) else sum(durations)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([2, None, 3],)),None)
check('fixture 2',solve(*([0, 2],)),2)
check('fixture 3',solve(*([],)),0)
check('fixture 4',solve(*([2, 3],)),5)
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 | None | None | Passed |
| fixture 2 | None | 2 | Failed |
| fixture 3 | 0 | 0 | Passed |
| fixture 4 | 5 | 5 | Passed |
SHA-256 / 139d784a97943336e04e8c58a31872e98b42427f0382b60c89db06cc07ac1d47
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(durations):
return None if any(x is None for x in durations) else sum(durations)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([2, None, 3],)),None)
check('fixture 2',solve(*([0, 2],)),2)
check('fixture 3',solve(*([],)),0)
check('fixture 4',solve(*([2, 3],)),5)
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 | None | None | Passed |
| fixture 2 | 2 | 2 | Passed |
| fixture 3 | 0 | 0 | Passed |
| fixture 4 | 5 | 5 | Passed |
SHA-256 / c5ed07ed2fe68039780ed65c1a7aa8602a331708a5127003a2e176211f135558
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.951460+00:00.
Case digest / a81587ed9e956da4ef581420892dc49c1a1a6d1eb231b91f5af7b5ab04856c00