{"abstract":"Cues vanish one frame before the spoken line ends.","category":"Subtitle cue timing","checks":8,"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).","contract_signature":"cues, fps","evaluation_group":"w2-subtitle-cue-timing-frame-snap","failed_approach":"Adding one frame after flooring over-extends ends that already fall exactly on a frame boundary.","family":"w2-subtitle-cue-timing-frame-snap-end-frame-ceiling","id":"FA-77946","implementations":{"attempt":{"sha256":"29dbd795309cf4135f26edf0438ff232cb4e5d5430047e33a8a2037227ec56db","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cues, fps):\n    num,den=(fps.split('/')+['1'])[:2]\n    num,den=int(num),int(den)\n    out=[]\n    prev_end=None\n    for start,end in cues:\n        a=(start*num)//(1000*den)\n        b=(end*num)//(1000*den)+1\n        if b<=a:\n            b=a+1\n        if prev_end is not None and a<prev_end:\n            a=prev_end\n            b=max(b,a+1)\n        prev_end=b\n        out.append([a,b]+[(x*1000*den)//num for x in (a,b)])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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]])]]\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":"540742bb12c49752ef8aa39da47c6221e31978c3e70326eefd98c6e07da58d35","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cues, fps):\n    num,den=(fps.split('/')+['1'])[:2]\n    num,den=int(num),int(den)\n    out=[]\n    prev_end=None\n    for start,end in cues:\n        a=(start*num)//(1000*den)\n        b=(end*num)//(1000*den)\n        if b<=a:\n            b=a+1\n        if prev_end is not None and a<prev_end:\n            a=prev_end\n            b=max(b,a+1)\n        prev_end=b\n        out.append([a,b]+[(x*1000*den)//num for x in (a,b)])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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]])]]\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-frame-snap-end-frame-ceiling","generated_at":"2026-09-29T14:49:30.680872+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 end frame is floored, cutting the partially covered final frame.","sha256":"27b8ce4240bae7c7170981e4fd869fc5406bc067196165a5ab6712416f827cac","title":"Cue snapping to video frame grid: end frame ceiling · 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.39,"exit_code":1,"observations":[{"actual":[[71,73,2961,3044]],"check":"regression: end frame ceiling","expected":[[71,73,2961,3044]],"passed":true},{"actual":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"check":"regression variant: end frame ceiling","expected":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"passed":true},{"actual":[[24,49,1001,2043]],"check":"partial repair probe: end frame ceiling","expected":[[24,48,1001,2002]],"passed":false},{"actual":[[178,208,7416,8666],[208,220,8666,9166]],"check":"partial repair variant: end frame ceiling","expected":[[178,207,7416,8625],[207,220,8625,9166]],"passed":false},{"actual":[[0,1,0,41],[1,2,41,83]],"check":"boundary control","expected":[[0,1,0,41],[1,2,41,83]],"passed":true},{"actual":[[150,151,3000,3020]],"check":"normal control","expected":[[150,151,3000,3020]],"passed":true},{"actual":[[11,12,440,480],[23,24,920,960]],"check":"normal control","expected":[[11,12,440,480],[23,24,920,960]],"passed":true},{"actual":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"check":"normal control","expected":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: end frame ceiling\", \"actual\": [[71, 73, 2961, 3044]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": true}, {\"check\": \"regression variant: end frame ceiling\", \"actual\": [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]], \"expected\": [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]], \"passed\": true}, {\"check\": \"partial repair probe: end frame ceiling\", \"actual\": [[24, 49, 1001, 2043]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": false}, {\"check\": \"partial repair variant: end frame ceiling\", \"actual\": [[178, 208, 7416, 8666], [208, 220, 8666, 9166]], \"expected\": [[178, 207, 7416, 8625], [207, 220, 8625, 9166]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"expected\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[150, 151, 3000, 3020]], \"expected\": [[150, 151, 3000, 3020]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[11, 12, 440, 480], [23, 24, 920, 960]], \"expected\": [[11, 12, 440, 480], [23, 24, 920, 960]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]], \"expected\": [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.626,"exit_code":1,"observations":[{"actual":[[71,72,2961,3003]],"check":"regression: end frame ceiling","expected":[[71,73,2961,3044]],"passed":false},{"actual":[[35,36,1459,1501],[60,83,2502,3461],[136,137,5672,5714]],"check":"regression variant: end frame ceiling","expected":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"passed":false},{"actual":[[24,48,1001,2002]],"check":"partial repair probe: end frame ceiling","expected":[[24,48,1001,2002]],"passed":true},{"actual":[[178,207,7416,8625],[207,219,8625,9125]],"check":"partial repair variant: end frame ceiling","expected":[[178,207,7416,8625],[207,220,8625,9166]],"passed":false},{"actual":[[0,1,0,41],[1,2,41,83]],"check":"boundary control","expected":[[0,1,0,41],[1,2,41,83]],"passed":true},{"actual":[[150,151,3000,3020]],"check":"normal control","expected":[[150,151,3000,3020]],"passed":true},{"actual":[[11,12,440,480],[23,24,920,960]],"check":"normal control","expected":[[11,12,440,480],[23,24,920,960]],"passed":true},{"actual":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"check":"normal control","expected":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: end frame ceiling\", \"actual\": [[71, 72, 2961, 3003]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": false}, {\"check\": \"regression variant: end frame ceiling\", \"actual\": [[35, 36, 1459, 1501], [60, 83, 2502, 3461], [136, 137, 5672, 5714]], \"expected\": [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]], \"passed\": false}, {\"check\": \"partial repair probe: end frame ceiling\", \"actual\": [[24, 48, 1001, 2002]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": true}, {\"check\": \"partial repair variant: end frame ceiling\", \"actual\": [[178, 207, 7416, 8625], [207, 219, 8625, 9125]], \"expected\": [[178, 207, 7416, 8625], [207, 220, 8625, 9166]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"expected\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[150, 151, 3000, 3020]], \"expected\": [[150, 151, 3000, 3020]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[11, 12, 440, 480], [23, 24, 920, 960]], \"expected\": [[11, 12, 440, 480], [23, 24, 920, 960]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]], \"expected\": [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]], \"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."}}