FAILURE MAP
← Case archive

FA-11231 / Media timeline seeking / Open access

Seek buffer gap next available · case 01

A seek is accepted inside an unbuffered gap.

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

ROOT CAUSE

A seek is accepted inside an unbuffered gap.

VERIFIED REPAIR

Preserve the media contract: Ranges are sorted disjoint nonempty half-open buffered intervals. Return target when buffered, otherwise the next range start; return None beyond all data.

Unsuccessful approach: Always jumping to range start moves an already-buffered target backward.

Case contract

Ranges are sorted disjoint nonempty half-open buffered intervals. Return target when buffered, otherwise the next range start; return None beyond all data.

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(ranges, target):
    return target if ranges else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0, 4], [6, 10]], 5)),6)
check('fixture 2',solve(*([[0, 4], [6, 10]], 2)),2)
check('fixture 3',solve(*([[0, 4]], 4)),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 fixtureActualExpectedOutcome
fixture 156Failed
fixture 222Passed
fixture 34NoneFailed
fixture 4NoneNonePassed

SHA-256 / dc56322a5ed2442616d23f1e658545ae673a17fe0755b3e7d8a335b8d33a007a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(ranges, target):
    return next((start for start,end in ranges if end>target),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0, 4], [6, 10]], 5)),6)
check('fixture 2',solve(*([[0, 4], [6, 10]], 2)),2)
check('fixture 3',solve(*([[0, 4]], 4)),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 fixtureActualExpectedOutcome
fixture 166Passed
fixture 202Failed
fixture 3NoneNonePassed
fixture 4NoneNonePassed

SHA-256 / a1e115d37b2735ddfe7b4e0092ae29e38452ae142767734a4722a1dbab49a598

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(ranges, target):
    return next((max(start,target) for start,end in ranges if end>target),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0, 4], [6, 10]], 5)),6)
check('fixture 2',solve(*([[0, 4], [6, 10]], 2)),2)
check('fixture 3',solve(*([[0, 4]], 4)),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 fixtureActualExpectedOutcome
fixture 166Passed
fixture 222Passed
fixture 3NoneNonePassed
fixture 4NoneNonePassed

SHA-256 / e1d82951241d98feb76c2d5e8c15d24b43a305417963577e0f5f63f5a45816e5

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

Case digest / e6deed4912a458c997c56e30a7ed4cb277f7392a7425baed82760acd8da3995d