{"abstract":"Extended cues butt directly against the following cue.","category":"Subtitle cue timing","checks":9,"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.","contract_signature":"cues, min_dur, min_gap","evaluation_group":"w2-subtitle-cue-timing-min-duration","failed_approach":"The off-by-one limit still leaves the gap one millisecond short.","family":"w2-subtitle-cue-timing-min-duration-neighbour-gap-limit","id":"FA-77996","implementations":{"attempt":{"sha256":"f1e1f1113909450808a71586ef0c36be3ed93024f879da16fb6f9b61352ae70e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cues, min_dur, min_gap):\n    out=[list(c) for c in cues]\n    order=sorted(range(len(out)),key=lambda k:(out[k][0],k))\n    for pos,i in enumerate(order):\n        c=out[i]\n        if c[1]-c[0]>=min_dur:\n            continue\n        target=c[0]+min_dur\n        if pos+1<len(order):\n            target=min(target,out[order[pos+1]][0]-min_gap+1)\n        c[1]=max(c[1],target)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: neighbour gap limit', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('regression variant: neighbour gap limit', [[[0, 100], [200, 1400]], 1200, 40], [[0, 160], [200, 1400]]), ('partial repair probe: neighbour gap limit', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('partial repair variant: neighbour gap limit', [[[500, 1701], [200, 201], [1000, 1001]], 1200, 0], [[500, 1701], [200, 500], [1000, 2200]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('normal control', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('normal control', [[[1500, 2700], [1500, 2700]], 1200, 0], [[1500, 2700], [1500, 2700]])], [('regression: neighbour gap limit', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('regression variant: neighbour gap limit', [[[200, 300], [800, 801]], 1000, 80], [[200, 720], [800, 1800]]), ('partial repair probe: neighbour gap limit', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('partial repair variant: neighbour gap limit', [[[0, 100], [200, 1400]], 1200, 40], [[0, 160], [200, 1400]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('normal control', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('normal control', [[[2000, 2999], [500, 1501]], 1000, 80], [[2000, 3000], [500, 1501]]), ('normal control', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]])], [('regression: neighbour gap limit', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: neighbour gap limit', [[[200, 500], [1394, 2593], [3000, 3300]], 1200, 80], [[200, 1314], [1394, 2594], [3000, 4200]]), ('partial repair probe: neighbour gap limit', [[[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: neighbour gap limit', [[[1500, 1600], [1500, 1600], [2000, 3200], [3000, 5000]], 1200, 0], [[1500, 1600], [1500, 2000], [2000, 3200], [3000, 5000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[2000, 2100], [3000, 3001]], 700, 0], [[2000, 2700], [3000, 3700]]), ('normal control', [[[200, 1201], [2000, 3001], [1000, 2000], [800, 1800]], 1000, 0], [[200, 1201], [2000, 3001], [1000, 2000], [800, 1800]]), ('normal control', [[[500, 501]], 1200, 40], [[500, 1700]])], [('regression: neighbour gap limit', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('regression variant: neighbour gap limit', [[[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 201]], 1000, 40], [[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 760]]), ('partial repair probe: neighbour gap limit', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('partial repair variant: neighbour gap limit', [[[800, 1100], [1500, 2500], [2000, 2100], [2000, 2999]], 1000, 0], [[800, 1500], [1500, 2500], [2000, 2100], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('normal control', [[[200, 900], [3000, 3701]], 700, 40], [[200, 900], [3000, 3701]]), ('normal control', [[[200, 900], [0, 699], [800, 2800]], 700, 0], [[200, 900], [0, 699], [800, 2800]]), ('normal control', [[[0, 1000], [1000, 2001], [1000, 2000], [3000, 4001], [3000, 3300]], 1000, 80], [[0, 1000], [1000, 2001], [1000, 2000], [3000, 4001], [3000, 4000]])], [('regression: neighbour gap limit', [[[500, 501], [200, 1160], [0, 1], [500, 1460]], 1000, 40], [[500, 501], [200, 1160], [0, 160], [500, 1500]]), ('regression variant: neighbour gap limit', [[[0, 300], [500, 1501], [800, 1720], [1500, 2499], [2000, 2920]], 1000, 80], [[0, 420], [500, 1501], [800, 1720], [1500, 2499], [2000, 3000]]), ('partial repair probe: neighbour gap limit', [[[800, 2800], [800, 900], [1500, 1501], [1000, 1700], [3000, 3300]], 700, 0], [[800, 2800], [800, 1000], [1500, 2200], [1000, 1700], [3000, 3700]]), ('partial repair variant: neighbour gap limit', [[[200, 300], [800, 801]], 1000, 80], [[200, 720], [800, 1800]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[1500, 2701], [2000, 2300]], 1200, 40], [[1500, 2701], [2000, 3200]]), ('normal control', [[[0, 100], [1000, 1001]], 700, 80], [[0, 700], [1000, 1700]]), ('normal control', [[[655, 1655], [1000, 2000], [1500, 2500], [2000, 2300], [3000, 3300]], 1000, 0], [[655, 1655], [1000, 2000], [1500, 2500], [2000, 3000], [3000, 4000]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"af11d7b4f58e89e5418820d8978f029a2f77cf268c9f28c8d8c149d7b523552a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cues, min_dur, min_gap):\n    out=[list(c) for c in cues]\n    order=sorted(range(len(out)),key=lambda k:(out[k][0],k))\n    for pos,i in enumerate(order):\n        c=out[i]\n        if c[1]-c[0]>=min_dur:\n            continue\n        target=c[0]+min_dur\n        if pos+1<len(order):\n            target=min(target,out[order[pos+1]][0])\n        c[1]=max(c[1],target)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: neighbour gap limit', [[[0, 300], [500, 3000]], 1000, 80], [[0, 420], [500, 3000]]), ('regression variant: neighbour gap limit', [[[0, 100], [200, 1400]], 1200, 40], [[0, 160], [200, 1400]]), ('partial repair probe: neighbour gap limit', [[[0, 1], [200, 900], [2000, 4000]], 700, 0], [[0, 200], [200, 900], [2000, 4000]]), ('partial repair variant: neighbour gap limit', [[[500, 1701], [200, 201], [1000, 1001]], 1200, 0], [[500, 1701], [200, 500], [1000, 2200]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[1000, 2120], [200, 1400]], 1200, 80], [[1000, 2200], [200, 1400]]), ('normal control', [[[2000, 2001], [800, 1100]], 1000, 80], [[2000, 3000], [800, 1800]]), ('normal control', [[[1500, 2700], [1500, 2700]], 1200, 0], [[1500, 2700], [1500, 2700]])], [('regression: neighbour gap limit', [[[500, 600], [0, 100]], 700, 40], [[500, 1200], [0, 460]]), ('regression variant: neighbour gap limit', [[[200, 300], [800, 801]], 1000, 80], [[200, 720], [800, 1800]]), ('partial repair probe: neighbour gap limit', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('partial repair variant: neighbour gap limit', [[[0, 100], [200, 1400]], 1200, 40], [[0, 160], [200, 1400]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('normal control', [[[479, 2479], [2000, 2300], [1000, 2120], [800, 2001]], 1200, 80], [[479, 2479], [2000, 3200], [1000, 2120], [800, 2001]]), ('normal control', [[[2000, 2999], [500, 1501]], 1000, 80], [[2000, 3000], [500, 1501]]), ('normal control', [[[200, 500], [496, 1497], [800, 1799], [3000, 3999]], 1000, 40], [[200, 500], [496, 1497], [800, 1800], [3000, 4000]])], [('regression: neighbour gap limit', [[[1000, 1960], [2000, 2300], [3000, 3999], [3000, 3001]], 1000, 40], [[1000, 1960], [2000, 2960], [3000, 3999], [3000, 4000]]), ('regression variant: neighbour gap limit', [[[200, 500], [1394, 2593], [3000, 3300]], 1200, 80], [[200, 1314], [1394, 2594], [3000, 4200]]), ('partial repair probe: neighbour gap limit', [[[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: neighbour gap limit', [[[1500, 1600], [1500, 1600], [2000, 3200], [3000, 5000]], 1200, 0], [[1500, 1600], [1500, 2000], [2000, 3200], [3000, 5000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[2000, 2100], [3000, 3001]], 700, 0], [[2000, 2700], [3000, 3700]]), ('normal control', [[[200, 1201], [2000, 3001], [1000, 2000], [800, 1800]], 1000, 0], [[200, 1201], [2000, 3001], [1000, 2000], [800, 1800]]), ('normal control', [[[500, 501]], 1200, 40], [[500, 1700]])], [('regression: neighbour gap limit', [[[200, 500], [500, 800], [1500, 3500], [1500, 2699], [2000, 2001]], 1200, 40], [[200, 500], [500, 1460], [1500, 3500], [1500, 2699], [2000, 3200]]), ('regression variant: neighbour gap limit', [[[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 201]], 1000, 40], [[1500, 2501], [800, 1801], [1000, 2000], [200, 300], [200, 760]]), ('partial repair probe: neighbour gap limit', [[[0, 1001], [1500, 2500], [3000, 3999], [800, 2800], [0, 1]], 1000, 0], [[0, 1001], [1500, 2500], [3000, 4000], [800, 2800], [0, 800]]), ('partial repair variant: neighbour gap limit', [[[800, 1100], [1500, 2500], [2000, 2100], [2000, 2999]], 1000, 0], [[800, 1500], [1500, 2500], [2000, 2100], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('normal control', [[[200, 900], [3000, 3701]], 700, 40], [[200, 900], [3000, 3701]]), ('normal control', [[[200, 900], [0, 699], [800, 2800]], 700, 0], [[200, 900], [0, 699], [800, 2800]]), ('normal control', [[[0, 1000], [1000, 2001], [1000, 2000], [3000, 4001], [3000, 3300]], 1000, 80], [[0, 1000], [1000, 2001], [1000, 2000], [3000, 4001], [3000, 4000]])], [('regression: neighbour gap limit', [[[500, 501], [200, 1160], [0, 1], [500, 1460]], 1000, 40], [[500, 501], [200, 1160], [0, 160], [500, 1500]]), ('regression variant: neighbour gap limit', [[[0, 300], [500, 1501], [800, 1720], [1500, 2499], [2000, 2920]], 1000, 80], [[0, 420], [500, 1501], [800, 1720], [1500, 2499], [2000, 3000]]), ('partial repair probe: neighbour gap limit', [[[800, 2800], [800, 900], [1500, 1501], [1000, 1700], [3000, 3300]], 700, 0], [[800, 2800], [800, 1000], [1500, 2200], [1000, 1700], [3000, 3700]]), ('partial repair variant: neighbour gap limit', [[[200, 300], [800, 801]], 1000, 80], [[200, 720], [800, 1800]]), ('boundary control', [[[0, 300], [2000, 3000]], 1000, 80], [[0, 1000], [2000, 3000]]), ('boundary control', [[[0, 1000]], 1000, 0], [[0, 1000]]), ('normal control', [[[1500, 2701], [2000, 2300]], 1200, 40], [[1500, 2701], [2000, 3200]]), ('normal control', [[[0, 100], [1000, 1001]], 700, 80], [[0, 700], [1000, 1700]]), ('normal control', [[[655, 1655], [1000, 2000], [1500, 2500], [2000, 2300], [3000, 3300]], 1000, 0], [[655, 1655], [1000, 2000], [1500, 2500], [2000, 3000], [3000, 4000]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-subtitle-cue-timing-min-duration-neighbour-gap-limit","generated_at":"2026-09-29T14:49:31.274452+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Subtitle timing defects shift, hide or overlap captions that viewers depend on for comprehension and accessibility.","root_cause":"The neighbour limit ignores the required minimum gap.","sha256":"1749352aeea4710fe63c806a268c4bc0a4e7e48b1e56b0a2404d812071b346e2","title":"Minimum cue duration extension: neighbour gap limit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.854,"exit_code":1,"observations":[{"actual":[[0,421],[500,3000]],"check":"regression: neighbour gap limit","expected":[[0,420],[500,3000]],"passed":false},{"actual":[[0,161],[200,1400]],"check":"regression variant: neighbour gap limit","expected":[[0,160],[200,1400]],"passed":false},{"actual":[[0,201],[200,900],[2000,4000]],"check":"partial repair probe: neighbour gap limit","expected":[[0,200],[200,900],[2000,4000]],"passed":false},{"actual":[[500,1701],[200,501],[1000,2200]],"check":"partial repair variant: neighbour gap limit","expected":[[500,1701],[200,500],[1000,2200]],"passed":false},{"actual":[[0,1000],[2000,3000]],"check":"boundary control","expected":[[0,1000],[2000,3000]],"passed":true},{"actual":[[0,1000]],"check":"boundary control","expected":[[0,1000]],"passed":true},{"actual":[[1000,2200],[200,1400]],"check":"normal control","expected":[[1000,2200],[200,1400]],"passed":true},{"actual":[[2000,3000],[800,1800]],"check":"normal control","expected":[[2000,3000],[800,1800]],"passed":true},{"actual":[[1500,2700],[1500,2700]],"check":"normal control","expected":[[1500,2700],[1500,2700]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: neighbour gap limit\", \"actual\": [[0, 421], [500, 3000]], \"expected\": [[0, 420], [500, 3000]], \"passed\": false}, {\"check\": \"regression variant: neighbour gap limit\", \"actual\": [[0, 161], [200, 1400]], \"expected\": [[0, 160], [200, 1400]], \"passed\": false}, {\"check\": \"partial repair probe: neighbour gap limit\", \"actual\": [[0, 201], [200, 900], [2000, 4000]], \"expected\": [[0, 200], [200, 900], [2000, 4000]], \"passed\": false}, {\"check\": \"partial repair variant: neighbour gap limit\", \"actual\": [[500, 1701], [200, 501], [1000, 2200]], \"expected\": [[500, 1701], [200, 500], [1000, 2200]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[0, 1000], [2000, 3000]], \"expected\": [[0, 1000], [2000, 3000]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[0, 1000]], \"expected\": [[0, 1000]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1000, 2200], [200, 1400]], \"expected\": [[1000, 2200], [200, 1400]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[2000, 3000], [800, 1800]], \"expected\": [[2000, 3000], [800, 1800]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1500, 2700], [1500, 2700]], \"expected\": [[1500, 2700], [1500, 2700]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.979,"exit_code":1,"observations":[{"actual":[[0,500],[500,3000]],"check":"regression: neighbour gap limit","expected":[[0,420],[500,3000]],"passed":false},{"actual":[[0,200],[200,1400]],"check":"regression variant: neighbour gap limit","expected":[[0,160],[200,1400]],"passed":false},{"actual":[[0,200],[200,900],[2000,4000]],"check":"partial repair probe: neighbour gap limit","expected":[[0,200],[200,900],[2000,4000]],"passed":true},{"actual":[[500,1701],[200,500],[1000,2200]],"check":"partial repair variant: neighbour gap limit","expected":[[500,1701],[200,500],[1000,2200]],"passed":true},{"actual":[[0,1000],[2000,3000]],"check":"boundary control","expected":[[0,1000],[2000,3000]],"passed":true},{"actual":[[0,1000]],"check":"boundary control","expected":[[0,1000]],"passed":true},{"actual":[[1000,2200],[200,1400]],"check":"normal control","expected":[[1000,2200],[200,1400]],"passed":true},{"actual":[[2000,3000],[800,1800]],"check":"normal control","expected":[[2000,3000],[800,1800]],"passed":true},{"actual":[[1500,2700],[1500,2700]],"check":"normal control","expected":[[1500,2700],[1500,2700]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: neighbour gap limit\", \"actual\": [[0, 500], [500, 3000]], \"expected\": [[0, 420], [500, 3000]], \"passed\": false}, {\"check\": \"regression variant: neighbour gap limit\", \"actual\": [[0, 200], [200, 1400]], \"expected\": [[0, 160], [200, 1400]], \"passed\": false}, {\"check\": \"partial repair probe: neighbour gap limit\", \"actual\": [[0, 200], [200, 900], [2000, 4000]], \"expected\": [[0, 200], [200, 900], [2000, 4000]], \"passed\": true}, {\"check\": \"partial repair variant: neighbour gap limit\", \"actual\": [[500, 1701], [200, 500], [1000, 2200]], \"expected\": [[500, 1701], [200, 500], [1000, 2200]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[0, 1000], [2000, 3000]], \"expected\": [[0, 1000], [2000, 3000]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[0, 1000]], \"expected\": [[0, 1000]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1000, 2200], [200, 1400]], \"expected\": [[1000, 2200], [200, 1400]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[2000, 3000], [800, 1800]], \"expected\": [[2000, 3000], [800, 1800]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1500, 2700], [1500, 2700]], \"expected\": [[1500, 2700], [1500, 2700]], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}