FAILURE MAP
← Case archive

FA-77946 / Subtitle cue timing / Open access

Cue snapping to video frame grid: end frame ceiling · case 01

Cues vanish one frame before the spoken line ends.

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

ROOT CAUSE

The end frame is floored, cutting the partially covered final frame.

VERIFIED REPAIR

Take the ceiling of the end position in frames.

Unsuccessful approach: Adding one frame after flooring over-extends ends that already fall exactly on a frame boundary.

Case contract

For fps "N" or "N/D", frame k starts at k*1000*D/N ms. Each cue [start,end] (sorted) gets start frame floor(start*N/(1000*D)) and end frame ceil(end*N/(1000*D)), at least one frame long. A cue whose start frame precedes the previous cue end frame is pushed to that end frame (and kept at least one frame long). Output [a,b,ms(a),ms(b)] with ms(k)=floor(k*1000*D/N).

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, fps):
    num,den=(fps.split('/')+['1'])[:2]
    num,den=int(num),int(den)
    out=[]
    prev_end=None
    for start,end in cues:
        a=(start*num)//(1000*den)
        b=(end*num)//(1000*den)
        if b<=a:
            b=a+1
        if prev_end is not None and a<prev_end:
            a=prev_end
            b=max(b,a+1)
        prev_end=b
        out.append([a,b]+[(x*1000*den)//num for x in (a,b)])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: end frame ceiling', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: end frame ceiling', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: end frame ceiling', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('partial repair variant: end frame ceiling', [[[7417, 8625], [8157, 9157]], '24'], [[178, 207, 7416, 8625], [207, 220, 8625, 9166]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3001, 3006]], '50'], [[150, 151, 3000, 3020]]), ('normal control', [[[440, 474], [950, 951]], '25'], [[11, 12, 440, 480], [23, 24, 920, 960]]), ('normal control', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]])], [('regression: end frame ceiling', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: end frame ceiling', [[[4666, 4667], [5866, 5900], [5899, 5919], [2400, 3401]], '30'], [[139, 141, 4633, 4700], [175, 177, 5833, 5900], [177, 178, 5900, 5933], [178, 179, 5933, 5966]]), ('partial repair probe: end frame ceiling', [[[2500, 3940], [2660, 2680], [3360, 4360], [740, 4220]], '50'], [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]]), ('partial repair variant: end frame ceiling', [[[40, 6440]], '25'], [[1, 161, 40, 6440]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]]), ('normal control', [[[7160, 7161]], '25'], [[179, 180, 7160, 7200]]), ('normal control', [[[3040, 3041], [434, 439], [444, 449], [1366, 2367]], '30'], [[91, 92, 3033, 3066], [92, 93, 3066, 3100], [93, 94, 3100, 3133], [94, 95, 3133, 3166]])], [('regression: end frame ceiling', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: end frame ceiling', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: end frame ceiling', [[[2500, 3940], [2660, 2680], [3360, 4360], [740, 4220]], '50'], [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]]), ('partial repair variant: end frame ceiling', [[[750, 6125]], '24'], [[18, 147, 750, 6125]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3500, 3501]], '24000/1001'], [[83, 84, 3461, 3503]]), ('normal control', [[[73, 74]], '25'], [[1, 2, 40, 80]]), ('normal control', [[[1001, 1041]], '24000/1001'], [[24, 25, 1001, 1042]])], [('regression: end frame ceiling', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('regression variant: end frame ceiling', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('partial repair probe: end frame ceiling', [[[3500, 3540], [3471, 3472], [3481, 4004], [4181, 4215]], '24000/1001'], [[83, 85, 3461, 3545], [85, 86, 3545, 3586], [86, 96, 3586, 4004], [100, 102, 4170, 4254]]), ('partial repair variant: end frame ceiling', [[[3040, 3041], [3043, 3800], [3084, 3085]], '50'], [[152, 153, 3040, 3060], [153, 190, 3060, 3800], [190, 191, 3800, 3820]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[1018, 1023], [1028, 1068]], '24'], [[24, 25, 1000, 1041], [25, 26, 1041, 1083]]), ('normal control', [[[5072, 5092]], '30000/1001'], [[152, 153, 5071, 5105]]), ('normal control', [[[6882, 6887]], '24000/1001'], [[165, 166, 6881, 6923]])], [('regression: end frame ceiling', [[[3000, 3041], [2820, 2860], [3520, 3554], [3530, 3564]], '50'], [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]]), ('regression variant: end frame ceiling', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('partial repair probe: end frame ceiling', [[[3500, 3540], [3471, 3472], [3481, 4004], [4181, 4215]], '24000/1001'], [[83, 85, 3461, 3545], [85, 86, 3545, 3586], [86, 96, 3586, 4004], [100, 102, 4170, 4254]]), ('partial repair variant: end frame ceiling', [[[680, 685], [280, 320], [1013, 1400]], '25'], [[17, 18, 680, 720], [18, 19, 720, 760], [25, 35, 1000, 1400]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3700, 3720]], '30'], [[111, 112, 3700, 3733]]), ('normal control', [[[40, 41]], '30'], [[1, 2, 33, 66]]), ('normal control', [[[167, 187], [184, 225]], '30000/1001'], [[5, 6, 166, 200], [6, 7, 200, 233]])]]
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: end frame ceiling[[71, 72, 2961, 3003]][[71, 73, 2961, 3044]]Failed
regression variant: end frame ceiling[[35, 36, 1459, 1501], [60, 83, 2502, 3461], [136, 137, 5672, 5714]][[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]Failed
partial repair probe: end frame ceiling[[24, 48, 1001, 2002]][[24, 48, 1001, 2002]]Passed
partial repair variant: end frame ceiling[[178, 207, 7416, 8625], [207, 219, 8625, 9125]][[178, 207, 7416, 8625], [207, 220, 8625, 9166]]Failed
boundary control[[0, 1, 0, 41], [1, 2, 41, 83]][[0, 1, 0, 41], [1, 2, 41, 83]]Passed
normal control[[150, 151, 3000, 3020]][[150, 151, 3000, 3020]]Passed
normal control[[11, 12, 440, 480], [23, 24, 920, 960]][[11, 12, 440, 480], [23, 24, 920, 960]]Passed
normal control[[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]][[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]Passed

SHA-256 / 540742bb12c49752ef8aa39da47c6221e31978c3e70326eefd98c6e07da58d35

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(cues, fps):
    num,den=(fps.split('/')+['1'])[:2]
    num,den=int(num),int(den)
    out=[]
    prev_end=None
    for start,end in cues:
        a=(start*num)//(1000*den)
        b=(end*num)//(1000*den)+1
        if b<=a:
            b=a+1
        if prev_end is not None and a<prev_end:
            a=prev_end
            b=max(b,a+1)
        prev_end=b
        out.append([a,b]+[(x*1000*den)//num for x in (a,b)])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: end frame ceiling', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: end frame ceiling', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: end frame ceiling', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('partial repair variant: end frame ceiling', [[[7417, 8625], [8157, 9157]], '24'], [[178, 207, 7416, 8625], [207, 220, 8625, 9166]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3001, 3006]], '50'], [[150, 151, 3000, 3020]]), ('normal control', [[[440, 474], [950, 951]], '25'], [[11, 12, 440, 480], [23, 24, 920, 960]]), ('normal control', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]])], [('regression: end frame ceiling', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: end frame ceiling', [[[4666, 4667], [5866, 5900], [5899, 5919], [2400, 3401]], '30'], [[139, 141, 4633, 4700], [175, 177, 5833, 5900], [177, 178, 5900, 5933], [178, 179, 5933, 5966]]), ('partial repair probe: end frame ceiling', [[[2500, 3940], [2660, 2680], [3360, 4360], [740, 4220]], '50'], [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]]), ('partial repair variant: end frame ceiling', [[[40, 6440]], '25'], [[1, 161, 40, 6440]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]]), ('normal control', [[[7160, 7161]], '25'], [[179, 180, 7160, 7200]]), ('normal control', [[[3040, 3041], [434, 439], [444, 449], [1366, 2367]], '30'], [[91, 92, 3033, 3066], [92, 93, 3066, 3100], [93, 94, 3100, 3133], [94, 95, 3133, 3166]])], [('regression: end frame ceiling', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: end frame ceiling', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: end frame ceiling', [[[2500, 3940], [2660, 2680], [3360, 4360], [740, 4220]], '50'], [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]]), ('partial repair variant: end frame ceiling', [[[750, 6125]], '24'], [[18, 147, 750, 6125]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3500, 3501]], '24000/1001'], [[83, 84, 3461, 3503]]), ('normal control', [[[73, 74]], '25'], [[1, 2, 40, 80]]), ('normal control', [[[1001, 1041]], '24000/1001'], [[24, 25, 1001, 1042]])], [('regression: end frame ceiling', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('regression variant: end frame ceiling', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('partial repair probe: end frame ceiling', [[[3500, 3540], [3471, 3472], [3481, 4004], [4181, 4215]], '24000/1001'], [[83, 85, 3461, 3545], [85, 86, 3545, 3586], [86, 96, 3586, 4004], [100, 102, 4170, 4254]]), ('partial repair variant: end frame ceiling', [[[3040, 3041], [3043, 3800], [3084, 3085]], '50'], [[152, 153, 3040, 3060], [153, 190, 3060, 3800], [190, 191, 3800, 3820]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[1018, 1023], [1028, 1068]], '24'], [[24, 25, 1000, 1041], [25, 26, 1041, 1083]]), ('normal control', [[[5072, 5092]], '30000/1001'], [[152, 153, 5071, 5105]]), ('normal control', [[[6882, 6887]], '24000/1001'], [[165, 166, 6881, 6923]])], [('regression: end frame ceiling', [[[3000, 3041], [2820, 2860], [3520, 3554], [3530, 3564]], '50'], [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]]), ('regression variant: end frame ceiling', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('partial repair probe: end frame ceiling', [[[3500, 3540], [3471, 3472], [3481, 4004], [4181, 4215]], '24000/1001'], [[83, 85, 3461, 3545], [85, 86, 3545, 3586], [86, 96, 3586, 4004], [100, 102, 4170, 4254]]), ('partial repair variant: end frame ceiling', [[[680, 685], [280, 320], [1013, 1400]], '25'], [[17, 18, 680, 720], [18, 19, 720, 760], [25, 35, 1000, 1400]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3700, 3720]], '30'], [[111, 112, 3700, 3733]]), ('normal control', [[[40, 41]], '30'], [[1, 2, 33, 66]]), ('normal control', [[[167, 187], [184, 225]], '30000/1001'], [[5, 6, 166, 200], [6, 7, 200, 233]])]]
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: end frame ceiling[[71, 73, 2961, 3044]][[71, 73, 2961, 3044]]Passed
regression variant: end frame ceiling[[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]][[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]Passed
partial repair probe: end frame ceiling[[24, 49, 1001, 2043]][[24, 48, 1001, 2002]]Failed
partial repair variant: end frame ceiling[[178, 208, 7416, 8666], [208, 220, 8666, 9166]][[178, 207, 7416, 8625], [207, 220, 8625, 9166]]Failed
boundary control[[0, 1, 0, 41], [1, 2, 41, 83]][[0, 1, 0, 41], [1, 2, 41, 83]]Passed
normal control[[150, 151, 3000, 3020]][[150, 151, 3000, 3020]]Passed
normal control[[11, 12, 440, 480], [23, 24, 920, 960]][[11, 12, 440, 480], [23, 24, 920, 960]]Passed
normal control[[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]][[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]Passed

SHA-256 / 29dbd795309cf4135f26edf0438ff232cb4e5d5430047e33a8a2037227ec56db

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(cues, fps):
    num,den=(fps.split('/')+['1'])[:2]
    num,den=int(num),int(den)
    out=[]
    prev_end=None
    for start,end in cues:
        a=(start*num)//(1000*den)
        b=-((-end*num)//(1000*den))
        if b<=a:
            b=a+1
        if prev_end is not None and a<prev_end:
            a=prev_end
            b=max(b,a+1)
        prev_end=b
        out.append([a,b]+[(x*1000*den)//num for x in (a,b)])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: end frame ceiling', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: end frame ceiling', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: end frame ceiling', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('partial repair variant: end frame ceiling', [[[7417, 8625], [8157, 9157]], '24'], [[178, 207, 7416, 8625], [207, 220, 8625, 9166]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3001, 3006]], '50'], [[150, 151, 3000, 3020]]), ('normal control', [[[440, 474], [950, 951]], '25'], [[11, 12, 440, 480], [23, 24, 920, 960]]), ('normal control', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]])], [('regression: end frame ceiling', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: end frame ceiling', [[[4666, 4667], [5866, 5900], [5899, 5919], [2400, 3401]], '30'], [[139, 141, 4633, 4700], [175, 177, 5833, 5900], [177, 178, 5900, 5933], [178, 179, 5933, 5966]]), ('partial repair probe: end frame ceiling', [[[2500, 3940], [2660, 2680], [3360, 4360], [740, 4220]], '50'], [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]]), ('partial repair variant: end frame ceiling', [[[40, 6440]], '25'], [[1, 161, 40, 6440]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]]), ('normal control', [[[7160, 7161]], '25'], [[179, 180, 7160, 7200]]), ('normal control', [[[3040, 3041], [434, 439], [444, 449], [1366, 2367]], '30'], [[91, 92, 3033, 3066], [92, 93, 3066, 3100], [93, 94, 3100, 3133], [94, 95, 3133, 3166]])], [('regression: end frame ceiling', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: end frame ceiling', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: end frame ceiling', [[[2500, 3940], [2660, 2680], [3360, 4360], [740, 4220]], '50'], [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]]), ('partial repair variant: end frame ceiling', [[[750, 6125]], '24'], [[18, 147, 750, 6125]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3500, 3501]], '24000/1001'], [[83, 84, 3461, 3503]]), ('normal control', [[[73, 74]], '25'], [[1, 2, 40, 80]]), ('normal control', [[[1001, 1041]], '24000/1001'], [[24, 25, 1001, 1042]])], [('regression: end frame ceiling', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('regression variant: end frame ceiling', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('partial repair probe: end frame ceiling', [[[3500, 3540], [3471, 3472], [3481, 4004], [4181, 4215]], '24000/1001'], [[83, 85, 3461, 3545], [85, 86, 3545, 3586], [86, 96, 3586, 4004], [100, 102, 4170, 4254]]), ('partial repair variant: end frame ceiling', [[[3040, 3041], [3043, 3800], [3084, 3085]], '50'], [[152, 153, 3040, 3060], [153, 190, 3060, 3800], [190, 191, 3800, 3820]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[1018, 1023], [1028, 1068]], '24'], [[24, 25, 1000, 1041], [25, 26, 1041, 1083]]), ('normal control', [[[5072, 5092]], '30000/1001'], [[152, 153, 5071, 5105]]), ('normal control', [[[6882, 6887]], '24000/1001'], [[165, 166, 6881, 6923]])], [('regression: end frame ceiling', [[[3000, 3041], [2820, 2860], [3520, 3554], [3530, 3564]], '50'], [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]]), ('regression variant: end frame ceiling', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('partial repair probe: end frame ceiling', [[[3500, 3540], [3471, 3472], [3481, 4004], [4181, 4215]], '24000/1001'], [[83, 85, 3461, 3545], [85, 86, 3545, 3586], [86, 96, 3586, 4004], [100, 102, 4170, 4254]]), ('partial repair variant: end frame ceiling', [[[680, 685], [280, 320], [1013, 1400]], '25'], [[17, 18, 680, 720], [18, 19, 720, 760], [25, 35, 1000, 1400]]), ('boundary control', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('normal control', [[[3700, 3720]], '30'], [[111, 112, 3700, 3733]]), ('normal control', [[[40, 41]], '30'], [[1, 2, 33, 66]]), ('normal control', [[[167, 187], [184, 225]], '30000/1001'], [[5, 6, 166, 200], [6, 7, 200, 233]])]]
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: end frame ceiling[[71, 73, 2961, 3044]][[71, 73, 2961, 3044]]Passed
regression variant: end frame ceiling[[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]][[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]Passed
partial repair probe: end frame ceiling[[24, 48, 1001, 2002]][[24, 48, 1001, 2002]]Passed
partial repair variant: end frame ceiling[[178, 207, 7416, 8625], [207, 220, 8625, 9166]][[178, 207, 7416, 8625], [207, 220, 8625, 9166]]Passed
boundary control[[0, 1, 0, 41], [1, 2, 41, 83]][[0, 1, 0, 41], [1, 2, 41, 83]]Passed
normal control[[150, 151, 3000, 3020]][[150, 151, 3000, 3020]]Passed
normal control[[11, 12, 440, 480], [23, 24, 920, 960]][[11, 12, 440, 480], [23, 24, 920, 960]]Passed
normal control[[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]][[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]Passed

SHA-256 / ab1c0d67e09c4b2e2bf26352745b3f9a425afc2f606b489b6843da93f8d55812

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

Case digest / 537c5a0ed3894bdd8d0a415fb0c51c7a34e4a3da71e7136f34c06f7b4f0c876c