FA-78131 / Subtitle cue timing / Open access
Proportional cue splitting: piece contiguity · case 01
Split pieces are separated by one-millisecond holes.
ROOT CAUSE
The next piece starts one millisecond after the previous boundary.
THE FAILURE
The next piece starts one millisecond after the previous boundary.
Unsuccessful approach: Starting one millisecond early makes adjacent pieces overlap.
Case contract
Split cue [start,end] into len(parts) consecutive cues. Each part weighs max(1, len(part.strip())). Boundary after part k is start + floor(dur * cumulative_weight_k / total_weight); pieces are contiguous and the last ends at end. Output [s,e,part.strip()].
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
N = 1
observations = []
def solve(cue, parts):
start,end=cue
w=[max(1,len(p.strip())) for p in parts]
total=sum(w)
dur=end-start
out=[]
acc=0
prev=start
for p,x in zip(parts,w):
acc+=x
b=start+dur*acc//total
out.append([prev,b,p.strip()])
prev=b+1
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: piece contiguity', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('regression variant: piece contiguity', [[1000, 1007], ['a', 'xyz', 'friend', 'a']], [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']]), ('partial repair probe: piece contiguity', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('partial repair variant: piece contiguity', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('normal control', [[0, 2500], ['xyz']], [[0, 2500, 'xyz']]), ('normal control', [[1000, 1999], ['a']], [[1000, 1999, 'a']]), ('normal control', [[1000, 1999], [' ']], [[1000, 1999, '']])], [('regression: piece contiguity', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('regression variant: piece contiguity', [[1000, 1999], ['Longer chunk of text', 'xyz']], [[1000, 1868, 'Longer chunk of text'], [1868, 1999, 'xyz']]), ('partial repair probe: piece contiguity', [[100, 1100], [' x ', 'y']], [[100, 600, 'x'], [600, 1100, 'y']]), ('partial repair variant: piece contiguity', [[1000, 1999], ['ok ', ' ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('normal control', [[1000, 2000], ['a']], [[1000, 2000, 'a']]), ('normal control', [[1000, 3500], ['Hello']], [[1000, 3500, 'Hello']]), ('normal control', [[12345, 12352], ['xyz']], [[12345, 12352, 'xyz']])], [('regression: piece contiguity', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('regression variant: piece contiguity', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('partial repair probe: piece contiguity', [[0, 7], ['friend', 'Hello', 'ok ']], [[0, 3, 'friend'], [3, 5, 'Hello'], [5, 7, 'ok']]), ('partial repair variant: piece contiguity', [[12345, 13344], ['ok ', 'ok ', ' ']], [[12345, 12744, 'ok'], [12744, 13144, 'ok'], [13144, 13344, '']]), ('normal control', [[12345, 12445], ['a']], [[12345, 12445, 'a']]), ('normal control', [[12345, 13345], ['xyz']], [[12345, 13345, 'xyz']]), ('normal control', [[0, 999], ['ok ']], [[0, 999, 'ok']])], [('regression: piece contiguity', [[100, 1100], [' x ', 'y']], [[100, 600, 'x'], [600, 1100, 'y']]), ('regression variant: piece contiguity', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('partial repair probe: piece contiguity', [[1000, 1007], ['a', 'xyz', 'friend', 'a']], [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']]), ('partial repair variant: piece contiguity', [[1000, 1100], [' there ', 'ok ', 'Longer chunk of text']], [[1000, 1018, 'there'], [1018, 1025, 'ok'], [1025, 1100, 'Longer chunk of text']]), ('normal control', [[12345, 13345], [' ']], [[12345, 13345, '']]), ('normal control', [[1000, 1007], ['friend']], [[1000, 1007, 'friend']]), ('normal control', [[1000, 1007], [' there ']], [[1000, 1007, 'there']])], [('regression: piece contiguity', [[0, 7], ['friend', 'Hello', 'ok ']], [[0, 3, 'friend'], [3, 5, 'Hello'], [5, 7, 'ok']]), ('regression variant: piece contiguity', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair probe: piece contiguity', [[1000, 1999], ['Longer chunk of text', 'xyz']], [[1000, 1868, 'Longer chunk of text'], [1868, 1999, 'xyz']]), ('partial repair variant: piece contiguity', [[0, 100], ['a', 'xyz', 'Longer chunk of text']], [[0, 4, 'a'], [4, 16, 'xyz'], [16, 100, 'Longer chunk of text']]), ('normal control', [[12345, 13345], ['ok ']], [[12345, 13345, 'ok']]), ('normal control', [[0, 1000], ['Longer chunk of text']], [[0, 1000, 'Longer chunk of text']]), ('normal control', [[12345, 14845], [' there ']], [[12345, 14845, 'there']])]]
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: piece contiguity | [[0, 500, 'ab'], [501, 1000, 'cd']] | [[0, 500, 'ab'], [500, 1000, 'cd']] | Failed |
| regression variant: piece contiguity | [[1000, 1000, 'a'], [1001, 1002, 'xyz'], [1003, 1006, 'friend'], [1007, 1007, 'a']] | [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']] | Failed |
| partial repair probe: piece contiguity | [[0, 3, 'abc'], [4, 5, 'de'], [6, 7, 'f']] | [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']] | Failed |
| partial repair variant: piece contiguity | [[1000, 1285, 'ok'], [1286, 1999, 'Hello']] | [[1000, 1285, 'ok'], [1285, 1999, 'Hello']] | Failed |
| normal control | [[0, 2500, 'xyz']] | [[0, 2500, 'xyz']] | Passed |
| normal control | [[1000, 1999, 'a']] | [[1000, 1999, 'a']] | Passed |
| normal control | [[1000, 1999, '']] | [[1000, 1999, '']] | Passed |
SHA-256 / 2ec574110fd7dab35f266b0438283425783df5028a74da6fbc6e7ac248243c22
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cue, parts):
start,end=cue
w=[max(1,len(p.strip())) for p in parts]
total=sum(w)
dur=end-start
out=[]
acc=0
prev=start
for p,x in zip(parts,w):
acc+=x
b=start+dur*acc//total
out.append([prev,b,p.strip()])
prev=b-1
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: piece contiguity', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('regression variant: piece contiguity', [[1000, 1007], ['a', 'xyz', 'friend', 'a']], [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']]), ('partial repair probe: piece contiguity', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('partial repair variant: piece contiguity', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('normal control', [[0, 2500], ['xyz']], [[0, 2500, 'xyz']]), ('normal control', [[1000, 1999], ['a']], [[1000, 1999, 'a']]), ('normal control', [[1000, 1999], [' ']], [[1000, 1999, '']])], [('regression: piece contiguity', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('regression variant: piece contiguity', [[1000, 1999], ['Longer chunk of text', 'xyz']], [[1000, 1868, 'Longer chunk of text'], [1868, 1999, 'xyz']]), ('partial repair probe: piece contiguity', [[100, 1100], [' x ', 'y']], [[100, 600, 'x'], [600, 1100, 'y']]), ('partial repair variant: piece contiguity', [[1000, 1999], ['ok ', ' ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('normal control', [[1000, 2000], ['a']], [[1000, 2000, 'a']]), ('normal control', [[1000, 3500], ['Hello']], [[1000, 3500, 'Hello']]), ('normal control', [[12345, 12352], ['xyz']], [[12345, 12352, 'xyz']])], [('regression: piece contiguity', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('regression variant: piece contiguity', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('partial repair probe: piece contiguity', [[0, 7], ['friend', 'Hello', 'ok ']], [[0, 3, 'friend'], [3, 5, 'Hello'], [5, 7, 'ok']]), ('partial repair variant: piece contiguity', [[12345, 13344], ['ok ', 'ok ', ' ']], [[12345, 12744, 'ok'], [12744, 13144, 'ok'], [13144, 13344, '']]), ('normal control', [[12345, 12445], ['a']], [[12345, 12445, 'a']]), ('normal control', [[12345, 13345], ['xyz']], [[12345, 13345, 'xyz']]), ('normal control', [[0, 999], ['ok ']], [[0, 999, 'ok']])], [('regression: piece contiguity', [[100, 1100], [' x ', 'y']], [[100, 600, 'x'], [600, 1100, 'y']]), ('regression variant: piece contiguity', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('partial repair probe: piece contiguity', [[1000, 1007], ['a', 'xyz', 'friend', 'a']], [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']]), ('partial repair variant: piece contiguity', [[1000, 1100], [' there ', 'ok ', 'Longer chunk of text']], [[1000, 1018, 'there'], [1018, 1025, 'ok'], [1025, 1100, 'Longer chunk of text']]), ('normal control', [[12345, 13345], [' ']], [[12345, 13345, '']]), ('normal control', [[1000, 1007], ['friend']], [[1000, 1007, 'friend']]), ('normal control', [[1000, 1007], [' there ']], [[1000, 1007, 'there']])], [('regression: piece contiguity', [[0, 7], ['friend', 'Hello', 'ok ']], [[0, 3, 'friend'], [3, 5, 'Hello'], [5, 7, 'ok']]), ('regression variant: piece contiguity', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair probe: piece contiguity', [[1000, 1999], ['Longer chunk of text', 'xyz']], [[1000, 1868, 'Longer chunk of text'], [1868, 1999, 'xyz']]), ('partial repair variant: piece contiguity', [[0, 100], ['a', 'xyz', 'Longer chunk of text']], [[0, 4, 'a'], [4, 16, 'xyz'], [16, 100, 'Longer chunk of text']]), ('normal control', [[12345, 13345], ['ok ']], [[12345, 13345, 'ok']]), ('normal control', [[0, 1000], ['Longer chunk of text']], [[0, 1000, 'Longer chunk of text']]), ('normal control', [[12345, 14845], [' there ']], [[12345, 14845, 'there']])]]
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: piece contiguity | [[0, 500, 'ab'], [499, 1000, 'cd']] | [[0, 500, 'ab'], [500, 1000, 'cd']] | Failed |
| regression variant: piece contiguity | [[1000, 1000, 'a'], [999, 1002, 'xyz'], [1001, 1006, 'friend'], [1005, 1007, 'a']] | [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']] | Failed |
| partial repair probe: piece contiguity | [[0, 3, 'abc'], [2, 5, 'de'], [4, 7, 'f']] | [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']] | Failed |
| partial repair variant: piece contiguity | [[1000, 1285, 'ok'], [1284, 1999, 'Hello']] | [[1000, 1285, 'ok'], [1285, 1999, 'Hello']] | Failed |
| normal control | [[0, 2500, 'xyz']] | [[0, 2500, 'xyz']] | Passed |
| normal control | [[1000, 1999, 'a']] | [[1000, 1999, 'a']] | Passed |
| normal control | [[1000, 1999, '']] | [[1000, 1999, '']] | Passed |
SHA-256 / c6b023711c561352bf9e926f74ea214d53b8e812e1a01d37b7521b7f6df1b2d1
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:32.446447+00:00.
Case digest / b094d1991e9e227e99f3031869cc22a52ad25a24adaaaecf7eee0a2c2a2823b2