FAILURE MAP
← Case archive

FA-11266 / Media timeline seeking / Open access

Timestamp wrap unroll nearest forward · case 01

A wrapped media counter is treated as an absolute time and jumps backward.

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

ROOT CAUSE

A wrapped media counter is treated as an absolute time and jumps backward.

VERIFIED REPAIR

Preserve the media contract: For monotonic sample delivery with less than one wrap between observations, map raw counter in [0,modulus) to the smallest timestamp >=last with that residue.

Unsuccessful approach: Adding raw residue to the last timestamp overcounts progress inside a cycle.

Case contract

For monotonic sample delivery with less than one wrap between observations, map raw counter in [0,modulus) to the smallest timestamp >=last with that residue.

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(last, raw, modulus):
    return raw
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(14, 1, 16)),17)
check('fixture 2',solve(*(17, 3, 16)),19)
check('fixture 3',solve(*(3, 3, 16)),3)
check('fixture 4',solve(*(0, 5, 16)),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 fixtureActualExpectedOutcome
fixture 1117Failed
fixture 2319Failed
fixture 333Passed
fixture 455Passed

SHA-256 / c2f2b31de9aae4977aeb5c9b0df671f4027784e208dd84ef7ca70aac9c01e17a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(last, raw, modulus):
    return last+raw
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(14, 1, 16)),17)
check('fixture 2',solve(*(17, 3, 16)),19)
check('fixture 3',solve(*(3, 3, 16)),3)
check('fixture 4',solve(*(0, 5, 16)),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 fixtureActualExpectedOutcome
fixture 11517Failed
fixture 22019Failed
fixture 363Failed
fixture 455Passed

SHA-256 / 49500f442179d32cf0ea64000dd5102840d8c51ccd5fc6c3ffb7a21d0662396e

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(last, raw, modulus):
    return last+(raw-last%modulus)%modulus
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(14, 1, 16)),17)
check('fixture 2',solve(*(17, 3, 16)),19)
check('fixture 3',solve(*(3, 3, 16)),3)
check('fixture 4',solve(*(0, 5, 16)),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 fixtureActualExpectedOutcome
fixture 11717Passed
fixture 21919Passed
fixture 333Passed
fixture 455Passed

SHA-256 / 09dc1878f98212fc12fb21066d90ca4e25ebe97cec882b800203cbb8aca3cadc

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

Case digest / 9295ab4342f1c1fa02bc0f7a97a3cb71101abe66141f66f8f95b6b22cba31570