{"abstract":"Snapped cues overlap by several frames after a long cue.","category":"Subtitle cue timing","checks":9,"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).","evaluation_group":"w2-subtitle-cue-timing-frame-snap","failed_approach":"Recording b-1 treats the end frame as inclusive and lets the next cue share one frame.","family":"w2-subtitle-cue-timing-frame-snap-previous-end-tracking","id":"FA-77956","implementations":{"attempt":{"sha256":"7f63e8315c483ddd3240759a5cb7d2ae4e6eb406e003f99e3757def9365cc2db","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-1\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: previous end tracking', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('regression variant: previous end tracking', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: previous end tracking', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: previous end tracking', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('normal control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('normal control', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]])], [('regression: previous end tracking', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: previous end tracking', [[[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 probe: previous end tracking', [[[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]]), ('partial repair variant: previous end tracking', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[440, 474], [950, 951]], '25'], [[11, 12, 440, 480], [23, 24, 920, 960]]), ('normal control', [[[1168, 1169], [2368, 2373], [3068, 3073], [7340, 7360]], '24000/1001'], [[28, 29, 1167, 1209], [56, 57, 2335, 2377], [73, 74, 3044, 3086], [175, 177, 7298, 7382]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]])], [('regression: previous end tracking', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('regression variant: previous end tracking', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: previous end tracking', [[[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 variant: previous end tracking', [[[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]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[1002, 1036], [2535, 2576]], '30000/1001'], [[30, 32, 1001, 1067], [75, 78, 2502, 2602]]), ('normal control', [[[1018, 1058], [5972, 5992], [6013, 7014]], '30000/1001'], [[30, 32, 1001, 1067], [178, 180, 5939, 6006], [180, 211, 6006, 7040]]), ('normal control', [[[3001, 3041]], '30'], [[90, 92, 3000, 3066]])], [('regression: previous end tracking', [[[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: previous end tracking', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('partial repair probe: previous end tracking', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair variant: previous end tracking', [[[1041, 1082], [1098, 1099], [1101, 1106]], '24'], [[24, 26, 1000, 1083], [26, 27, 1083, 1125], [27, 28, 1125, 1166]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('normal control', [[[1018, 1023]], '60000/1001'], [[61, 62, 1017, 1034]]), ('normal control', [[[40, 6440]], '25'], [[1, 161, 40, 6440]]), ('normal control', [[[1018, 1058]], '24000/1001'], [[24, 26, 1001, 1084]])], [('regression: previous end tracking', [[[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]]), ('regression variant: previous end tracking', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]), ('partial repair probe: previous end tracking', [[[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: previous end tracking', [[[41, 61], [114, 119], [7500, 7520], [4541, 5542]], '24'], [[0, 2, 0, 83], [2, 3, 83, 125], [180, 181, 7500, 7541], [181, 182, 7541, 7583]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[500, 501]], '30000/1001'], [[14, 16, 467, 533]]), ('normal control', [[[1002, 1022]], '30000/1001'], [[30, 31, 1001, 1034]]), ('normal control', [[[40, 1041]], '24000/1001'], [[0, 25, 0, 1042]])]]\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":"08048670441eff1538b74e86c35bed0613324f7d9951786046151f2c24f0e491","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=a\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: previous end tracking', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('regression variant: previous end tracking', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: previous end tracking', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: previous end tracking', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('normal control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('normal control', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]])], [('regression: previous end tracking', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: previous end tracking', [[[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 probe: previous end tracking', [[[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]]), ('partial repair variant: previous end tracking', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[440, 474], [950, 951]], '25'], [[11, 12, 440, 480], [23, 24, 920, 960]]), ('normal control', [[[1168, 1169], [2368, 2373], [3068, 3073], [7340, 7360]], '24000/1001'], [[28, 29, 1167, 1209], [56, 57, 2335, 2377], [73, 74, 3044, 3086], [175, 177, 7298, 7382]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]])], [('regression: previous end tracking', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('regression variant: previous end tracking', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: previous end tracking', [[[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 variant: previous end tracking', [[[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]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[1002, 1036], [2535, 2576]], '30000/1001'], [[30, 32, 1001, 1067], [75, 78, 2502, 2602]]), ('normal control', [[[1018, 1058], [5972, 5992], [6013, 7014]], '30000/1001'], [[30, 32, 1001, 1067], [178, 180, 5939, 6006], [180, 211, 6006, 7040]]), ('normal control', [[[3001, 3041]], '30'], [[90, 92, 3000, 3066]])], [('regression: previous end tracking', [[[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: previous end tracking', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('partial repair probe: previous end tracking', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair variant: previous end tracking', [[[1041, 1082], [1098, 1099], [1101, 1106]], '24'], [[24, 26, 1000, 1083], [26, 27, 1083, 1125], [27, 28, 1125, 1166]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('normal control', [[[1018, 1023]], '60000/1001'], [[61, 62, 1017, 1034]]), ('normal control', [[[40, 6440]], '25'], [[1, 161, 40, 6440]]), ('normal control', [[[1018, 1058]], '24000/1001'], [[24, 26, 1001, 1084]])], [('regression: previous end tracking', [[[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]]), ('regression variant: previous end tracking', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]), ('partial repair probe: previous end tracking', [[[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: previous end tracking', [[[41, 61], [114, 119], [7500, 7520], [4541, 5542]], '24'], [[0, 2, 0, 83], [2, 3, 83, 125], [180, 181, 7500, 7541], [181, 182, 7541, 7583]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[500, 501]], '30000/1001'], [[14, 16, 467, 533]]), ('normal control', [[[1002, 1022]], '30000/1001'], [[30, 31, 1001, 1034]]), ('normal control', [[[40, 1041]], '24000/1001'], [[0, 25, 0, 1042]])]]\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"},"fixed":{"sha256":"09a813f3cd042c1294e301b0d6328c0608bf9440a3472098b0cc5a8ad800daf9","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: previous end tracking', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('regression variant: previous end tracking', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: previous end tracking', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: previous end tracking', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('normal control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('normal control', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]])], [('regression: previous end tracking', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: previous end tracking', [[[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 probe: previous end tracking', [[[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]]), ('partial repair variant: previous end tracking', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[440, 474], [950, 951]], '25'], [[11, 12, 440, 480], [23, 24, 920, 960]]), ('normal control', [[[1168, 1169], [2368, 2373], [3068, 3073], [7340, 7360]], '24000/1001'], [[28, 29, 1167, 1209], [56, 57, 2335, 2377], [73, 74, 3044, 3086], [175, 177, 7298, 7382]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]])], [('regression: previous end tracking', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('regression variant: previous end tracking', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: previous end tracking', [[[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 variant: previous end tracking', [[[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]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[1002, 1036], [2535, 2576]], '30000/1001'], [[30, 32, 1001, 1067], [75, 78, 2502, 2602]]), ('normal control', [[[1018, 1058], [5972, 5992], [6013, 7014]], '30000/1001'], [[30, 32, 1001, 1067], [178, 180, 5939, 6006], [180, 211, 6006, 7040]]), ('normal control', [[[3001, 3041]], '30'], [[90, 92, 3000, 3066]])], [('regression: previous end tracking', [[[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: previous end tracking', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('partial repair probe: previous end tracking', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair variant: previous end tracking', [[[1041, 1082], [1098, 1099], [1101, 1106]], '24'], [[24, 26, 1000, 1083], [26, 27, 1083, 1125], [27, 28, 1125, 1166]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('normal control', [[[1018, 1023]], '60000/1001'], [[61, 62, 1017, 1034]]), ('normal control', [[[40, 6440]], '25'], [[1, 161, 40, 6440]]), ('normal control', [[[1018, 1058]], '24000/1001'], [[24, 26, 1001, 1084]])], [('regression: previous end tracking', [[[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]]), ('regression variant: previous end tracking', [[[3000, 3020], [1966, 1986], [2476, 2517]], '30'], [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]]), ('partial repair probe: previous end tracking', [[[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: previous end tracking', [[[41, 61], [114, 119], [7500, 7520], [4541, 5542]], '24'], [[0, 2, 0, 83], [2, 3, 83, 125], [180, 181, 7500, 7541], [181, 182, 7541, 7583]]), ('boundary control', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[500, 501]], '30000/1001'], [[14, 16, 467, 533]]), ('normal control', [[[1002, 1022]], '30000/1001'], [[30, 31, 1001, 1034]]), ('normal control', [[[40, 1041]], '24000/1001'], [[0, 25, 0, 1042]])]]\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-previous-end-tracking","generated_at":"2026-09-29T14:49:30.713244+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.","repair":"Record the end frame of each emitted cue as the next boundary.","root_cause":"The running boundary records the start frame of each cue rather than its end frame.","sha256":"85886234882005dd15b4fbbbfa535a9bd5963c05df8f1b39917ac7b17b9cdb20","title":"Cue snapping to video frame grid: previous end tracking · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.985,"exit_code":1,"observations":[{"actual":[[0,1,0,41],[0,1,0,41]],"check":"regression: previous end tracking","expected":[[0,1,0,41],[1,2,41,83]],"passed":false},{"actual":[[28,29,1167,1209],[28,29,1167,1209]],"check":"regression variant: previous end tracking","expected":[[28,29,1167,1209],[29,30,1209,1251]],"passed":false},{"actual":[[150,153,5005,5105],[152,153,5071,5105],[152,153,5071,5105]],"check":"partial repair probe: previous end tracking","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":false},{"actual":[[90,91,3000,3033],[90,91,3000,3033],[90,91,3000,3033]],"check":"partial repair variant: previous end tracking","expected":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"passed":false},{"actual":[[0,1,0,40],[1,2,40,80]],"check":"boundary control","expected":[[0,1,0,40],[1,2,40,80]],"passed":true},{"actual":[[29,30,967,1001]],"check":"boundary control","expected":[[29,30,967,1001]],"passed":true},{"actual":[[24,48,1001,2002]],"check":"normal control","expected":[[24,48,1001,2002]],"passed":true},{"actual":[[71,73,2961,3044]],"check":"normal control","expected":[[71,73,2961,3044]],"passed":true},{"actual":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"check":"normal control","expected":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: previous end tracking\", \"actual\": [[0, 1, 0, 41], [0, 1, 0, 41]], \"expected\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"passed\": false}, {\"check\": \"regression variant: previous end tracking\", \"actual\": [[28, 29, 1167, 1209], [28, 29, 1167, 1209]], \"expected\": [[28, 29, 1167, 1209], [29, 30, 1209, 1251]], \"passed\": false}, {\"check\": \"partial repair probe: previous end tracking\", \"actual\": [[150, 153, 5005, 5105], [152, 153, 5071, 5105], [152, 153, 5071, 5105]], \"expected\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"passed\": false}, {\"check\": \"partial repair variant: previous end tracking\", \"actual\": [[90, 91, 3000, 3033], [90, 91, 3000, 3033], [90, 91, 3000, 3033]], \"expected\": [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[0, 1, 0, 40], [1, 2, 40, 80]], \"expected\": [[0, 1, 0, 40], [1, 2, 40, 80]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[29, 30, 967, 1001]], \"expected\": [[29, 30, 967, 1001]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[24, 48, 1001, 2002]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[71, 73, 2961, 3044]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": true}, {\"check\": \"normal control\", \"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}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.49,"exit_code":1,"observations":[{"actual":[[0,1,0,41],[0,1,0,41]],"check":"regression: previous end tracking","expected":[[0,1,0,41],[1,2,41,83]],"passed":false},{"actual":[[28,29,1167,1209],[28,29,1167,1209]],"check":"regression variant: previous end tracking","expected":[[28,29,1167,1209],[29,30,1209,1251]],"passed":false},{"actual":[[150,153,5005,5105],[152,153,5071,5105],[152,153,5071,5105]],"check":"partial repair probe: previous end tracking","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":false},{"actual":[[90,91,3000,3033],[90,91,3000,3033],[90,91,3000,3033]],"check":"partial repair variant: previous end tracking","expected":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"passed":false},{"actual":[[0,1,0,40],[1,2,40,80]],"check":"boundary control","expected":[[0,1,0,40],[1,2,40,80]],"passed":true},{"actual":[[29,30,967,1001]],"check":"boundary control","expected":[[29,30,967,1001]],"passed":true},{"actual":[[24,48,1001,2002]],"check":"normal control","expected":[[24,48,1001,2002]],"passed":true},{"actual":[[71,73,2961,3044]],"check":"normal control","expected":[[71,73,2961,3044]],"passed":true},{"actual":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"check":"normal control","expected":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: previous end tracking\", \"actual\": [[0, 1, 0, 41], [0, 1, 0, 41]], \"expected\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"passed\": false}, {\"check\": \"regression variant: previous end tracking\", \"actual\": [[28, 29, 1167, 1209], [28, 29, 1167, 1209]], \"expected\": [[28, 29, 1167, 1209], [29, 30, 1209, 1251]], \"passed\": false}, {\"check\": \"partial repair probe: previous end tracking\", \"actual\": [[150, 153, 5005, 5105], [152, 153, 5071, 5105], [152, 153, 5071, 5105]], \"expected\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"passed\": false}, {\"check\": \"partial repair variant: previous end tracking\", \"actual\": [[90, 91, 3000, 3033], [90, 91, 3000, 3033], [90, 91, 3000, 3033]], \"expected\": [[90, 91, 3000, 3033], [91, 92, 3033, 3066], [92, 93, 3066, 3100]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[0, 1, 0, 40], [1, 2, 40, 80]], \"expected\": [[0, 1, 0, 40], [1, 2, 40, 80]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[29, 30, 967, 1001]], \"expected\": [[29, 30, 967, 1001]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[24, 48, 1001, 2002]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[71, 73, 2961, 3044]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": true}, {\"check\": \"normal control\", \"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}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.459,"exit_code":0,"observations":[{"actual":[[0,1,0,41],[1,2,41,83]],"check":"regression: previous end tracking","expected":[[0,1,0,41],[1,2,41,83]],"passed":true},{"actual":[[28,29,1167,1209],[29,30,1209,1251]],"check":"regression variant: previous end tracking","expected":[[28,29,1167,1209],[29,30,1209,1251]],"passed":true},{"actual":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"check":"partial repair probe: previous end tracking","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":true},{"actual":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"check":"partial repair variant: previous end tracking","expected":[[90,91,3000,3033],[91,92,3033,3066],[92,93,3066,3100]],"passed":true},{"actual":[[0,1,0,40],[1,2,40,80]],"check":"boundary control","expected":[[0,1,0,40],[1,2,40,80]],"passed":true},{"actual":[[29,30,967,1001]],"check":"boundary control","expected":[[29,30,967,1001]],"passed":true},{"actual":[[24,48,1001,2002]],"check":"normal control","expected":[[24,48,1001,2002]],"passed":true},{"actual":[[71,73,2961,3044]],"check":"normal control","expected":[[71,73,2961,3044]],"passed":true},{"actual":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"check":"normal control","expected":[[35,37,1459,1543],[60,84,2502,3503],[136,138,5672,5755]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: previous end tracking\", \"actual\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"expected\": [[0, 1, 0, 41], [1, 2, 41, 83]], \"passed\": true}, {\"check\": \"regression variant: previous end tracking\", \"actual\": [[28, 29, 1167, 1209], [29, 30, 1209, 1251]], \"expected\": [[28, 29, 1167, 1209], [29, 30, 1209, 1251]], \"passed\": true}, {\"check\": \"partial repair probe: previous end tracking\", \"actual\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"expected\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"passed\": true}, {\"check\": \"partial repair variant: previous end tracking\", \"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}, {\"check\": \"boundary control\", \"actual\": [[0, 1, 0, 40], [1, 2, 40, 80]], \"expected\": [[0, 1, 0, 40], [1, 2, 40, 80]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[29, 30, 967, 1001]], \"expected\": [[29, 30, 967, 1001]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[24, 48, 1001, 2002]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[71, 73, 2961, 3044]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": true}, {\"check\": \"normal control\", \"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}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}