FA-78071 / Subtitle cue timing / Open access
Two-point subtitle synchronisation: intercept anchor · case 01
Mapped cues are offset by a constant error unless the first anchor sits at time zero.
ROOT CAUSE
The mapping multiplies absolute subtitle time by the slope without subtracting the anchor time.
VERIFIED REPAIR
Map t as b1 + (t - a1) * slope.
Unsuccessful approach: Pairing the second video anchor with the first subtitle anchor shifts every cue by the anchor span.
Case contract
anchors [[a1,b1],[a2,b2]] (a1 != a2, b1 != b2) map subtitle time a to video time b linearly through both points. Each time is mapped exactly, rounded half up, clamped at 0; cues whose mapped end is not after the mapped start are dropped.
Why this case matters
Subtitle timing defects shift, hide or overlap captions that viewers depend on for comprehension and accessibility.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(cues, anchors):
(a1,b1),(a2,b2)=anchors
k=Fraction(b2-b1,a2-a1)
def m(t):
return math.floor(b1+t*k+Fraction(1,2))
out=[]
for s,e in cues:
ns,ne=max(0,m(s)),max(0,m(e))
if ne>ns:
out.append([ns,ne])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: intercept anchor', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('regression variant: intercept anchor', [[[1, 2], [1, 2], [1500, 1501], [250, 253]], [[11000, 12000], [10000, 11000]]], [[1001, 1002], [1001, 1002], [2500, 2501], [1250, 1253]]), ('partial repair probe: intercept anchor', [[[1, 3]], [[0, 0], [2, 1]]], [[1, 2]]), ('partial repair variant: intercept anchor', [[[1, 1001]], [[0, -1000], [10000, 9500]]], [[0, 51]]), ('normal control', [[[7777, 10277]], [[5000, 6000], [5003, 4503]]], []), ('normal control', [[[250, 251], [8492, 8493]], [[5000, 5500], [9000, 7000]]], []), ('normal control', [[[7777, 7779], [1500, 1503]], [[1000, 1000], [2000, 0]]], [])], [('regression: intercept anchor', [[[999, 1002], [999, 1999], [7777, 8277]], [[1000, 1500], [2000, 2000]]], [[1500, 1501], [1500, 2000], [4889, 5139]]), ('regression variant: intercept anchor', [[[3231, 3731], [1, 1001], [1500, 1501]], [[3, 1003], [0, -3000]]], [[4308231, 4975398], [0, 1332668], [1998500, 1999834]]), ('partial repair probe: intercept anchor', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('partial repair variant: intercept anchor', [[[1500, 4000], [0, 1000]], [[3, 1503], [0, -3000]]], [[2248500, 6001000], [0, 1498000]]), ('normal control', [[[7777, 8777], [7777, 7779]], [[0, 500], [1000, -1000]]], []), ('normal control', [[[250, 252]], [[10000, 10500], [11000, 10501]]], []), ('normal control', [[[7777, 8777], [3213, 3214], [1500, 1501], [250, 750]], [[5000, 6000], [5003, 5003]]], [])], [('regression: intercept anchor', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('regression variant: intercept anchor', [[[1500, 4000], [0, 1000]], [[3, 1503], [0, -3000]]], [[2248500, 6001000], [0, 1498000]]), ('partial repair probe: intercept anchor', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('partial repair variant: intercept anchor', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('normal control', [[[1500, 4000], [6431, 6931], [1, 1001], [862, 1862]], [[2000, 1500], [1000, 2000]]], []), ('normal control', [[[0, 500], [1500, 1502]], [[1000, 1500], [2000, 0]]], []), ('normal control', [[[7777, 7779]], [[5000, 4000], [6000, 4001]]], [])], [('regression: intercept anchor', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('regression variant: intercept anchor', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair probe: intercept anchor', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('partial repair variant: intercept anchor', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('normal control', [[[7777, 7778], [0, 2500]], [[1000, 1000], [2000, 0]]], []), ('normal control', [[[8367, 9367]], [[1000, 1500], [1003, 503]]], []), ('normal control', [[[999, 1001], [1, 501], [1500, 1502], [0, 3]], [[0, 1000], [1000, 500]]], [])], [('regression: intercept anchor', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('regression variant: intercept anchor', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair probe: intercept anchor', [[[999, 1999], [1, 2501], [7777, 8277], [250, 253]], [[0, -1000], [3, 503]]], [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]]), ('partial repair variant: intercept anchor', [[[7777, 7780], [6684, 6687], [0, 500], [999, 3499]], [[0, -1000], [3, 1503]]], [[6487610, 6490113], [5575684, 5578187], [0, 416167], [832499, 2918332]]), ('normal control', [[[250, 253], [1500, 1502], [999, 1499], [999, 1001]], [[1000, 2000], [1003, 1503]]], []), ('normal control', [[[999, 1999], [1, 501], [0, 1]], [[10000, 10000], [10003, 8003]]], []), ('normal control', [[[1500, 1501]], [[1000, 1500], [2000, 1501]]], [])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression: intercept anchor | [[0, 500]] | [] | Failed |
| regression variant: intercept anchor | [[12001, 12002], [12001, 12002], [13500, 13501], [12250, 12253]] | [[1001, 1002], [1001, 1002], [2500, 2501], [1250, 1253]] | Failed |
| partial repair probe: intercept anchor | [[1, 2]] | [[1, 2]] | Passed |
| partial repair variant: intercept anchor | [[0, 51]] | [[0, 51]] | Passed |
| normal control | [] | [] | Passed |
| normal control | [] | [] | Passed |
| normal control | [] | [] | Passed |
SHA-256 / 17682edfdfdbc543c781d3dc8ceb4692c0a3c037485d97d5509a0a74a1aae3c2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(cues, anchors):
(a1,b1),(a2,b2)=anchors
k=Fraction(b2-b1,a2-a1)
def m(t):
return math.floor(b2+(t-a1)*k+Fraction(1,2))
out=[]
for s,e in cues:
ns,ne=max(0,m(s)),max(0,m(e))
if ne>ns:
out.append([ns,ne])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: intercept anchor', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('regression variant: intercept anchor', [[[1, 2], [1, 2], [1500, 1501], [250, 253]], [[11000, 12000], [10000, 11000]]], [[1001, 1002], [1001, 1002], [2500, 2501], [1250, 1253]]), ('partial repair probe: intercept anchor', [[[1, 3]], [[0, 0], [2, 1]]], [[1, 2]]), ('partial repair variant: intercept anchor', [[[1, 1001]], [[0, -1000], [10000, 9500]]], [[0, 51]]), ('normal control', [[[7777, 10277]], [[5000, 6000], [5003, 4503]]], []), ('normal control', [[[250, 251], [8492, 8493]], [[5000, 5500], [9000, 7000]]], []), ('normal control', [[[7777, 7779], [1500, 1503]], [[1000, 1000], [2000, 0]]], [])], [('regression: intercept anchor', [[[999, 1002], [999, 1999], [7777, 8277]], [[1000, 1500], [2000, 2000]]], [[1500, 1501], [1500, 2000], [4889, 5139]]), ('regression variant: intercept anchor', [[[3231, 3731], [1, 1001], [1500, 1501]], [[3, 1003], [0, -3000]]], [[4308231, 4975398], [0, 1332668], [1998500, 1999834]]), ('partial repair probe: intercept anchor', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('partial repair variant: intercept anchor', [[[1500, 4000], [0, 1000]], [[3, 1503], [0, -3000]]], [[2248500, 6001000], [0, 1498000]]), ('normal control', [[[7777, 8777], [7777, 7779]], [[0, 500], [1000, -1000]]], []), ('normal control', [[[250, 252]], [[10000, 10500], [11000, 10501]]], []), ('normal control', [[[7777, 8777], [3213, 3214], [1500, 1501], [250, 750]], [[5000, 6000], [5003, 5003]]], [])], [('regression: intercept anchor', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('regression variant: intercept anchor', [[[1500, 4000], [0, 1000]], [[3, 1503], [0, -3000]]], [[2248500, 6001000], [0, 1498000]]), ('partial repair probe: intercept anchor', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('partial repair variant: intercept anchor', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('normal control', [[[1500, 4000], [6431, 6931], [1, 1001], [862, 1862]], [[2000, 1500], [1000, 2000]]], []), ('normal control', [[[0, 500], [1500, 1502]], [[1000, 1500], [2000, 0]]], []), ('normal control', [[[7777, 7779]], [[5000, 4000], [6000, 4001]]], [])], [('regression: intercept anchor', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('regression variant: intercept anchor', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair probe: intercept anchor', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('partial repair variant: intercept anchor', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('normal control', [[[7777, 7778], [0, 2500]], [[1000, 1000], [2000, 0]]], []), ('normal control', [[[8367, 9367]], [[1000, 1500], [1003, 503]]], []), ('normal control', [[[999, 1001], [1, 501], [1500, 1502], [0, 3]], [[0, 1000], [1000, 500]]], [])], [('regression: intercept anchor', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('regression variant: intercept anchor', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair probe: intercept anchor', [[[999, 1999], [1, 2501], [7777, 8277], [250, 253]], [[0, -1000], [3, 503]]], [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]]), ('partial repair variant: intercept anchor', [[[7777, 7780], [6684, 6687], [0, 500], [999, 3499]], [[0, -1000], [3, 1503]]], [[6487610, 6490113], [5575684, 5578187], [0, 416167], [832499, 2918332]]), ('normal control', [[[250, 253], [1500, 1502], [999, 1499], [999, 1001]], [[1000, 2000], [1003, 1503]]], []), ('normal control', [[[999, 1999], [1, 501], [0, 1]], [[10000, 10000], [10003, 8003]]], []), ('normal control', [[[1500, 1501]], [[1000, 1500], [2000, 1501]]], [])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression: intercept anchor | [[500, 1000]] | [] | Failed |
| regression variant: intercept anchor | [[1, 2], [1, 2], [1500, 1501], [250, 253]] | [[1001, 1002], [1001, 1002], [2500, 2501], [1250, 1253]] | Failed |
| partial repair probe: intercept anchor | [[2, 3]] | [[1, 2]] | Failed |
| partial repair variant: intercept anchor | [[9501, 10551]] | [[0, 51]] | Failed |
| normal control | [] | [] | Passed |
| normal control | [] | [] | Passed |
| normal control | [] | [] | Passed |
SHA-256 / 1da20e84b3bf2e071a7204fda667ae3448d4d8449cc3fe3feb6f05b235b47da2
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(cues, anchors):
(a1,b1),(a2,b2)=anchors
k=Fraction(b2-b1,a2-a1)
def m(t):
return math.floor(b1+(t-a1)*k+Fraction(1,2))
out=[]
for s,e in cues:
ns,ne=max(0,m(s)),max(0,m(e))
if ne>ns:
out.append([ns,ne])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: intercept anchor', [[[0, 1000]], [[1000, 0], [3000, 1000]]], []), ('regression variant: intercept anchor', [[[1, 2], [1, 2], [1500, 1501], [250, 253]], [[11000, 12000], [10000, 11000]]], [[1001, 1002], [1001, 1002], [2500, 2501], [1250, 1253]]), ('partial repair probe: intercept anchor', [[[1, 3]], [[0, 0], [2, 1]]], [[1, 2]]), ('partial repair variant: intercept anchor', [[[1, 1001]], [[0, -1000], [10000, 9500]]], [[0, 51]]), ('normal control', [[[7777, 10277]], [[5000, 6000], [5003, 4503]]], []), ('normal control', [[[250, 251], [8492, 8493]], [[5000, 5500], [9000, 7000]]], []), ('normal control', [[[7777, 7779], [1500, 1503]], [[1000, 1000], [2000, 0]]], [])], [('regression: intercept anchor', [[[999, 1002], [999, 1999], [7777, 8277]], [[1000, 1500], [2000, 2000]]], [[1500, 1501], [1500, 2000], [4889, 5139]]), ('regression variant: intercept anchor', [[[3231, 3731], [1, 1001], [1500, 1501]], [[3, 1003], [0, -3000]]], [[4308231, 4975398], [0, 1332668], [1998500, 1999834]]), ('partial repair probe: intercept anchor', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('partial repair variant: intercept anchor', [[[1500, 4000], [0, 1000]], [[3, 1503], [0, -3000]]], [[2248500, 6001000], [0, 1498000]]), ('normal control', [[[7777, 8777], [7777, 7779]], [[0, 500], [1000, -1000]]], []), ('normal control', [[[250, 252]], [[10000, 10500], [11000, 10501]]], []), ('normal control', [[[7777, 8777], [3213, 3214], [1500, 1501], [250, 750]], [[5000, 6000], [5003, 5003]]], [])], [('regression: intercept anchor', [[[250, 2750], [0, 3]], [[5000, 4000], [6000, 5500]]], [[0, 625]]), ('regression variant: intercept anchor', [[[1500, 4000], [0, 1000]], [[3, 1503], [0, -3000]]], [[2248500, 6001000], [0, 1498000]]), ('partial repair probe: intercept anchor', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('partial repair variant: intercept anchor', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('normal control', [[[1500, 4000], [6431, 6931], [1, 1001], [862, 1862]], [[2000, 1500], [1000, 2000]]], []), ('normal control', [[[0, 500], [1500, 1502]], [[1000, 1500], [2000, 0]]], []), ('normal control', [[[7777, 7779]], [[5000, 4000], [6000, 4001]]], [])], [('regression: intercept anchor', [[[999, 1001], [7777, 7779], [1500, 2000], [250, 251]], [[3000, 1000], [1000, 0]]], [[0, 1], [3389, 3390], [250, 500]]), ('regression variant: intercept anchor', [[[7782, 10282], [7777, 7780], [250, 252], [1500, 2000]], [[1000, 2000], [3000, 2500]]], [[3696, 4321], [3694, 3695], [2125, 2250]]), ('partial repair probe: intercept anchor', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('partial repair variant: intercept anchor', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('normal control', [[[7777, 7778], [0, 2500]], [[1000, 1000], [2000, 0]]], []), ('normal control', [[[8367, 9367]], [[1000, 1500], [1003, 503]]], []), ('normal control', [[[999, 1001], [1, 501], [1500, 1502], [0, 3]], [[0, 1000], [1000, 500]]], [])], [('regression: intercept anchor', [[[7777, 8277], [1523, 1524]], [[5000, 6000], [9000, 10500]]], [[9124, 9687], [2088, 2090]]), ('regression variant: intercept anchor', [[[1, 1001], [1500, 1503]], [[1000, 500], [0, 0]]], [[1, 501], [750, 752]]), ('partial repair probe: intercept anchor', [[[999, 1999], [1, 2501], [7777, 8277], [250, 253]], [[0, -1000], [3, 503]]], [[499499, 1000499], [0, 1252001], [3895277, 4145777], [124250, 125753]]), ('partial repair variant: intercept anchor', [[[7777, 7780], [6684, 6687], [0, 500], [999, 3499]], [[0, -1000], [3, 1503]]], [[6487610, 6490113], [5575684, 5578187], [0, 416167], [832499, 2918332]]), ('normal control', [[[250, 253], [1500, 1502], [999, 1499], [999, 1001]], [[1000, 2000], [1003, 1503]]], []), ('normal control', [[[999, 1999], [1, 501], [0, 1]], [[10000, 10000], [10003, 8003]]], []), ('normal control', [[[1500, 1501]], [[1000, 1500], [2000, 1501]]], [])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression: intercept anchor | [] | [] | Passed |
| regression variant: intercept anchor | [[1001, 1002], [1001, 1002], [2500, 2501], [1250, 1253]] | [[1001, 1002], [1001, 1002], [2500, 2501], [1250, 1253]] | Passed |
| partial repair probe: intercept anchor | [[1, 2]] | [[1, 2]] | Passed |
| partial repair variant: intercept anchor | [[0, 51]] | [[0, 51]] | Passed |
| normal control | [] | [] | Passed |
| normal control | [] | [] | Passed |
| normal control | [] | [] | Passed |
SHA-256 / afc1e1ee700e655f7adaa1c81c470fd797737321cd12de56340df581db48999d
Verification & scope
A deterministic bounded teaching model with a stipulated toy contract; it does not claim conformance to any subtitle standard. 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:49:31.980064+00:00.
Case digest / 33691b86b0edd1b20d58a0b267a8ebf8b99a923a1508ad81ee7dc267ef1eeac8