{"abstract":"Cues appear a frame after the dialogue begins.","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":"Rounding the start to the nearest frame still moves starts in the second half of a frame one frame late.","family":"w2-subtitle-cue-timing-frame-snap-start-frame-floor","id":"FA-77941","implementations":{"attempt":{"sha256":"e599dd19b7495e5a9eb3c3cac97699a08354ef8ab6edb05f38ab09d632955d6b","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+500*den)//(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: start frame floor', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('regression variant: start frame floor', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair probe: start frame floor', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('partial repair variant: start frame floor', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[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]]), ('normal control', [[[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]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]])], [('regression: start frame floor', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('regression variant: start frame floor', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: start frame floor', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('partial repair variant: start frame floor', [[[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', [[[3640, 3645], [2380, 3160], [3960, 4961], [3947, 3952]], '50'], [[182, 183, 3640, 3660], [183, 184, 3660, 3680], [198, 249, 3960, 4980], [249, 250, 4980, 5000]]), ('normal control', [[[80, 1081]], '25'], [[2, 28, 80, 1120]]), ('normal control', [[[0, 1001], [701, 735]], '30'], [[0, 31, 0, 1033], [31, 32, 1033, 1066]])], [('regression: start frame floor', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: start frame floor', [[[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: start frame floor', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: start frame floor', [[[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]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[6960, 7000]], '25'], [[174, 175, 6960, 7000]]), ('normal control', [[[4560, 4561]], '25'], [[114, 115, 4560, 4600]]), ('normal control', [[[500, 1500], [511, 552], [568, 573], [440, 481]], '50'], [[25, 75, 500, 1500], [75, 76, 1500, 1520], [76, 77, 1520, 1540], [77, 78, 1540, 1560]])], [('regression: start frame floor', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: start frame floor', [[[3001, 3006]], '50'], [[150, 151, 3000, 3020]]), ('partial repair probe: start frame floor', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair variant: start frame floor', [[[1041, 1082], [1098, 1099], [1101, 1106]], '24'], [[24, 26, 1000, 1083], [26, 27, 1083, 1125], [27, 28, 1125, 1166]]), ('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', [[[3560, 3880]], '25'], [[89, 97, 3560, 3880]]), ('normal control', [[[4004, 4009], [2919, 2960]], '24000/1001'], [[96, 97, 4004, 4045], [97, 98, 4045, 4087]]), ('normal control', [[[0, 40], [5125, 5165]], '24'], [[0, 1, 0, 41], [123, 124, 5125, 5166]])], [('regression: start frame floor', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: start frame floor', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: start frame floor', [[[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: start frame floor', [[[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', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[1360, 1394], [1900, 2901], [3100, 3141], [2160, 3160]], '50'], [[68, 70, 1360, 1400], [95, 146, 1900, 2920], [155, 158, 3100, 3160], [158, 159, 3160, 3180]]), ('normal control', [[[1040, 1120]], '25'], [[26, 28, 1040, 1120]]), ('normal control', [[[3700, 3720]], '30'], [[111, 112, 3700, 3733]])]]\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":"836da7c144ab1b97bc974ff04a91d3609a80e41074131c0cbf1912444b2c4dc3","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: start frame floor', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('regression variant: start frame floor', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair probe: start frame floor', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('partial repair variant: start frame floor', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[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]]), ('normal control', [[[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]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]])], [('regression: start frame floor', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('regression variant: start frame floor', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: start frame floor', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('partial repair variant: start frame floor', [[[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', [[[3640, 3645], [2380, 3160], [3960, 4961], [3947, 3952]], '50'], [[182, 183, 3640, 3660], [183, 184, 3660, 3680], [198, 249, 3960, 4980], [249, 250, 4980, 5000]]), ('normal control', [[[80, 1081]], '25'], [[2, 28, 80, 1120]]), ('normal control', [[[0, 1001], [701, 735]], '30'], [[0, 31, 0, 1033], [31, 32, 1033, 1066]])], [('regression: start frame floor', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: start frame floor', [[[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: start frame floor', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: start frame floor', [[[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]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[6960, 7000]], '25'], [[174, 175, 6960, 7000]]), ('normal control', [[[4560, 4561]], '25'], [[114, 115, 4560, 4600]]), ('normal control', [[[500, 1500], [511, 552], [568, 573], [440, 481]], '50'], [[25, 75, 500, 1500], [75, 76, 1500, 1520], [76, 77, 1520, 1540], [77, 78, 1540, 1560]])], [('regression: start frame floor', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: start frame floor', [[[3001, 3006]], '50'], [[150, 151, 3000, 3020]]), ('partial repair probe: start frame floor', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair variant: start frame floor', [[[1041, 1082], [1098, 1099], [1101, 1106]], '24'], [[24, 26, 1000, 1083], [26, 27, 1083, 1125], [27, 28, 1125, 1166]]), ('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', [[[3560, 3880]], '25'], [[89, 97, 3560, 3880]]), ('normal control', [[[4004, 4009], [2919, 2960]], '24000/1001'], [[96, 97, 4004, 4045], [97, 98, 4045, 4087]]), ('normal control', [[[0, 40], [5125, 5165]], '24'], [[0, 1, 0, 41], [123, 124, 5125, 5166]])], [('regression: start frame floor', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: start frame floor', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: start frame floor', [[[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: start frame floor', [[[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', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[1360, 1394], [1900, 2901], [3100, 3141], [2160, 3160]], '50'], [[68, 70, 1360, 1400], [95, 146, 1900, 2920], [155, 158, 3100, 3160], [158, 159, 3160, 3180]]), ('normal control', [[[1040, 1120]], '25'], [[26, 28, 1040, 1120]]), ('normal control', [[[3700, 3720]], '30'], [[111, 112, 3700, 3733]])]]\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":"7cb8f72399a09d136b40255e8c1fed2588a39e97f1978af76dc123ba2f81c469","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: start frame floor', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('regression variant: start frame floor', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair probe: start frame floor', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('partial repair variant: start frame floor', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[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]]), ('normal control', [[[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]]), ('normal control', [[[1000, 1005]], '50'], [[50, 51, 1000, 1020]])], [('regression: start frame floor', [[[10, 20], [15, 30]], '24'], [[0, 1, 0, 41], [1, 2, 41, 83]]), ('regression variant: start frame floor', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: start frame floor', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('partial repair variant: start frame floor', [[[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', [[[3640, 3645], [2380, 3160], [3960, 4961], [3947, 3952]], '50'], [[182, 183, 3640, 3660], [183, 184, 3660, 3680], [198, 249, 3960, 4980], [249, 250, 4980, 5000]]), ('normal control', [[[80, 1081]], '25'], [[2, 28, 80, 1120]]), ('normal control', [[[0, 1001], [701, 735]], '30'], [[0, 31, 0, 1033], [31, 32, 1033, 1066]])], [('regression: start frame floor', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: start frame floor', [[[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: start frame floor', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: start frame floor', [[[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]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[6960, 7000]], '25'], [[174, 175, 6960, 7000]]), ('normal control', [[[4560, 4561]], '25'], [[114, 115, 4560, 4600]]), ('normal control', [[[500, 1500], [511, 552], [568, 573], [440, 481]], '50'], [[25, 75, 500, 1500], [75, 76, 1500, 1520], [76, 77, 1520, 1540], [77, 78, 1540, 1560]])], [('regression: start frame floor', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: start frame floor', [[[3001, 3006]], '50'], [[150, 151, 3000, 3020]]), ('partial repair probe: start frame floor', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair variant: start frame floor', [[[1041, 1082], [1098, 1099], [1101, 1106]], '24'], [[24, 26, 1000, 1083], [26, 27, 1083, 1125], [27, 28, 1125, 1166]]), ('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', [[[3560, 3880]], '25'], [[89, 97, 3560, 3880]]), ('normal control', [[[4004, 4009], [2919, 2960]], '24000/1001'], [[96, 97, 4004, 4045], [97, 98, 4045, 4087]]), ('normal control', [[[0, 40], [5125, 5165]], '24'], [[0, 1, 0, 41], [123, 124, 5125, 5166]])], [('regression: start frame floor', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: start frame floor', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: start frame floor', [[[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: start frame floor', [[[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', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('boundary control', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('normal control', [[[1360, 1394], [1900, 2901], [3100, 3141], [2160, 3160]], '50'], [[68, 70, 1360, 1400], [95, 146, 1900, 2920], [155, 158, 3100, 3160], [158, 159, 3160, 3180]]), ('normal control', [[[1040, 1120]], '25'], [[26, 28, 1040, 1120]]), ('normal control', [[[3700, 3720]], '30'], [[111, 112, 3700, 3733]])]]\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-start-frame-floor","generated_at":"2026-09-29T14:49:30.638134+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":"Floor the start onto the frame that contains it.","root_cause":"The start frame is rounded up with a ceiling instead of floored.","sha256":"1058fc8739fa88d21e0f7005f2c47d85241dab18d53858d96537262661c1ff1a","title":"Cue snapping to video frame grid: start frame floor · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.694,"exit_code":1,"observations":[{"actual":[[30,31,1001,1034]],"check":"regression: start frame floor","expected":[[29,30,967,1001]],"passed":false},{"actual":[[151,153,5038,5105],[153,154,5105,5138],[154,155,5138,5171]],"check":"regression variant: start frame floor","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":false},{"actual":[[2,5,33,83],[80,83,1334,1384],[83,84,1384,1401]],"check":"partial repair probe: start frame floor","expected":[[1,5,16,83],[80,83,1334,1384],[83,84,1384,1401]],"passed":false},{"actual":[[1,51,20,1020],[51,52,1020,1040],[86,87,1720,1740]],"check":"partial repair variant: start frame floor","expected":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"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":[[24,48,1001,2002]],"check":"boundary control","expected":[[24,48,1001,2002]],"passed":true},{"actual":[[150,153,3000,3060],[153,154,3060,3080],[176,178,3520,3560],[178,179,3560,3580]],"check":"normal control","expected":[[150,153,3000,3060],[153,154,3060,3080],[176,178,3520,3560],[178,179,3560,3580]],"passed":true},{"actual":[[125,197,2500,3940],[197,198,3940,3960],[198,218,3960,4360],[218,219,4360,4380]],"check":"normal control","expected":[[125,197,2500,3940],[197,198,3940,3960],[198,218,3960,4360],[218,219,4360,4380]],"passed":true},{"actual":[[50,51,1000,1020]],"check":"normal control","expected":[[50,51,1000,1020]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: start frame floor\", \"actual\": [[30, 31, 1001, 1034]], \"expected\": [[29, 30, 967, 1001]], \"passed\": false}, {\"check\": \"regression variant: start frame floor\", \"actual\": [[151, 153, 5038, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"expected\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"passed\": false}, {\"check\": \"partial repair probe: start frame floor\", \"actual\": [[2, 5, 33, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]], \"expected\": [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]], \"passed\": false}, {\"check\": \"partial repair variant: start frame floor\", \"actual\": [[1, 51, 20, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]], \"expected\": [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]], \"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\": [[24, 48, 1001, 2002]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]], \"expected\": [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]], \"expected\": [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[50, 51, 1000, 1020]], \"expected\": [[50, 51, 1000, 1020]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.025,"exit_code":1,"observations":[{"actual":[[30,31,1001,1034]],"check":"regression: start frame floor","expected":[[29,30,967,1001]],"passed":false},{"actual":[[151,153,5038,5105],[153,154,5105,5138],[154,155,5138,5171]],"check":"regression variant: start frame floor","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":false},{"actual":[[2,5,33,83],[81,83,1351,1384],[83,84,1384,1401]],"check":"partial repair probe: start frame floor","expected":[[1,5,16,83],[80,83,1334,1384],[83,84,1384,1401]],"passed":false},{"actual":[[1,51,20,1020],[51,52,1020,1040],[86,87,1720,1740]],"check":"partial repair variant: start frame floor","expected":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"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":[[24,48,1001,2002]],"check":"boundary control","expected":[[24,48,1001,2002]],"passed":true},{"actual":[[150,153,3000,3060],[153,154,3060,3080],[176,178,3520,3560],[178,179,3560,3580]],"check":"normal control","expected":[[150,153,3000,3060],[153,154,3060,3080],[176,178,3520,3560],[178,179,3560,3580]],"passed":true},{"actual":[[125,197,2500,3940],[197,198,3940,3960],[198,218,3960,4360],[218,219,4360,4380]],"check":"normal control","expected":[[125,197,2500,3940],[197,198,3940,3960],[198,218,3960,4360],[218,219,4360,4380]],"passed":true},{"actual":[[50,51,1000,1020]],"check":"normal control","expected":[[50,51,1000,1020]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: start frame floor\", \"actual\": [[30, 31, 1001, 1034]], \"expected\": [[29, 30, 967, 1001]], \"passed\": false}, {\"check\": \"regression variant: start frame floor\", \"actual\": [[151, 153, 5038, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"expected\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"passed\": false}, {\"check\": \"partial repair probe: start frame floor\", \"actual\": [[2, 5, 33, 83], [81, 83, 1351, 1384], [83, 84, 1384, 1401]], \"expected\": [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]], \"passed\": false}, {\"check\": \"partial repair variant: start frame floor\", \"actual\": [[1, 51, 20, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]], \"expected\": [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]], \"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\": [[24, 48, 1001, 2002]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]], \"expected\": [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]], \"expected\": [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[50, 51, 1000, 1020]], \"expected\": [[50, 51, 1000, 1020]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.672,"exit_code":0,"observations":[{"actual":[[29,30,967,1001]],"check":"regression: start frame floor","expected":[[29,30,967,1001]],"passed":true},{"actual":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"check":"regression variant: start frame floor","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":true},{"actual":[[1,5,16,83],[80,83,1334,1384],[83,84,1384,1401]],"check":"partial repair probe: start frame floor","expected":[[1,5,16,83],[80,83,1334,1384],[83,84,1384,1401]],"passed":true},{"actual":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"check":"partial repair variant: start frame floor","expected":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"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":[[24,48,1001,2002]],"check":"boundary control","expected":[[24,48,1001,2002]],"passed":true},{"actual":[[150,153,3000,3060],[153,154,3060,3080],[176,178,3520,3560],[178,179,3560,3580]],"check":"normal control","expected":[[150,153,3000,3060],[153,154,3060,3080],[176,178,3520,3560],[178,179,3560,3580]],"passed":true},{"actual":[[125,197,2500,3940],[197,198,3940,3960],[198,218,3960,4360],[218,219,4360,4380]],"check":"normal control","expected":[[125,197,2500,3940],[197,198,3940,3960],[198,218,3960,4360],[218,219,4360,4380]],"passed":true},{"actual":[[50,51,1000,1020]],"check":"normal control","expected":[[50,51,1000,1020]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: start frame floor\", \"actual\": [[29, 30, 967, 1001]], \"expected\": [[29, 30, 967, 1001]], \"passed\": true}, {\"check\": \"regression variant: start frame floor\", \"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 probe: start frame floor\", \"actual\": [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]], \"expected\": [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]], \"passed\": true}, {\"check\": \"partial repair variant: start frame floor\", \"actual\": [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]], \"expected\": [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]], \"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\": [[24, 48, 1001, 2002]], \"expected\": [[24, 48, 1001, 2002]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]], \"expected\": [[150, 153, 3000, 3060], [153, 154, 3060, 3080], [176, 178, 3520, 3560], [178, 179, 3560, 3580]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]], \"expected\": [[125, 197, 2500, 3940], [197, 198, 3940, 3960], [198, 218, 3960, 4360], [218, 219, 4360, 4380]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[50, 51, 1000, 1020]], \"expected\": [[50, 51, 1000, 1020]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}