FAILURE MAP
← Case archive

FA-78011 / Subtitle cue timing / Open access

Minimum cue duration extension: shortness test · case 01

Cues late in the programme are never extended no matter how short they are.

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

ROOT CAUSE

The shortness test compares the absolute end time with min_dur instead of the duration.

VERIFIED REPAIR

Compare the duration end-start with min_dur.

Unsuccessful approach: Loosening the threshold by min_gap leaves cues just below the minimum unextended.

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]>=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: shortness test', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('regression variant: shortness test', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair probe: shortness test', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('partial repair variant: shortness test', [[[200, 901], [1500, 1800], [1500, 2120]], 700, 80], [[200, 901], [1500, 1800], [1500, 2200]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('normal control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('normal control', [[[1000, 3000]], 1200, 0], [[1000, 3000]])], [('regression: shortness test', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('regression variant: shortness test', [[[2000, 2999], [500, 1501]], 1000, 80], [[2000, 3000], [500, 1501]]), ('partial repair probe: shortness test', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('partial repair variant: shortness test', [[[200, 500], [1394, 2593], [3000, 3300]], 1200, 80], [[200, 1314], [1394, 2594], [3000, 4200]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 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]]), ('normal control', [[[0, 1]], 1200, 40], [[0, 1200]]), ('normal control', [[[500, 501]], 1200, 40], [[500, 1700]])], [('regression: shortness test', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: shortness test', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('partial repair probe: shortness test', [[[800, 1999]], 1200, 40], [[800, 2000]]), ('partial repair variant: shortness test', [[[1000, 3000], [3955, 4055], [208, 1207], [1500, 2420]], 1000, 80], [[1000, 3000], [3955, 4955], [208, 1207], [1500, 2500]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[200, 900], [3000, 3701]], 700, 40], [[200, 900], [3000, 3701]]), ('normal control', [[[1500, 3500]], 700, 0], [[1500, 3500]]), ('normal control', [[[1000, 1701], [1500, 2200]], 700, 80], [[1000, 1701], [1500, 2200]])], [('regression: shortness test', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('regression variant: shortness test', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('partial repair probe: shortness test', [[[800, 1760], [800, 1800], [1000, 1100], [1000, 1999]], 1000, 40], [[800, 1760], [800, 1800], [1000, 1100], [1000, 2000]]), ('partial repair variant: shortness test', [[[800, 801], [2000, 2620], [3000, 3699]], 700, 80], [[800, 1500], [2000, 2700], [3000, 3700]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[200, 300], [800, 801]], 1000, 80], [[200, 720], [800, 1800]]), ('normal control', [[[800, 801]], 1000, 0], [[800, 1800]]), ('normal control', [[[1000, 3000], [3000, 4200]], 1200, 80], [[1000, 3000], [3000, 4200]])], [('regression: shortness test', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('regression variant: shortness test', [[[800, 2800], [800, 900], [1500, 1501], [1000, 1700], [3000, 3300]], 700, 0], [[800, 2800], [800, 1000], [1500, 2200], [1000, 1700], [3000, 3700]]), ('partial repair probe: shortness test', [[[500, 2500], [500, 1120], [1000, 1699], [2000, 2701], [2766, 3465]], 700, 80], [[500, 2500], [500, 1120], [1000, 1700], [2000, 2701], [2766, 3466]]), ('partial repair variant: shortness test', [[[2000, 2620], [0, 700]], 700, 80], [[2000, 2700], [0, 700]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('normal control', [[[500, 1500]], 1000, 0], [[500, 1500]]), ('normal control', [[[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 201]], 1000, 40], [[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 760]]), ('normal control', [[[0, 300], [1000, 3000]], 1200, 0], [[0, 1000], [1000, 3000]])]]
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 fixtureActualExpectedOutcome
regression: shortness test[[1000, 2120], [200, 1400]][[1000, 2200], [200, 1400]]Failed
regression variant: shortness test[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]][[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]Failed
partial repair probe: shortness test[[0, 700], [1000, 1001], [2000, 2699]][[0, 700], [1000, 1700], [2000, 2700]]Failed
partial repair variant: shortness test[[200, 901], [1500, 1800], [1500, 2120]][[200, 901], [1500, 1800], [1500, 2200]]Failed
boundary control[[0, 1000], [2000, 3000]][[0, 1000], [2000, 3000]]Passed
boundary control[[500, 1200], [0, 460]][[500, 1200], [0, 460]]Passed
normal control[[0, 420], [500, 3000]][[0, 420], [500, 3000]]Passed
normal control[[0, 200], [200, 900], [2000, 4000]][[0, 200], [200, 900], [2000, 4000]]Passed
normal control[[1000, 3000]][[1000, 3000]]Passed

SHA-256 / 5fa60b0698ea150e509952c38586e5525254293fc9d7888b38d1c922d9ad1ca5

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-min_gap:
            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: shortness test', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('regression variant: shortness test', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair probe: shortness test', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('partial repair variant: shortness test', [[[200, 901], [1500, 1800], [1500, 2120]], 700, 80], [[200, 901], [1500, 1800], [1500, 2200]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('normal control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('normal control', [[[1000, 3000]], 1200, 0], [[1000, 3000]])], [('regression: shortness test', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('regression variant: shortness test', [[[2000, 2999], [500, 1501]], 1000, 80], [[2000, 3000], [500, 1501]]), ('partial repair probe: shortness test', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('partial repair variant: shortness test', [[[200, 500], [1394, 2593], [3000, 3300]], 1200, 80], [[200, 1314], [1394, 2594], [3000, 4200]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 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]]), ('normal control', [[[0, 1]], 1200, 40], [[0, 1200]]), ('normal control', [[[500, 501]], 1200, 40], [[500, 1700]])], [('regression: shortness test', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: shortness test', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('partial repair probe: shortness test', [[[800, 1999]], 1200, 40], [[800, 2000]]), ('partial repair variant: shortness test', [[[1000, 3000], [3955, 4055], [208, 1207], [1500, 2420]], 1000, 80], [[1000, 3000], [3955, 4955], [208, 1207], [1500, 2500]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[200, 900], [3000, 3701]], 700, 40], [[200, 900], [3000, 3701]]), ('normal control', [[[1500, 3500]], 700, 0], [[1500, 3500]]), ('normal control', [[[1000, 1701], [1500, 2200]], 700, 80], [[1000, 1701], [1500, 2200]])], [('regression: shortness test', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('regression variant: shortness test', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('partial repair probe: shortness test', [[[800, 1760], [800, 1800], [1000, 1100], [1000, 1999]], 1000, 40], [[800, 1760], [800, 1800], [1000, 1100], [1000, 2000]]), ('partial repair variant: shortness test', [[[800, 801], [2000, 2620], [3000, 3699]], 700, 80], [[800, 1500], [2000, 2700], [3000, 3700]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[200, 300], [800, 801]], 1000, 80], [[200, 720], [800, 1800]]), ('normal control', [[[800, 801]], 1000, 0], [[800, 1800]]), ('normal control', [[[1000, 3000], [3000, 4200]], 1200, 80], [[1000, 3000], [3000, 4200]])], [('regression: shortness test', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('regression variant: shortness test', [[[800, 2800], [800, 900], [1500, 1501], [1000, 1700], [3000, 3300]], 700, 0], [[800, 2800], [800, 1000], [1500, 2200], [1000, 1700], [3000, 3700]]), ('partial repair probe: shortness test', [[[500, 2500], [500, 1120], [1000, 1699], [2000, 2701], [2766, 3465]], 700, 80], [[500, 2500], [500, 1120], [1000, 1700], [2000, 2701], [2766, 3466]]), ('partial repair variant: shortness test', [[[2000, 2620], [0, 700]], 700, 80], [[2000, 2700], [0, 700]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('normal control', [[[500, 1500]], 1000, 0], [[500, 1500]]), ('normal control', [[[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 201]], 1000, 40], [[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 760]]), ('normal control', [[[0, 300], [1000, 3000]], 1200, 0], [[0, 1000], [1000, 3000]])]]
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 fixtureActualExpectedOutcome
regression: shortness test[[1000, 2120], [200, 1400]][[1000, 2200], [200, 1400]]Failed
regression variant: shortness test[[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]][[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]Passed
partial repair probe: shortness test[[0, 700], [1000, 1700], [2000, 2699]][[0, 700], [1000, 1700], [2000, 2700]]Failed
partial repair variant: shortness test[[200, 901], [1500, 1800], [1500, 2120]][[200, 901], [1500, 1800], [1500, 2200]]Failed
boundary control[[0, 1000], [2000, 3000]][[0, 1000], [2000, 3000]]Passed
boundary control[[500, 1200], [0, 460]][[500, 1200], [0, 460]]Passed
normal control[[0, 420], [500, 3000]][[0, 420], [500, 3000]]Passed
normal control[[0, 200], [200, 900], [2000, 4000]][[0, 200], [200, 900], [2000, 4000]]Passed
normal control[[1000, 3000]][[1000, 3000]]Passed

SHA-256 / ffacf6c3e2669eaab30b48a47cbc585d006a57096d3b6c420242dfa33b87595a

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: shortness test', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('regression variant: shortness test', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('partial repair probe: shortness test', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('partial repair variant: shortness test', [[[200, 901], [1500, 1800], [1500, 2120]], 700, 80], [[200, 901], [1500, 1800], [1500, 2200]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('normal control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('normal control', [[[1000, 3000]], 1200, 0], [[1000, 3000]])], [('regression: shortness test', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('regression variant: shortness test', [[[2000, 2999], [500, 1501]], 1000, 80], [[2000, 3000], [500, 1501]]), ('partial repair probe: shortness test', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('partial repair variant: shortness test', [[[200, 500], [1394, 2593], [3000, 3300]], 1200, 80], [[200, 1314], [1394, 2594], [3000, 4200]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 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]]), ('normal control', [[[0, 1]], 1200, 40], [[0, 1200]]), ('normal control', [[[500, 501]], 1200, 40], [[500, 1700]])], [('regression: shortness test', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: shortness test', [[[0, 700], [1000, 1001], [2000, 2699]], 700, 80], [[0, 700], [1000, 1700], [2000, 2700]]), ('partial repair probe: shortness test', [[[800, 1999]], 1200, 40], [[800, 2000]]), ('partial repair variant: shortness test', [[[1000, 3000], [3955, 4055], [208, 1207], [1500, 2420]], 1000, 80], [[1000, 3000], [3955, 4955], [208, 1207], [1500, 2500]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('normal control', [[[200, 900], [3000, 3701]], 700, 40], [[200, 900], [3000, 3701]]), ('normal control', [[[1500, 3500]], 700, 0], [[1500, 3500]]), ('normal control', [[[1000, 1701], [1500, 2200]], 700, 80], [[1000, 1701], [1500, 2200]])], [('regression: shortness test', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('regression variant: shortness test', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]]), ('partial repair probe: shortness test', [[[800, 1760], [800, 1800], [1000, 1100], [1000, 1999]], 1000, 40], [[800, 1760], [800, 1800], [1000, 1100], [1000, 2000]]), ('partial repair variant: shortness test', [[[800, 801], [2000, 2620], [3000, 3699]], 700, 80], [[800, 1500], [2000, 2700], [3000, 3700]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[200, 300], [800, 801]], 1000, 80], [[200, 720], [800, 1800]]), ('normal control', [[[800, 801]], 1000, 0], [[800, 1800]]), ('normal control', [[[1000, 3000], [3000, 4200]], 1200, 80], [[1000, 3000], [3000, 4200]])], [('regression: shortness test', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('regression variant: shortness test', [[[800, 2800], [800, 900], [1500, 1501], [1000, 1700], [3000, 3300]], 700, 0], [[800, 2800], [800, 1000], [1500, 2200], [1000, 1700], [3000, 3700]]), ('partial repair probe: shortness test', [[[500, 2500], [500, 1120], [1000, 1699], [2000, 2701], [2766, 3465]], 700, 80], [[500, 2500], [500, 1120], [1000, 1700], [2000, 2701], [2766, 3466]]), ('partial repair variant: shortness test', [[[2000, 2620], [0, 700]], 700, 80], [[2000, 2700], [0, 700]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('normal control', [[[500, 1500]], 1000, 0], [[500, 1500]]), ('normal control', [[[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 201]], 1000, 40], [[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 760]]), ('normal control', [[[0, 300], [1000, 3000]], 1200, 0], [[0, 1000], [1000, 3000]])]]
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 fixtureActualExpectedOutcome
regression: shortness test[[1000, 2200], [200, 1400]][[1000, 2200], [200, 1400]]Passed
regression variant: shortness test[[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]][[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]Passed
partial repair probe: shortness test[[0, 700], [1000, 1700], [2000, 2700]][[0, 700], [1000, 1700], [2000, 2700]]Passed
partial repair variant: shortness test[[200, 901], [1500, 1800], [1500, 2200]][[200, 901], [1500, 1800], [1500, 2200]]Passed
boundary control[[0, 1000], [2000, 3000]][[0, 1000], [2000, 3000]]Passed
boundary control[[500, 1200], [0, 460]][[500, 1200], [0, 460]]Passed
normal control[[0, 420], [500, 3000]][[0, 420], [500, 3000]]Passed
normal control[[0, 200], [200, 900], [2000, 4000]][[0, 200], [200, 900], [2000, 4000]]Passed
normal control[[1000, 3000]][[1000, 3000]]Passed

SHA-256 / b3b111f2069eeed746cf219b965b7649f72f6202457403112c72db58f82c968b

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

Case digest / e3b64c41dcf1bef251134c2f3d6d2666e16ed1410fd97ecf1c917249075bf7a7