FA-78321 / Subtitle cue timing / Open access
Subtitle conform to an edit cut list: shift accumulation · case 01
Cues after two or more cuts are shifted by only the most recent cut.
ROOT CAUSE
The removed length replaces instead of accumulating.
VERIFIED REPAIR
Accumulate every removed length before the time.
Unsuccessful approach: Treating the cut end as inclusive under-shifts by one millisecond per cut.
Case contract
Cuts [a,b) are removed from the programme (they may overlap or be unsorted and are merged first). A time after a cut shifts left by the removed length; a time inside a cut maps to the cut point. Cues [start,end,text] are mapped and dropped when the mapped end is not after the mapped start.
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(cues, cuts):
merged=[]
for a,b in sorted(cuts):
if merged and a<=merged[-1][1]:
merged[-1][1]=max(merged[-1][1],b)
else:
merged.append([a,b])
def mapt(t):
shift=0
for a,b in merged:
if t>=b:
shift=b-a
elif t>a:
return a-shift
return t-shift
out=[]
for s,e,txt in cues:
ns,ne=mapt(s),mapt(e)
if ne>ns:
out.append([ns,ne,txt])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: shift accumulation', [[[3000, 3500, 'a']], [[0, 500], [1000, 2000]]], [[1500, 2000, 'a']]), ('regression variant: shift accumulation', [[[4000, 4300, 'c0'], [1200, 3200, 'c1']], [[1500, 2000], [0, 100]]], [[3400, 3700, 'c0'], [1100, 2600, 'c1']]), ('partial repair probe: shift accumulation', [[[2000, 3000, 'x']], [[1000, 1500], [1200, 1800]]], [[1200, 2200, 'x']]), ('partial repair variant: shift accumulation', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 1000, 'c0'], [200, 2200, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']], [[2000, 2500]]], [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']]), ('normal control', [[[200, 300, 'c0'], [1600, 3600, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']], [[3000, 4500]]], [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']]), ('normal control', [[[0, 2000, 'c0'], [0, 300, 'c1']], []], [[0, 2000, 'c0'], [0, 300, 'c1']])], [('regression: shift accumulation', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('regression variant: shift accumulation', [[[1600, 2400, 'c0'], [0, 2000, 'c1']], [[0, 100], [500, 1000]]], [[1000, 1800, 'c0'], [0, 1400, 'c1']]), ('partial repair probe: shift accumulation', [[[600, 2600, 'c0'], [2500, 3300, 'c1'], [0, 2000, 'c2']], [[1000, 1100]]], [[600, 2500, 'c0'], [2400, 3200, 'c1'], [0, 1900, 'c2']]), ('partial repair variant: shift accumulation', [[[900, 1700, 'c0'], [2500, 3300, 'c1'], [1200, 2000, 'c2']], [[1000, 2500]]], [[900, 1000, 'c0'], [1000, 1800, 'c1']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2800, 'c0'], [600, 1400, 'c1']], []], [[2500, 2800, 'c0'], [600, 1400, 'c1']]), ('normal control', [[[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']], []], [[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']]), ('normal control', [[[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']], []], [[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']])], [('regression: shift accumulation', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('regression variant: shift accumulation', [[[2500, 4500, 'c0'], [1200, 1300, 'c1']], [[2000, 2500], [3000, 4000]]], [[2000, 3000, 'c0'], [1200, 1300, 'c1']]), ('partial repair probe: shift accumulation', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('partial repair variant: shift accumulation', [[[900, 1200, 'c0'], [2500, 3300, 'c1']], [[2000, 2500]]], [[900, 1200, 'c0'], [2000, 2800, 'c1']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[900, 2900, 'c0'], [3200, 3500, 'c1'], [2500, 2800, 'c2']], [[1500, 3000], [3000, 4000]]], [[900, 1500, 'c0']]), ('normal control', [[[200, 1000, 'c0']], [[500, 1000], [0, 1000], [1000, 1500]]], []), ('normal control', [[[900, 1200, 'c0'], [900, 1700, 'c1']], []], [[900, 1200, 'c0'], [900, 1700, 'c1']])], [('regression: shift accumulation', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('regression variant: shift accumulation', [[[0, 300, 'c0'], [200, 1000, 'c1'], [2500, 3300, 'c2']], [[2000, 2100], [1500, 1600], [500, 1500]]], [[0, 300, 'c0'], [200, 500, 'c1'], [1300, 2100, 'c2']]), ('partial repair probe: shift accumulation', [[[3200, 5200, 'c0'], [1200, 1300, 'c1']], [[500, 2000], [2000, 2100], [1500, 1600]]], [[1600, 3600, 'c0']]), ('partial repair variant: shift accumulation', [[[1600, 1900, 'c0'], [2500, 3300, 'c1'], [1600, 1900, 'c2'], [4000, 6000, 'c3']], [[500, 2000], [0, 1000]]], [[500, 1300, 'c1'], [2000, 4000, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 2200, 'c0'], [2500, 2800, 'c1'], [1200, 1500, 'c2'], [2500, 3300, 'c3']], []], [[200, 2200, 'c0'], [2500, 2800, 'c1'], [1200, 1500, 'c2'], [2500, 3300, 'c3']]), ('normal control', [[[1600, 1700, 'c0'], [1600, 2400, 'c1'], [1600, 1700, 'c2']], [[1500, 2500]]], []), ('normal control', [[[900, 2900, 'c0'], [200, 500, 'c1'], [1200, 1300, 'c2'], [200, 500, 'c3']], []], [[900, 2900, 'c0'], [200, 500, 'c1'], [1200, 1300, 'c2'], [200, 500, 'c3']])], [('regression: shift accumulation', [[[900, 1000, 'c0'], [600, 2600, 'c1'], [4000, 4100, 'c2'], [900, 2900, 'c3']], [[1000, 1500], [2000, 2100], [2000, 2500]]], [[900, 1000, 'c0'], [600, 1600, 'c1'], [3000, 3100, 'c2'], [900, 1900, 'c3']]), ('regression variant: shift accumulation', [[[4000, 4300, 'c0'], [4000, 4100, 'c1'], [4000, 4300, 'c2']], [[2000, 3000], [1000, 1100]]], [[2900, 3200, 'c0'], [2900, 3000, 'c1'], [2900, 3200, 'c2']]), ('partial repair probe: shift accumulation', [[[2500, 4500, 'c0'], [4000, 6000, 'c1'], [900, 2900, 'c2'], [200, 2200, 'c3']], [[500, 600], [500, 1000]]], [[2000, 4000, 'c0'], [3500, 5500, 'c1'], [500, 2400, 'c2'], [200, 1700, 'c3']]), ('partial repair variant: shift accumulation', [[[600, 700, 'c0'], [3200, 3500, 'c1'], [600, 1400, 'c2'], [200, 2200, 'c3']], [[1500, 2500]]], [[600, 700, 'c0'], [2200, 2500, 'c1'], [600, 1400, 'c2'], [200, 1500, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 300, 'c0'], [3200, 3500, 'c1'], [2500, 2600, 'c2']], []], [[200, 300, 'c0'], [3200, 3500, 'c1'], [2500, 2600, 'c2']]), ('normal control', [[[4000, 4300, 'c0']], [[3000, 3500], [3000, 4500], [500, 2000]]], []), ('normal control', [[[1200, 1500, 'c0']], [[1000, 1500], [1500, 2000]]], [])]]
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: shift accumulation | [[2000, 2500, 'a']] | [[1500, 2000, 'a']] | Failed |
| regression variant: shift accumulation | [[3500, 3800, 'c0'], [1100, 2700, 'c1']] | [[3400, 3700, 'c0'], [1100, 2600, 'c1']] | Failed |
| partial repair probe: shift accumulation | [[1200, 2200, 'x']] | [[1200, 2200, 'x']] | Passed |
| partial repair variant: shift accumulation | [[3100, 5100, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']] | [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']] | Failed |
| boundary control | [] | [] | Passed |
| normal control | [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']] | [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']] | Passed |
| normal control | [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']] | [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']] | Passed |
| normal control | [[0, 2000, 'c0'], [0, 300, 'c1']] | [[0, 2000, 'c0'], [0, 300, 'c1']] | Passed |
SHA-256 / 8bab5c76360194d245bb275d934150a55a02ff10fbd862f462ddc3f4145e7626
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cues, cuts):
merged=[]
for a,b in sorted(cuts):
if merged and a<=merged[-1][1]:
merged[-1][1]=max(merged[-1][1],b)
else:
merged.append([a,b])
def mapt(t):
shift=0
for a,b in merged:
if t>=b:
shift+=b-a-1
elif t>a:
return a-shift
return t-shift
out=[]
for s,e,txt in cues:
ns,ne=mapt(s),mapt(e)
if ne>ns:
out.append([ns,ne,txt])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: shift accumulation', [[[3000, 3500, 'a']], [[0, 500], [1000, 2000]]], [[1500, 2000, 'a']]), ('regression variant: shift accumulation', [[[4000, 4300, 'c0'], [1200, 3200, 'c1']], [[1500, 2000], [0, 100]]], [[3400, 3700, 'c0'], [1100, 2600, 'c1']]), ('partial repair probe: shift accumulation', [[[2000, 3000, 'x']], [[1000, 1500], [1200, 1800]]], [[1200, 2200, 'x']]), ('partial repair variant: shift accumulation', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 1000, 'c0'], [200, 2200, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']], [[2000, 2500]]], [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']]), ('normal control', [[[200, 300, 'c0'], [1600, 3600, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']], [[3000, 4500]]], [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']]), ('normal control', [[[0, 2000, 'c0'], [0, 300, 'c1']], []], [[0, 2000, 'c0'], [0, 300, 'c1']])], [('regression: shift accumulation', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('regression variant: shift accumulation', [[[1600, 2400, 'c0'], [0, 2000, 'c1']], [[0, 100], [500, 1000]]], [[1000, 1800, 'c0'], [0, 1400, 'c1']]), ('partial repair probe: shift accumulation', [[[600, 2600, 'c0'], [2500, 3300, 'c1'], [0, 2000, 'c2']], [[1000, 1100]]], [[600, 2500, 'c0'], [2400, 3200, 'c1'], [0, 1900, 'c2']]), ('partial repair variant: shift accumulation', [[[900, 1700, 'c0'], [2500, 3300, 'c1'], [1200, 2000, 'c2']], [[1000, 2500]]], [[900, 1000, 'c0'], [1000, 1800, 'c1']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2800, 'c0'], [600, 1400, 'c1']], []], [[2500, 2800, 'c0'], [600, 1400, 'c1']]), ('normal control', [[[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']], []], [[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']]), ('normal control', [[[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']], []], [[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']])], [('regression: shift accumulation', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('regression variant: shift accumulation', [[[2500, 4500, 'c0'], [1200, 1300, 'c1']], [[2000, 2500], [3000, 4000]]], [[2000, 3000, 'c0'], [1200, 1300, 'c1']]), ('partial repair probe: shift accumulation', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('partial repair variant: shift accumulation', [[[900, 1200, 'c0'], [2500, 3300, 'c1']], [[2000, 2500]]], [[900, 1200, 'c0'], [2000, 2800, 'c1']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[900, 2900, 'c0'], [3200, 3500, 'c1'], [2500, 2800, 'c2']], [[1500, 3000], [3000, 4000]]], [[900, 1500, 'c0']]), ('normal control', [[[200, 1000, 'c0']], [[500, 1000], [0, 1000], [1000, 1500]]], []), ('normal control', [[[900, 1200, 'c0'], [900, 1700, 'c1']], []], [[900, 1200, 'c0'], [900, 1700, 'c1']])], [('regression: shift accumulation', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('regression variant: shift accumulation', [[[0, 300, 'c0'], [200, 1000, 'c1'], [2500, 3300, 'c2']], [[2000, 2100], [1500, 1600], [500, 1500]]], [[0, 300, 'c0'], [200, 500, 'c1'], [1300, 2100, 'c2']]), ('partial repair probe: shift accumulation', [[[3200, 5200, 'c0'], [1200, 1300, 'c1']], [[500, 2000], [2000, 2100], [1500, 1600]]], [[1600, 3600, 'c0']]), ('partial repair variant: shift accumulation', [[[1600, 1900, 'c0'], [2500, 3300, 'c1'], [1600, 1900, 'c2'], [4000, 6000, 'c3']], [[500, 2000], [0, 1000]]], [[500, 1300, 'c1'], [2000, 4000, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 2200, 'c0'], [2500, 2800, 'c1'], [1200, 1500, 'c2'], [2500, 3300, 'c3']], []], [[200, 2200, 'c0'], [2500, 2800, 'c1'], [1200, 1500, 'c2'], [2500, 3300, 'c3']]), ('normal control', [[[1600, 1700, 'c0'], [1600, 2400, 'c1'], [1600, 1700, 'c2']], [[1500, 2500]]], []), ('normal control', [[[900, 2900, 'c0'], [200, 500, 'c1'], [1200, 1300, 'c2'], [200, 500, 'c3']], []], [[900, 2900, 'c0'], [200, 500, 'c1'], [1200, 1300, 'c2'], [200, 500, 'c3']])], [('regression: shift accumulation', [[[900, 1000, 'c0'], [600, 2600, 'c1'], [4000, 4100, 'c2'], [900, 2900, 'c3']], [[1000, 1500], [2000, 2100], [2000, 2500]]], [[900, 1000, 'c0'], [600, 1600, 'c1'], [3000, 3100, 'c2'], [900, 1900, 'c3']]), ('regression variant: shift accumulation', [[[4000, 4300, 'c0'], [4000, 4100, 'c1'], [4000, 4300, 'c2']], [[2000, 3000], [1000, 1100]]], [[2900, 3200, 'c0'], [2900, 3000, 'c1'], [2900, 3200, 'c2']]), ('partial repair probe: shift accumulation', [[[2500, 4500, 'c0'], [4000, 6000, 'c1'], [900, 2900, 'c2'], [200, 2200, 'c3']], [[500, 600], [500, 1000]]], [[2000, 4000, 'c0'], [3500, 5500, 'c1'], [500, 2400, 'c2'], [200, 1700, 'c3']]), ('partial repair variant: shift accumulation', [[[600, 700, 'c0'], [3200, 3500, 'c1'], [600, 1400, 'c2'], [200, 2200, 'c3']], [[1500, 2500]]], [[600, 700, 'c0'], [2200, 2500, 'c1'], [600, 1400, 'c2'], [200, 1500, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 300, 'c0'], [3200, 3500, 'c1'], [2500, 2600, 'c2']], []], [[200, 300, 'c0'], [3200, 3500, 'c1'], [2500, 2600, 'c2']]), ('normal control', [[[4000, 4300, 'c0']], [[3000, 3500], [3000, 4500], [500, 2000]]], []), ('normal control', [[[1200, 1500, 'c0']], [[1000, 1500], [1500, 2000]]], [])]]
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: shift accumulation | [[1502, 2002, 'a']] | [[1500, 2000, 'a']] | Failed |
| regression variant: shift accumulation | [[3402, 3702, 'c0'], [1101, 2602, 'c1']] | [[3400, 3700, 'c0'], [1100, 2600, 'c1']] | Failed |
| partial repair probe: shift accumulation | [[1201, 2201, 'x']] | [[1200, 2200, 'x']] | Failed |
| partial repair variant: shift accumulation | [[3002, 5002, 'c0'], [200, 2101, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']] | [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']] | Failed |
| boundary control | [] | [] | Passed |
| normal control | [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']] | [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']] | Passed |
| normal control | [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']] | [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']] | Passed |
| normal control | [[0, 2000, 'c0'], [0, 300, 'c1']] | [[0, 2000, 'c0'], [0, 300, 'c1']] | Passed |
SHA-256 / c80df9c61660e559cc7b2fafa1d9f7c107a705ce4f930efe695306bd11dcaed9
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cues, cuts):
merged=[]
for a,b in sorted(cuts):
if merged and a<=merged[-1][1]:
merged[-1][1]=max(merged[-1][1],b)
else:
merged.append([a,b])
def mapt(t):
shift=0
for a,b in merged:
if t>=b:
shift+=b-a
elif t>a:
return a-shift
return t-shift
out=[]
for s,e,txt in cues:
ns,ne=mapt(s),mapt(e)
if ne>ns:
out.append([ns,ne,txt])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: shift accumulation', [[[3000, 3500, 'a']], [[0, 500], [1000, 2000]]], [[1500, 2000, 'a']]), ('regression variant: shift accumulation', [[[4000, 4300, 'c0'], [1200, 3200, 'c1']], [[1500, 2000], [0, 100]]], [[3400, 3700, 'c0'], [1100, 2600, 'c1']]), ('partial repair probe: shift accumulation', [[[2000, 3000, 'x']], [[1000, 1500], [1200, 1800]]], [[1200, 2200, 'x']]), ('partial repair variant: shift accumulation', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 1000, 'c0'], [200, 2200, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']], [[2000, 2500]]], [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']]), ('normal control', [[[200, 300, 'c0'], [1600, 3600, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']], [[3000, 4500]]], [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']]), ('normal control', [[[0, 2000, 'c0'], [0, 300, 'c1']], []], [[0, 2000, 'c0'], [0, 300, 'c1']])], [('regression: shift accumulation', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('regression variant: shift accumulation', [[[1600, 2400, 'c0'], [0, 2000, 'c1']], [[0, 100], [500, 1000]]], [[1000, 1800, 'c0'], [0, 1400, 'c1']]), ('partial repair probe: shift accumulation', [[[600, 2600, 'c0'], [2500, 3300, 'c1'], [0, 2000, 'c2']], [[1000, 1100]]], [[600, 2500, 'c0'], [2400, 3200, 'c1'], [0, 1900, 'c2']]), ('partial repair variant: shift accumulation', [[[900, 1700, 'c0'], [2500, 3300, 'c1'], [1200, 2000, 'c2']], [[1000, 2500]]], [[900, 1000, 'c0'], [1000, 1800, 'c1']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2800, 'c0'], [600, 1400, 'c1']], []], [[2500, 2800, 'c0'], [600, 1400, 'c1']]), ('normal control', [[[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']], []], [[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']]), ('normal control', [[[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']], []], [[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']])], [('regression: shift accumulation', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('regression variant: shift accumulation', [[[2500, 4500, 'c0'], [1200, 1300, 'c1']], [[2000, 2500], [3000, 4000]]], [[2000, 3000, 'c0'], [1200, 1300, 'c1']]), ('partial repair probe: shift accumulation', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('partial repair variant: shift accumulation', [[[900, 1200, 'c0'], [2500, 3300, 'c1']], [[2000, 2500]]], [[900, 1200, 'c0'], [2000, 2800, 'c1']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[900, 2900, 'c0'], [3200, 3500, 'c1'], [2500, 2800, 'c2']], [[1500, 3000], [3000, 4000]]], [[900, 1500, 'c0']]), ('normal control', [[[200, 1000, 'c0']], [[500, 1000], [0, 1000], [1000, 1500]]], []), ('normal control', [[[900, 1200, 'c0'], [900, 1700, 'c1']], []], [[900, 1200, 'c0'], [900, 1700, 'c1']])], [('regression: shift accumulation', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('regression variant: shift accumulation', [[[0, 300, 'c0'], [200, 1000, 'c1'], [2500, 3300, 'c2']], [[2000, 2100], [1500, 1600], [500, 1500]]], [[0, 300, 'c0'], [200, 500, 'c1'], [1300, 2100, 'c2']]), ('partial repair probe: shift accumulation', [[[3200, 5200, 'c0'], [1200, 1300, 'c1']], [[500, 2000], [2000, 2100], [1500, 1600]]], [[1600, 3600, 'c0']]), ('partial repair variant: shift accumulation', [[[1600, 1900, 'c0'], [2500, 3300, 'c1'], [1600, 1900, 'c2'], [4000, 6000, 'c3']], [[500, 2000], [0, 1000]]], [[500, 1300, 'c1'], [2000, 4000, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 2200, 'c0'], [2500, 2800, 'c1'], [1200, 1500, 'c2'], [2500, 3300, 'c3']], []], [[200, 2200, 'c0'], [2500, 2800, 'c1'], [1200, 1500, 'c2'], [2500, 3300, 'c3']]), ('normal control', [[[1600, 1700, 'c0'], [1600, 2400, 'c1'], [1600, 1700, 'c2']], [[1500, 2500]]], []), ('normal control', [[[900, 2900, 'c0'], [200, 500, 'c1'], [1200, 1300, 'c2'], [200, 500, 'c3']], []], [[900, 2900, 'c0'], [200, 500, 'c1'], [1200, 1300, 'c2'], [200, 500, 'c3']])], [('regression: shift accumulation', [[[900, 1000, 'c0'], [600, 2600, 'c1'], [4000, 4100, 'c2'], [900, 2900, 'c3']], [[1000, 1500], [2000, 2100], [2000, 2500]]], [[900, 1000, 'c0'], [600, 1600, 'c1'], [3000, 3100, 'c2'], [900, 1900, 'c3']]), ('regression variant: shift accumulation', [[[4000, 4300, 'c0'], [4000, 4100, 'c1'], [4000, 4300, 'c2']], [[2000, 3000], [1000, 1100]]], [[2900, 3200, 'c0'], [2900, 3000, 'c1'], [2900, 3200, 'c2']]), ('partial repair probe: shift accumulation', [[[2500, 4500, 'c0'], [4000, 6000, 'c1'], [900, 2900, 'c2'], [200, 2200, 'c3']], [[500, 600], [500, 1000]]], [[2000, 4000, 'c0'], [3500, 5500, 'c1'], [500, 2400, 'c2'], [200, 1700, 'c3']]), ('partial repair variant: shift accumulation', [[[600, 700, 'c0'], [3200, 3500, 'c1'], [600, 1400, 'c2'], [200, 2200, 'c3']], [[1500, 2500]]], [[600, 700, 'c0'], [2200, 2500, 'c1'], [600, 1400, 'c2'], [200, 1500, 'c3']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[200, 300, 'c0'], [3200, 3500, 'c1'], [2500, 2600, 'c2']], []], [[200, 300, 'c0'], [3200, 3500, 'c1'], [2500, 2600, 'c2']]), ('normal control', [[[4000, 4300, 'c0']], [[3000, 3500], [3000, 4500], [500, 2000]]], []), ('normal control', [[[1200, 1500, 'c0']], [[1000, 1500], [1500, 2000]]], [])]]
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: shift accumulation | [[1500, 2000, 'a']] | [[1500, 2000, 'a']] | Passed |
| regression variant: shift accumulation | [[3400, 3700, 'c0'], [1100, 2600, 'c1']] | [[3400, 3700, 'c0'], [1100, 2600, 'c1']] | Passed |
| partial repair probe: shift accumulation | [[1200, 2200, 'x']] | [[1200, 2200, 'x']] | Passed |
| partial repair variant: shift accumulation | [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']] | [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']] | Passed |
| boundary control | [] | [] | Passed |
| normal control | [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']] | [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']] | Passed |
| normal control | [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']] | [[200, 300, 'c0'], [1600, 3000, 'c1'], [1200, 1500, 'c2'], [600, 900, 'c3']] | Passed |
| normal control | [[0, 2000, 'c0'], [0, 300, 'c1']] | [[0, 2000, 'c0'], [0, 300, 'c1']] | Passed |
SHA-256 / c1613182a670fab42e4f8ffb9d53f0fa76f6b289fed071705648dc99df77d330
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:34.076459+00:00.
Case digest / 0550fa983f2741352f163070fd2d8850fe506e2b81d335c8582ae21c828d90eb