FA-11211 / Media timeline seeking / Open access
Seek preceding keyframe · case 01
Nearest-keyframe seeking may start after the requested media time.
ROOT CAUSE
Nearest-keyframe seeking may start after the requested media time.
VERIFIED REPAIR
Preserve the media contract: Choose the latest random-access keyframe timestamp not after target; return None when decoding cannot start before target.
Unsuccessful approach: Excluding an exact matching keyframe seeks unnecessarily farther backward.
Case contract
Choose the latest random-access keyframe timestamp not after target; return None when decoding cannot start before target.
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(keyframes, target):
return min(keyframes,key=lambda x:abs(x-target)) if keyframes else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([0, 10, 20], 19)),10)
check('fixture 2',solve(*([0, 10, 20], 10)),10)
check('fixture 3',solve(*([5, 10], 2)),None)
check('fixture 4',solve(*([], 0)),None)
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 | 20 | 10 | Failed |
| fixture 2 | 10 | 10 | Passed |
| fixture 3 | 5 | None | Failed |
| fixture 4 | None | None | Passed |
SHA-256 / 193791bdd014214f8596d151c19ee160781dc1feee36e1e8c9c3ef11d45ab4a6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(keyframes, target):
return max((x for x in keyframes if x<target),default=None)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([0, 10, 20], 19)),10)
check('fixture 2',solve(*([0, 10, 20], 10)),10)
check('fixture 3',solve(*([5, 10], 2)),None)
check('fixture 4',solve(*([], 0)),None)
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 | 10 | 10 | Passed |
| fixture 2 | 0 | 10 | Failed |
| fixture 3 | None | None | Passed |
| fixture 4 | None | None | Passed |
SHA-256 / 9d3aa4883e7a2ac08db8173714d251e0ccdddd2e7998f5a030909fa6363258e1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(keyframes, target):
return max((x for x in keyframes if x<=target),default=None)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([0, 10, 20], 19)),10)
check('fixture 2',solve(*([0, 10, 20], 10)),10)
check('fixture 3',solve(*([5, 10], 2)),None)
check('fixture 4',solve(*([], 0)),None)
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 | 10 | 10 | Passed |
| fixture 2 | 10 | 10 | Passed |
| fixture 3 | None | None | Passed |
| fixture 4 | None | None | Passed |
SHA-256 / 56b1116e91440b2b11a4b3d857f9e04deb444aad9abb69eaad985c4a5f82c479
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.974296+00:00.
Case digest / 81a1afdfc1e69fba82c5b1b0cd88516fec367bc8b3633fa24a2352154d05c218