FAILURE MAP
← Case archive

FA-78151 / Subtitle cue timing / Open access

Shot-change snapping of cue boundaries: end snap probe · case 01

Cue ends near a cut are snapped against the wrong reference point.

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

ROOT CAUSE

The end is probed at its own time instead of end+gap.

VERIFIED REPAIR

Probe for cuts near end+gap.

Unsuccessful approach: Probing at end-gap moves the reference point the wrong way.

Case contract

For each cue, the start snaps to the nearest shot change within window ms (|shot - start| <= window; ties go to the earlier shot). The end snaps so that it sits gap ms before the nearest shot change within window of end+gap. If snapping leaves end <= start, the original cue is kept unchanged.

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, shots, window, gap):
    def near(t):
        best=None
        for sc in shots:
            d=abs(sc-t)
            if d<=window and (best is None or d<abs(best-t)):
                best=sc
        return best
    out=[]
    for s0,e0 in cues:
        s,e=s0,e0
        a=near(s)
        if a is not None:
            s=a
        b=near(e)
        if b is not None:
            e=b-gap
        if e<=s:
            s,e=s0,e0
        out.append([s,e])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: end snap probe', [[[3900, 3910], [101, 1201], [4050, 4060]], [0, 2150, 3040, 4000], 100, 80], [[3900, 3910], [101, 1201], [4000, 4060]]), ('regression variant: end snap probe', [[[2100, 2600], [0, 801], [1250, 1260]], [0, 1200, 2000, 3040], 100, 42], [[2000, 2600], [0, 801], [1200, 1260]]), ('partial repair probe: end snap probe', [[[50, 950]], [0, 1200], 250, 42], [[0, 1158]]), ('partial repair variant: end snap probe', [[[0, 839], [0, 1050], [950, 960]], [0, 1000], 200, 42], [[0, 958], [0, 958], [950, 960]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('normal control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[50, 80], [4050, 5050]], [0, 1100, 2150, 3000, 4000], 250, 0], [[50, 80], [4000, 5050]]), ('normal control', [[[1251, 1261], [0, 851]], [0, 1000, 3040], 250, 80], [[1251, 1261], [0, 920]])], [('regression: end snap probe', [[[1351, 2451], [1000, 1030], [1050, 1550]], [0, 1000, 1100], 250, 80], [[1351, 2451], [1000, 1020], [1000, 1550]]), ('regression variant: end snap probe', [[[2150, 3190], [1050, 2150], [1801, 2301]], [1100, 1200, 2000, 2150, 4000], 200, 80], [[2150, 3190], [1100, 2070], [2000, 2301]]), ('partial repair probe: end snap probe', [[[1450, 1460], [949, 1849]], [1200], 250, 80], [[1200, 1460], [949, 1849]]), ('partial repair variant: end snap probe', [[[1100, 1600], [3241, 4241]], [0, 1100, 2000, 3040, 4000], 200, 80], [[1100, 1600], [3241, 4241]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[1200, 1230], [801, 1301], [1050, 1550]], [1000, 2150], 200, 0], [[1000, 1230], [1000, 1301], [1000, 1550]]), ('normal control', [[[50, 1150]], [0, 1200, 2000, 2150], 250, 80], [[0, 1120]]), ('normal control', [[[1100, 2100], [2990, 3000], [900, 1800]], [1100, 3040], 200, 0], [[1100, 2100], [2990, 3000], [1100, 1800]])], [('regression: end snap probe', [[[3250, 4250]], [1100, 2000, 3000, 3040, 4000], 250, 42], [[3040, 4250]]), ('regression variant: end snap probe', [[[1450, 2490], [950, 1450], [1451, 1481]], [1100, 1200], 250, 80], [[1200, 2490], [1100, 1450], [1451, 1481]]), ('partial repair probe: end snap probe', [[[1150, 2050], [849, 859], [1350, 2390]], [1100, 3000], 250, 80], [[1100, 2050], [849, 1020], [1100, 2390]]), ('partial repair variant: end snap probe', [[[2250, 2260], [1250, 1280], [1100, 1600]], [1000, 1200, 2150], 100, 80], [[2150, 2260], [1200, 1280], [1000, 1600]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('normal control', [[[1801, 2841], [1000, 1010]], [1000, 1200, 2000, 2150], 200, 42], [[2000, 2841], [1000, 1010]]), ('normal control', [[[1751, 2651], [851, 1851]], [1100, 2000, 2150, 3040], 250, 80], [[2000, 2651], [1100, 1920]]), ('normal control', [[[1000, 2000], [3901, 4401]], [1100, 2000, 2150, 4000], 100, 42], [[1100, 1958], [4000, 4401]])], [('regression: end snap probe', [[[2250, 2260], [1250, 1280], [1100, 1600]], [1000, 1200, 2150], 100, 80], [[2150, 2260], [1200, 1280], [1000, 1600]]), ('regression variant: end snap probe', [[[2050, 2060], [2350, 3250], [3200, 3700]], [2000, 2150, 3000], 200, 42], [[2000, 2108], [2150, 3250], [3000, 3700]]), ('partial repair probe: end snap probe', [[[1300, 1310], [3901, 4941]], [1200, 4000], 100, 42], [[1200, 1310], [4000, 4941]]), ('partial repair variant: end snap probe', [[[3201, 3231], [4201, 5301]], [1100, 3000, 3040, 4000], 200, 42], [[3040, 3231], [4201, 5301]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('normal control', [[[899, 1999]], [1000], 100, 80], [[899, 1999]]), ('normal control', [[[899, 1399], [3201, 3701], [1050, 2050]], [1100, 3000], 200, 80], [[899, 1399], [3201, 3701], [1100, 2050]]), ('normal control', [[[750, 1850], [951, 1851], [950, 1850]], [1000, 1200], 250, 80], [[1000, 1850], [1000, 1851], [1000, 1850]])], [('regression: end snap probe', [[[3201, 3231], [4201, 5301]], [1100, 3000, 3040, 4000], 200, 42], [[3040, 3231], [4201, 5301]]), ('regression variant: end snap probe', [[[2750, 3250]], [2000, 3000, 4000], 250, 80], [[3000, 3250]]), ('partial repair probe: end snap probe', [[[1150, 2250], [1200, 1230], [3900, 5000]], [0, 1100, 4000], 100, 42], [[1100, 2250], [1100, 1230], [4000, 5000]]), ('partial repair variant: end snap probe', [[[2100, 2600], [0, 801], [1250, 1260]], [0, 1200, 2000, 3040], 100, 42], [[2000, 2600], [0, 801], [1200, 1260]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[1050, 2150], [0, 1]], [0, 1000, 3000], 200, 0], [[1000, 2150], [0, 1]]), ('normal control', [[[1050, 1080], [1200, 2200], [2049, 2549]], [1100, 2150, 4000], 100, 0], [[1050, 1080], [1100, 2150], [2049, 2549]]), ('normal control', [[[2990, 3020], [3040, 4140], [3040, 4040]], [0, 2000, 3040], 100, 42], [[2990, 3020], [3040, 4140], [3040, 4040]])]]
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 snap probe[[3900, 3910], [101, 1201], [4050, 4060]][[3900, 3910], [101, 1201], [4000, 4060]]Failed
regression variant: end snap probe[[2000, 2600], [0, 801], [1250, 1260]][[2000, 2600], [0, 801], [1200, 1260]]Failed
partial repair probe: end snap probe[[0, 1158]][[0, 1158]]Passed
partial repair variant: end snap probe[[0, 958], [0, 958], [950, 960]][[0, 958], [0, 958], [950, 960]]Passed
boundary control[[1000, 1500]][[1000, 1500]]Passed
boundary control[[1200, 1800]][[1200, 1800]]Passed
normal control[[1000, 1010]][[1000, 1010]]Passed
normal control[[50, 80], [4000, 5050]][[50, 80], [4000, 5050]]Passed
normal control[[1251, 1261], [0, 920]][[1251, 1261], [0, 920]]Passed

SHA-256 / f849229570ef37dcc318fb019bccb68d5a428fd7b751ef16ecaf3ae3adf911bd

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(cues, shots, window, gap):
    def near(t):
        best=None
        for sc in shots:
            d=abs(sc-t)
            if d<=window and (best is None or d<abs(best-t)):
                best=sc
        return best
    out=[]
    for s0,e0 in cues:
        s,e=s0,e0
        a=near(s)
        if a is not None:
            s=a
        b=near(e-gap)
        if b is not None:
            e=b-gap
        if e<=s:
            s,e=s0,e0
        out.append([s,e])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: end snap probe', [[[3900, 3910], [101, 1201], [4050, 4060]], [0, 2150, 3040, 4000], 100, 80], [[3900, 3910], [101, 1201], [4000, 4060]]), ('regression variant: end snap probe', [[[2100, 2600], [0, 801], [1250, 1260]], [0, 1200, 2000, 3040], 100, 42], [[2000, 2600], [0, 801], [1200, 1260]]), ('partial repair probe: end snap probe', [[[50, 950]], [0, 1200], 250, 42], [[0, 1158]]), ('partial repair variant: end snap probe', [[[0, 839], [0, 1050], [950, 960]], [0, 1000], 200, 42], [[0, 958], [0, 958], [950, 960]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('normal control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[50, 80], [4050, 5050]], [0, 1100, 2150, 3000, 4000], 250, 0], [[50, 80], [4000, 5050]]), ('normal control', [[[1251, 1261], [0, 851]], [0, 1000, 3040], 250, 80], [[1251, 1261], [0, 920]])], [('regression: end snap probe', [[[1351, 2451], [1000, 1030], [1050, 1550]], [0, 1000, 1100], 250, 80], [[1351, 2451], [1000, 1020], [1000, 1550]]), ('regression variant: end snap probe', [[[2150, 3190], [1050, 2150], [1801, 2301]], [1100, 1200, 2000, 2150, 4000], 200, 80], [[2150, 3190], [1100, 2070], [2000, 2301]]), ('partial repair probe: end snap probe', [[[1450, 1460], [949, 1849]], [1200], 250, 80], [[1200, 1460], [949, 1849]]), ('partial repair variant: end snap probe', [[[1100, 1600], [3241, 4241]], [0, 1100, 2000, 3040, 4000], 200, 80], [[1100, 1600], [3241, 4241]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[1200, 1230], [801, 1301], [1050, 1550]], [1000, 2150], 200, 0], [[1000, 1230], [1000, 1301], [1000, 1550]]), ('normal control', [[[50, 1150]], [0, 1200, 2000, 2150], 250, 80], [[0, 1120]]), ('normal control', [[[1100, 2100], [2990, 3000], [900, 1800]], [1100, 3040], 200, 0], [[1100, 2100], [2990, 3000], [1100, 1800]])], [('regression: end snap probe', [[[3250, 4250]], [1100, 2000, 3000, 3040, 4000], 250, 42], [[3040, 4250]]), ('regression variant: end snap probe', [[[1450, 2490], [950, 1450], [1451, 1481]], [1100, 1200], 250, 80], [[1200, 2490], [1100, 1450], [1451, 1481]]), ('partial repair probe: end snap probe', [[[1150, 2050], [849, 859], [1350, 2390]], [1100, 3000], 250, 80], [[1100, 2050], [849, 1020], [1100, 2390]]), ('partial repair variant: end snap probe', [[[2250, 2260], [1250, 1280], [1100, 1600]], [1000, 1200, 2150], 100, 80], [[2150, 2260], [1200, 1280], [1000, 1600]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('normal control', [[[1801, 2841], [1000, 1010]], [1000, 1200, 2000, 2150], 200, 42], [[2000, 2841], [1000, 1010]]), ('normal control', [[[1751, 2651], [851, 1851]], [1100, 2000, 2150, 3040], 250, 80], [[2000, 2651], [1100, 1920]]), ('normal control', [[[1000, 2000], [3901, 4401]], [1100, 2000, 2150, 4000], 100, 42], [[1100, 1958], [4000, 4401]])], [('regression: end snap probe', [[[2250, 2260], [1250, 1280], [1100, 1600]], [1000, 1200, 2150], 100, 80], [[2150, 2260], [1200, 1280], [1000, 1600]]), ('regression variant: end snap probe', [[[2050, 2060], [2350, 3250], [3200, 3700]], [2000, 2150, 3000], 200, 42], [[2000, 2108], [2150, 3250], [3000, 3700]]), ('partial repair probe: end snap probe', [[[1300, 1310], [3901, 4941]], [1200, 4000], 100, 42], [[1200, 1310], [4000, 4941]]), ('partial repair variant: end snap probe', [[[3201, 3231], [4201, 5301]], [1100, 3000, 3040, 4000], 200, 42], [[3040, 3231], [4201, 5301]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('normal control', [[[899, 1999]], [1000], 100, 80], [[899, 1999]]), ('normal control', [[[899, 1399], [3201, 3701], [1050, 2050]], [1100, 3000], 200, 80], [[899, 1399], [3201, 3701], [1100, 2050]]), ('normal control', [[[750, 1850], [951, 1851], [950, 1850]], [1000, 1200], 250, 80], [[1000, 1850], [1000, 1851], [1000, 1850]])], [('regression: end snap probe', [[[3201, 3231], [4201, 5301]], [1100, 3000, 3040, 4000], 200, 42], [[3040, 3231], [4201, 5301]]), ('regression variant: end snap probe', [[[2750, 3250]], [2000, 3000, 4000], 250, 80], [[3000, 3250]]), ('partial repair probe: end snap probe', [[[1150, 2250], [1200, 1230], [3900, 5000]], [0, 1100, 4000], 100, 42], [[1100, 2250], [1100, 1230], [4000, 5000]]), ('partial repair variant: end snap probe', [[[2100, 2600], [0, 801], [1250, 1260]], [0, 1200, 2000, 3040], 100, 42], [[2000, 2600], [0, 801], [1200, 1260]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[1050, 2150], [0, 1]], [0, 1000, 3000], 200, 0], [[1000, 2150], [0, 1]]), ('normal control', [[[1050, 1080], [1200, 2200], [2049, 2549]], [1100, 2150, 4000], 100, 0], [[1050, 1080], [1100, 2150], [2049, 2549]]), ('normal control', [[[2990, 3020], [3040, 4140], [3040, 4040]], [0, 2000, 3040], 100, 42], [[2990, 3020], [3040, 4140], [3040, 4040]])]]
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 snap probe[[3900, 3910], [101, 1201], [4050, 4060]][[3900, 3910], [101, 1201], [4000, 4060]]Failed
regression variant: end snap probe[[2000, 2600], [0, 801], [1250, 1260]][[2000, 2600], [0, 801], [1200, 1260]]Failed
partial repair probe: end snap probe[[0, 950]][[0, 1158]]Failed
partial repair variant: end snap probe[[0, 839], [0, 958], [950, 960]][[0, 958], [0, 958], [950, 960]]Failed
boundary control[[1000, 1500]][[1000, 1500]]Passed
boundary control[[1200, 1800]][[1200, 1800]]Passed
normal control[[1000, 1010]][[1000, 1010]]Passed
normal control[[50, 80], [4000, 5050]][[50, 80], [4000, 5050]]Passed
normal control[[1251, 1261], [0, 920]][[1251, 1261], [0, 920]]Passed

SHA-256 / e947ec01422dfe99e09d0b4f2effedb4e1e89f6e8bf1129124474c0c38c7a0c8

3 / The verified repair

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

N = 1
observations = []
def solve(cues, shots, window, gap):
    def near(t):
        best=None
        for sc in shots:
            d=abs(sc-t)
            if d<=window and (best is None or d<abs(best-t)):
                best=sc
        return best
    out=[]
    for s0,e0 in cues:
        s,e=s0,e0
        a=near(s)
        if a is not None:
            s=a
        b=near(e+gap)
        if b is not None:
            e=b-gap
        if e<=s:
            s,e=s0,e0
        out.append([s,e])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: end snap probe', [[[3900, 3910], [101, 1201], [4050, 4060]], [0, 2150, 3040, 4000], 100, 80], [[3900, 3910], [101, 1201], [4000, 4060]]), ('regression variant: end snap probe', [[[2100, 2600], [0, 801], [1250, 1260]], [0, 1200, 2000, 3040], 100, 42], [[2000, 2600], [0, 801], [1200, 1260]]), ('partial repair probe: end snap probe', [[[50, 950]], [0, 1200], 250, 42], [[0, 1158]]), ('partial repair variant: end snap probe', [[[0, 839], [0, 1050], [950, 960]], [0, 1000], 200, 42], [[0, 958], [0, 958], [950, 960]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('normal control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[50, 80], [4050, 5050]], [0, 1100, 2150, 3000, 4000], 250, 0], [[50, 80], [4000, 5050]]), ('normal control', [[[1251, 1261], [0, 851]], [0, 1000, 3040], 250, 80], [[1251, 1261], [0, 920]])], [('regression: end snap probe', [[[1351, 2451], [1000, 1030], [1050, 1550]], [0, 1000, 1100], 250, 80], [[1351, 2451], [1000, 1020], [1000, 1550]]), ('regression variant: end snap probe', [[[2150, 3190], [1050, 2150], [1801, 2301]], [1100, 1200, 2000, 2150, 4000], 200, 80], [[2150, 3190], [1100, 2070], [2000, 2301]]), ('partial repair probe: end snap probe', [[[1450, 1460], [949, 1849]], [1200], 250, 80], [[1200, 1460], [949, 1849]]), ('partial repair variant: end snap probe', [[[1100, 1600], [3241, 4241]], [0, 1100, 2000, 3040, 4000], 200, 80], [[1100, 1600], [3241, 4241]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[1200, 1230], [801, 1301], [1050, 1550]], [1000, 2150], 200, 0], [[1000, 1230], [1000, 1301], [1000, 1550]]), ('normal control', [[[50, 1150]], [0, 1200, 2000, 2150], 250, 80], [[0, 1120]]), ('normal control', [[[1100, 2100], [2990, 3000], [900, 1800]], [1100, 3040], 200, 0], [[1100, 2100], [2990, 3000], [1100, 1800]])], [('regression: end snap probe', [[[3250, 4250]], [1100, 2000, 3000, 3040, 4000], 250, 42], [[3040, 4250]]), ('regression variant: end snap probe', [[[1450, 2490], [950, 1450], [1451, 1481]], [1100, 1200], 250, 80], [[1200, 2490], [1100, 1450], [1451, 1481]]), ('partial repair probe: end snap probe', [[[1150, 2050], [849, 859], [1350, 2390]], [1100, 3000], 250, 80], [[1100, 2050], [849, 1020], [1100, 2390]]), ('partial repair variant: end snap probe', [[[2250, 2260], [1250, 1280], [1100, 1600]], [1000, 1200, 2150], 100, 80], [[2150, 2260], [1200, 1280], [1000, 1600]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('normal control', [[[1801, 2841], [1000, 1010]], [1000, 1200, 2000, 2150], 200, 42], [[2000, 2841], [1000, 1010]]), ('normal control', [[[1751, 2651], [851, 1851]], [1100, 2000, 2150, 3040], 250, 80], [[2000, 2651], [1100, 1920]]), ('normal control', [[[1000, 2000], [3901, 4401]], [1100, 2000, 2150, 4000], 100, 42], [[1100, 1958], [4000, 4401]])], [('regression: end snap probe', [[[2250, 2260], [1250, 1280], [1100, 1600]], [1000, 1200, 2150], 100, 80], [[2150, 2260], [1200, 1280], [1000, 1600]]), ('regression variant: end snap probe', [[[2050, 2060], [2350, 3250], [3200, 3700]], [2000, 2150, 3000], 200, 42], [[2000, 2108], [2150, 3250], [3000, 3700]]), ('partial repair probe: end snap probe', [[[1300, 1310], [3901, 4941]], [1200, 4000], 100, 42], [[1200, 1310], [4000, 4941]]), ('partial repair variant: end snap probe', [[[3201, 3231], [4201, 5301]], [1100, 3000, 3040, 4000], 200, 42], [[3040, 3231], [4201, 5301]]), ('boundary control', [[[900, 1500]], [1000], 100, 0], [[1000, 1500]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('normal control', [[[899, 1999]], [1000], 100, 80], [[899, 1999]]), ('normal control', [[[899, 1399], [3201, 3701], [1050, 2050]], [1100, 3000], 200, 80], [[899, 1399], [3201, 3701], [1100, 2050]]), ('normal control', [[[750, 1850], [951, 1851], [950, 1850]], [1000, 1200], 250, 80], [[1000, 1850], [1000, 1851], [1000, 1850]])], [('regression: end snap probe', [[[3201, 3231], [4201, 5301]], [1100, 3000, 3040, 4000], 200, 42], [[3040, 3231], [4201, 5301]]), ('regression variant: end snap probe', [[[2750, 3250]], [2000, 3000, 4000], 250, 80], [[3000, 3250]]), ('partial repair probe: end snap probe', [[[1150, 2250], [1200, 1230], [3900, 5000]], [0, 1100, 4000], 100, 42], [[1100, 2250], [1100, 1230], [4000, 5000]]), ('partial repair variant: end snap probe', [[[2100, 2600], [0, 801], [1250, 1260]], [0, 1200, 2000, 3040], 100, 42], [[2000, 2600], [0, 801], [1200, 1260]]), ('boundary control', [[[1150, 1800]], [1000, 1200, 2000], 100, 80], [[1200, 1800]]), ('boundary control', [[[1000, 1010]], [1000, 1100], 100, 0], [[1000, 1010]]), ('normal control', [[[1050, 2150], [0, 1]], [0, 1000, 3000], 200, 0], [[1000, 2150], [0, 1]]), ('normal control', [[[1050, 1080], [1200, 2200], [2049, 2549]], [1100, 2150, 4000], 100, 0], [[1050, 1080], [1100, 2150], [2049, 2549]]), ('normal control', [[[2990, 3020], [3040, 4140], [3040, 4040]], [0, 2000, 3040], 100, 42], [[2990, 3020], [3040, 4140], [3040, 4040]])]]
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 snap probe[[3900, 3910], [101, 1201], [4000, 4060]][[3900, 3910], [101, 1201], [4000, 4060]]Passed
regression variant: end snap probe[[2000, 2600], [0, 801], [1200, 1260]][[2000, 2600], [0, 801], [1200, 1260]]Passed
partial repair probe: end snap probe[[0, 1158]][[0, 1158]]Passed
partial repair variant: end snap probe[[0, 958], [0, 958], [950, 960]][[0, 958], [0, 958], [950, 960]]Passed
boundary control[[1000, 1500]][[1000, 1500]]Passed
boundary control[[1200, 1800]][[1200, 1800]]Passed
normal control[[1000, 1010]][[1000, 1010]]Passed
normal control[[50, 80], [4000, 5050]][[50, 80], [4000, 5050]]Passed
normal control[[1251, 1261], [0, 920]][[1251, 1261], [0, 920]]Passed

SHA-256 / 9ccb9ea11070e9ca133fa4be86628624df10c96f394d3d59299a956739c2813f

Verification & scope

A deterministic bounded teaching model with a stipulated toy contract; it does not claim conformance to any subtitle standard. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:49:32.669211+00:00.

Case digest / 8a4147d363fdb155538c5862960a1b71ba4f947e26021231054d530aa70b1b3d