FA-77991 / Subtitle cue timing / Open access
Minimum cue duration extension: extension base · case 01
Short cues become much longer than the minimum duration.
ROOT CAUSE
The extension target is measured from the current end rather than the start.
VERIFIED REPAIR
Extend to start + min_dur.
Unsuccessful approach: Subtracting the gap from the target shortens every isolated extended cue below the minimum.
Case contract
Cues [start,end] may be unsorted; the neighbour of a cue is the next cue in (start, input index) order. A cue shorter than min_dur has its end extended to start+min_dur, limited to neighbour_start - min_gap; an end is never shortened. Output keeps input order.
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, min_dur, min_gap):
out=[list(c) for c in cues]
order=sorted(range(len(out)),key=lambda k:(out[k][0],k))
for pos,i in enumerate(order):
c=out[i]
if c[1]-c[0]>=min_dur:
continue
target=c[1]+min_dur
if pos+1<len(order):
target=min(target,out[order[pos+1]][0]-min_gap)
c[1]=max(c[1],target)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: extension base', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('regression variant: extension base', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('partial repair probe: extension base', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('partial repair variant: extension base', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('normal control', [[[1000, 3000]], 1200, 0], [[1000, 3000]]), ('normal control', [[[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]], 1000, 40], [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]])], [('regression: extension base', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('regression variant: extension base', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('partial repair probe: extension base', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('partial repair variant: extension base', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[2000, 4000], [1500, 1600], [1500, 2699]], 1200, 80], [[2000, 4000], [1500, 1600], [1500, 2699]]), ('normal control', [[[1500, 3500]], 700, 0], [[1500, 3500]]), ('normal control', [[[1500, 1600], [1500, 1600], [2000, 3200], [3000, 5000]], 1200, 0], [[1500, 1600], [1500, 2000], [2000, 3200], [3000, 5000]])], [('regression: extension base', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('regression variant: extension base', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair probe: extension base', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('partial repair variant: extension base', [[[0, 1]], 1200, 40], [[0, 1200]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[1000, 1999], [1000, 3000]], 1000, 80], [[1000, 1999], [1000, 3000]]), ('normal control', [[[2000, 3000], [2000, 3000], [1000, 1100], [4355, 6355]], 1000, 0], [[2000, 3000], [2000, 3000], [1000, 2000], [4355, 6355]]), ('normal control', [[[500, 1500]], 1000, 0], [[500, 1500]])], [('regression: extension base', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('regression variant: extension base', [[[0, 2000], [200, 500]], 700, 80], [[0, 2000], [200, 900]]), ('partial repair probe: extension base', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('partial repair variant: extension base', [[[0, 2000], [200, 1160], [500, 1499], [1186, 1187], [2429, 3430]], 1000, 40], [[0, 2000], [200, 1160], [500, 1499], [1186, 2186], [2429, 3430]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[200, 901], [1000, 1100], [1000, 1701], [1000, 1701]], 700, 40], [[200, 901], [1000, 1100], [1000, 1701], [1000, 1701]]), ('normal control', [[[0, 300], [1000, 3000]], 1200, 0], [[0, 1000], [1000, 3000]]), ('normal control', [[[200, 2200], [1000, 2199], [2000, 2300], [3000, 3300], [3000, 4200]], 1200, 40], [[200, 2200], [1000, 2199], [2000, 2960], [3000, 3300], [3000, 4200]])], [('regression: extension base', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: extension base', [[[3000, 3700], [500, 501]], 700, 0], [[3000, 3700], [500, 1200]]), ('partial repair probe: extension base', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair variant: extension base', [[[800, 1999]], 1200, 40], [[800, 2000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[200, 2200], [500, 1701], [500, 2500]], 1200, 80], [[200, 2200], [500, 1701], [500, 2500]]), ('normal control', [[[800, 2800], [1500, 2700], [3000, 4201]], 1200, 0], [[800, 2800], [1500, 2700], [3000, 4201]]), ('normal control', [[[500, 1700], [1422, 3422], [1500, 1800], [2000, 3160], [3000, 4200]], 1200, 40], [[500, 1700], [1422, 3422], [1500, 1960], [2000, 3160], [3000, 4200]])]]
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: extension base | [[0, 1300], [2000, 3000]] | [[0, 1000], [2000, 3000]] | Failed |
| regression variant: extension base | [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3201]] | [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]] | Failed |
| partial repair probe: extension base | [[1000, 3320], [200, 1400]] | [[1000, 2200], [200, 1400]] | Failed |
| partial repair variant: extension base | [[0, 700], [1000, 1701], [2000, 3399]] | [[0, 700], [1000, 1700], [2000, 2700]] | Failed |
| boundary control | [[0, 420], [500, 3000]] | [[0, 420], [500, 3000]] | Passed |
| boundary control | [[0, 1000]] | [[0, 1000]] | Passed |
| normal control | [[0, 200], [200, 900], [2000, 4000]] | [[0, 200], [200, 900], [2000, 4000]] | Passed |
| normal control | [[1000, 3000]] | [[1000, 3000]] | Passed |
| normal control | [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]] | [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]] | Passed |
SHA-256 / d315a07e3d4245b6e1e4a2665a91a60b1408ae54f50ad1bf701a3bab69503669
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cues, min_dur, min_gap):
out=[list(c) for c in cues]
order=sorted(range(len(out)),key=lambda k:(out[k][0],k))
for pos,i in enumerate(order):
c=out[i]
if c[1]-c[0]>=min_dur:
continue
target=c[0]+min_dur-min_gap
if pos+1<len(order):
target=min(target,out[order[pos+1]][0]-min_gap)
c[1]=max(c[1],target)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: extension base', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('regression variant: extension base', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('partial repair probe: extension base', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('partial repair variant: extension base', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('normal control', [[[1000, 3000]], 1200, 0], [[1000, 3000]]), ('normal control', [[[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]], 1000, 40], [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]])], [('regression: extension base', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('regression variant: extension base', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('partial repair probe: extension base', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('partial repair variant: extension base', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[2000, 4000], [1500, 1600], [1500, 2699]], 1200, 80], [[2000, 4000], [1500, 1600], [1500, 2699]]), ('normal control', [[[1500, 3500]], 700, 0], [[1500, 3500]]), ('normal control', [[[1500, 1600], [1500, 1600], [2000, 3200], [3000, 5000]], 1200, 0], [[1500, 1600], [1500, 2000], [2000, 3200], [3000, 5000]])], [('regression: extension base', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('regression variant: extension base', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair probe: extension base', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('partial repair variant: extension base', [[[0, 1]], 1200, 40], [[0, 1200]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[1000, 1999], [1000, 3000]], 1000, 80], [[1000, 1999], [1000, 3000]]), ('normal control', [[[2000, 3000], [2000, 3000], [1000, 1100], [4355, 6355]], 1000, 0], [[2000, 3000], [2000, 3000], [1000, 2000], [4355, 6355]]), ('normal control', [[[500, 1500]], 1000, 0], [[500, 1500]])], [('regression: extension base', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('regression variant: extension base', [[[0, 2000], [200, 500]], 700, 80], [[0, 2000], [200, 900]]), ('partial repair probe: extension base', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('partial repair variant: extension base', [[[0, 2000], [200, 1160], [500, 1499], [1186, 1187], [2429, 3430]], 1000, 40], [[0, 2000], [200, 1160], [500, 1499], [1186, 2186], [2429, 3430]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[200, 901], [1000, 1100], [1000, 1701], [1000, 1701]], 700, 40], [[200, 901], [1000, 1100], [1000, 1701], [1000, 1701]]), ('normal control', [[[0, 300], [1000, 3000]], 1200, 0], [[0, 1000], [1000, 3000]]), ('normal control', [[[200, 2200], [1000, 2199], [2000, 2300], [3000, 3300], [3000, 4200]], 1200, 40], [[200, 2200], [1000, 2199], [2000, 2960], [3000, 3300], [3000, 4200]])], [('regression: extension base', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: extension base', [[[3000, 3700], [500, 501]], 700, 0], [[3000, 3700], [500, 1200]]), ('partial repair probe: extension base', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair variant: extension base', [[[800, 1999]], 1200, 40], [[800, 2000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[200, 2200], [500, 1701], [500, 2500]], 1200, 80], [[200, 2200], [500, 1701], [500, 2500]]), ('normal control', [[[800, 2800], [1500, 2700], [3000, 4201]], 1200, 0], [[800, 2800], [1500, 2700], [3000, 4201]]), ('normal control', [[[500, 1700], [1422, 3422], [1500, 1800], [2000, 3160], [3000, 4200]], 1200, 40], [[500, 1700], [1422, 3422], [1500, 1960], [2000, 3160], [3000, 4200]])]]
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: extension base | [[0, 920], [2000, 3000]] | [[0, 1000], [2000, 3000]] | Failed |
| regression variant: extension base | [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3160]] | [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]] | Failed |
| partial repair probe: extension base | [[1000, 2120], [200, 1400]] | [[1000, 2200], [200, 1400]] | Failed |
| partial repair variant: extension base | [[0, 700], [1000, 1620], [2000, 2699]] | [[0, 700], [1000, 1700], [2000, 2700]] | Failed |
| boundary control | [[0, 420], [500, 3000]] | [[0, 420], [500, 3000]] | Passed |
| boundary control | [[0, 1000]] | [[0, 1000]] | Passed |
| normal control | [[0, 200], [200, 900], [2000, 4000]] | [[0, 200], [200, 900], [2000, 4000]] | Passed |
| normal control | [[1000, 3000]] | [[1000, 3000]] | Passed |
| normal control | [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]] | [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]] | Passed |
SHA-256 / 0d5ba7b4e8b09cc1cb28801231619f4f2b92108a1b893a31bdc52ba8a686381e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cues, min_dur, min_gap):
out=[list(c) for c in cues]
order=sorted(range(len(out)),key=lambda k:(out[k][0],k))
for pos,i in enumerate(order):
c=out[i]
if c[1]-c[0]>=min_dur:
continue
target=c[0]+min_dur
if pos+1<len(order):
target=min(target,out[order[pos+1]][0]-min_gap)
c[1]=max(c[1],target)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: extension base', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('regression variant: extension base', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('partial repair probe: extension base', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('partial repair variant: extension base', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('normal control', [[[1000, 3000]], 1200, 0], [[1000, 3000]]), ('normal control', [[[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]], 1000, 40], [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]])], [('regression: extension base', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('regression variant: extension base', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('partial repair probe: extension base', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('partial repair variant: extension base', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[2000, 4000], [1500, 1600], [1500, 2699]], 1200, 80], [[2000, 4000], [1500, 1600], [1500, 2699]]), ('normal control', [[[1500, 3500]], 700, 0], [[1500, 3500]]), ('normal control', [[[1500, 1600], [1500, 1600], [2000, 3200], [3000, 5000]], 1200, 0], [[1500, 1600], [1500, 2000], [2000, 3200], [3000, 5000]])], [('regression: extension base', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('regression variant: extension base', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair probe: extension base', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('partial repair variant: extension base', [[[0, 1]], 1200, 40], [[0, 1200]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[1000, 1999], [1000, 3000]], 1000, 80], [[1000, 1999], [1000, 3000]]), ('normal control', [[[2000, 3000], [2000, 3000], [1000, 1100], [4355, 6355]], 1000, 0], [[2000, 3000], [2000, 3000], [1000, 2000], [4355, 6355]]), ('normal control', [[[500, 1500]], 1000, 0], [[500, 1500]])], [('regression: extension base', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('regression variant: extension base', [[[0, 2000], [200, 500]], 700, 80], [[0, 2000], [200, 900]]), ('partial repair probe: extension base', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('partial repair variant: extension base', [[[0, 2000], [200, 1160], [500, 1499], [1186, 1187], [2429, 3430]], 1000, 40], [[0, 2000], [200, 1160], [500, 1499], [1186, 2186], [2429, 3430]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[200, 901], [1000, 1100], [1000, 1701], [1000, 1701]], 700, 40], [[200, 901], [1000, 1100], [1000, 1701], [1000, 1701]]), ('normal control', [[[0, 300], [1000, 3000]], 1200, 0], [[0, 1000], [1000, 3000]]), ('normal control', [[[200, 2200], [1000, 2199], [2000, 2300], [3000, 3300], [3000, 4200]], 1200, 40], [[200, 2200], [1000, 2199], [2000, 2960], [3000, 3300], [3000, 4200]])], [('regression: extension base', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: extension base', [[[3000, 3700], [500, 501]], 700, 0], [[3000, 3700], [500, 1200]]), ('partial repair probe: extension base', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair variant: extension base', [[[800, 1999]], 1200, 40], [[800, 2000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[200, 2200], [500, 1701], [500, 2500]], 1200, 80], [[200, 2200], [500, 1701], [500, 2500]]), ('normal control', [[[800, 2800], [1500, 2700], [3000, 4201]], 1200, 0], [[800, 2800], [1500, 2700], [3000, 4201]]), ('normal control', [[[500, 1700], [1422, 3422], [1500, 1800], [2000, 3160], [3000, 4200]], 1200, 40], [[500, 1700], [1422, 3422], [1500, 1960], [2000, 3160], [3000, 4200]])]]
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: extension base | [[0, 1000], [2000, 3000]] | [[0, 1000], [2000, 3000]] | Passed |
| regression variant: extension base | [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]] | [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]] | Passed |
| partial repair probe: extension base | [[1000, 2200], [200, 1400]] | [[1000, 2200], [200, 1400]] | Passed |
| partial repair variant: extension base | [[0, 700], [1000, 1700], [2000, 2700]] | [[0, 700], [1000, 1700], [2000, 2700]] | Passed |
| boundary control | [[0, 420], [500, 3000]] | [[0, 420], [500, 3000]] | Passed |
| boundary control | [[0, 1000]] | [[0, 1000]] | Passed |
| normal control | [[0, 200], [200, 900], [2000, 4000]] | [[0, 200], [200, 900], [2000, 4000]] | Passed |
| normal control | [[1000, 3000]] | [[1000, 3000]] | Passed |
| normal control | [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]] | [[500, 800], [500, 2500], [800, 1799], [1000, 1001], [1000, 3000]] | Passed |
SHA-256 / 14db632990ae82b04030b869040a19073fd423ecc87588a20997affbea81520e
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.130612+00:00.
Case digest / c7bec95525ea25ce5a4d5734d679b3ace95ff306213356b3788cc862500af0fa