{"abstract":"Millisecond boundaries of NTSC-rate cues are about 0.1 percent early.","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).","evaluation_group":"w2-subtitle-cue-timing-frame-snap","failed_approach":"Rounding to the nearest millisecond disagrees with the floor convention at many NTSC frames.","family":"w2-subtitle-cue-timing-frame-snap-frame-to-millisecond-conversion","id":"FA-77961","implementations":{"attempt":{"sha256":"4a4317064e01cb419f975c410c21a96a1c005d51658ad2612860c3e41c1ee572","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]+[round(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: frame to millisecond conversion', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('regression variant: frame to millisecond conversion', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair probe: frame to millisecond conversion', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('partial repair variant: frame to millisecond conversion', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('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', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]])], [('regression: frame to millisecond conversion', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('regression variant: frame to millisecond conversion', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: frame to millisecond conversion', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('partial repair variant: frame to millisecond conversion', [[[1041, 1042]], '30000/1001'], [[31, 32, 1034, 1067]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[3033, 3120], [3180, 3200], [3690, 3724]], '50'], [[151, 156, 3020, 3120], [159, 160, 3180, 3200], [184, 187, 3680, 3740]]), ('normal control', [[[3840, 3845], [4557, 4562]], '50'], [[192, 193, 3840, 3860], [227, 229, 4540, 4580]]), ('normal control', [[[40, 6440]], '25'], [[1, 161, 40, 6440]])], [('regression: frame to millisecond conversion', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: frame to millisecond conversion', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: frame to millisecond conversion', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('partial repair variant: frame to millisecond conversion', [[[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]]), ('normal control', [[[80, 1081]], '25'], [[2, 28, 80, 1120]]), ('normal control', [[[680, 685], [280, 320], [1013, 1400]], '25'], [[17, 18, 680, 720], [18, 19, 720, 760], [25, 35, 1000, 1400]]), ('normal control', [[[3017, 3018], [3090, 3130]], '25'], [[75, 76, 3000, 3040], [77, 79, 3080, 3160]])], [('regression: frame to millisecond conversion', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: frame to millisecond conversion', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: frame to millisecond conversion', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: frame to millisecond conversion', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[3400, 3401], [7640, 7641], [7697, 8697]], '25'], [[85, 86, 3400, 3440], [191, 192, 7640, 7680], [192, 218, 7680, 8720]]), ('normal control', [[[80, 81], [3980, 3985], [4490, 4531], [2040, 4420]], '50'], [[4, 5, 80, 100], [199, 200, 3980, 4000], [224, 227, 4480, 4540], [227, 228, 4540, 4560]]), ('normal control', [[[6960, 7000]], '25'], [[174, 175, 6960, 7000]])], [('regression: frame to millisecond conversion', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: frame to millisecond conversion', [[[1041, 1042]], '30000/1001'], [[31, 32, 1034, 1067]]), ('partial repair probe: frame to millisecond conversion', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair variant: frame to millisecond conversion', [[[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', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[80, 100]], '50'], [[4, 5, 80, 100]]), ('normal control', [[[4560, 4561]], '25'], [[114, 115, 4560, 4600]]), ('normal control', [[[3017, 3022], [3557, 3591]], '25'], [[75, 76, 3000, 3040], [88, 90, 3520, 3600]])]]\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":"e87c1039c7ffc1650d7dc1f39694d842b1180f534827ddd6a85c5f009ba6fed6","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)//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: frame to millisecond conversion', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('regression variant: frame to millisecond conversion', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair probe: frame to millisecond conversion', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('partial repair variant: frame to millisecond conversion', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('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', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]])], [('regression: frame to millisecond conversion', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('regression variant: frame to millisecond conversion', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: frame to millisecond conversion', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('partial repair variant: frame to millisecond conversion', [[[1041, 1042]], '30000/1001'], [[31, 32, 1034, 1067]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[3033, 3120], [3180, 3200], [3690, 3724]], '50'], [[151, 156, 3020, 3120], [159, 160, 3180, 3200], [184, 187, 3680, 3740]]), ('normal control', [[[3840, 3845], [4557, 4562]], '50'], [[192, 193, 3840, 3860], [227, 229, 4540, 4580]]), ('normal control', [[[40, 6440]], '25'], [[1, 161, 40, 6440]])], [('regression: frame to millisecond conversion', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: frame to millisecond conversion', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: frame to millisecond conversion', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('partial repair variant: frame to millisecond conversion', [[[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]]), ('normal control', [[[80, 1081]], '25'], [[2, 28, 80, 1120]]), ('normal control', [[[680, 685], [280, 320], [1013, 1400]], '25'], [[17, 18, 680, 720], [18, 19, 720, 760], [25, 35, 1000, 1400]]), ('normal control', [[[3017, 3018], [3090, 3130]], '25'], [[75, 76, 3000, 3040], [77, 79, 3080, 3160]])], [('regression: frame to millisecond conversion', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: frame to millisecond conversion', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: frame to millisecond conversion', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: frame to millisecond conversion', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[3400, 3401], [7640, 7641], [7697, 8697]], '25'], [[85, 86, 3400, 3440], [191, 192, 7640, 7680], [192, 218, 7680, 8720]]), ('normal control', [[[80, 81], [3980, 3985], [4490, 4531], [2040, 4420]], '50'], [[4, 5, 80, 100], [199, 200, 3980, 4000], [224, 227, 4480, 4540], [227, 228, 4540, 4560]]), ('normal control', [[[6960, 7000]], '25'], [[174, 175, 6960, 7000]])], [('regression: frame to millisecond conversion', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: frame to millisecond conversion', [[[1041, 1042]], '30000/1001'], [[31, 32, 1034, 1067]]), ('partial repair probe: frame to millisecond conversion', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair variant: frame to millisecond conversion', [[[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', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[80, 100]], '50'], [[4, 5, 80, 100]]), ('normal control', [[[4560, 4561]], '25'], [[114, 115, 4560, 4600]]), ('normal control', [[[3017, 3022], [3557, 3591]], '25'], [[75, 76, 3000, 3040], [88, 90, 3520, 3600]])]]\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":"00d0b0020f00c860526f6aecc70830b16356a7d538e8dc5c732b9303e795ea68","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: frame to millisecond conversion', [[[1000, 1001]], '30000/1001'], [[29, 30, 967, 1001]]), ('regression variant: frame to millisecond conversion', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair probe: frame to millisecond conversion', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('partial repair variant: frame to millisecond conversion', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('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', [[[17, 1018], [527, 547], [1720, 1740]], '50'], [[0, 51, 0, 1020], [51, 52, 1020, 1040], [86, 87, 1720, 1740]])], [('regression: frame to millisecond conversion', [[[1001, 2002]], '24000/1001'], [[24, 48, 1001, 2002]]), ('regression variant: frame to millisecond conversion', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair probe: frame to millisecond conversion', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('partial repair variant: frame to millisecond conversion', [[[1041, 1042]], '30000/1001'], [[31, 32, 1034, 1067]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[3033, 3120], [3180, 3200], [3690, 3724]], '50'], [[151, 156, 3020, 3120], [159, 160, 3180, 3200], [184, 187, 3680, 3740]]), ('normal control', [[[3840, 3845], [4557, 4562]], '50'], [[192, 193, 3840, 3860], [227, 229, 4540, 4580]]), ('normal control', [[[40, 6440]], '25'], [[1, 161, 40, 6440]])], [('regression: frame to millisecond conversion', [[[3001, 3042]], '24000/1001'], [[71, 73, 2961, 3044]]), ('regression variant: frame to millisecond conversion', [[[1168, 1173], [1155, 1189]], '24000/1001'], [[28, 29, 1167, 1209], [29, 30, 1209, 1251]]), ('partial repair probe: frame to millisecond conversion', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('partial repair variant: frame to millisecond conversion', [[[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]]), ('normal control', [[[80, 1081]], '25'], [[2, 28, 80, 1120]]), ('normal control', [[[680, 685], [280, 320], [1013, 1400]], '25'], [[17, 18, 680, 720], [18, 19, 720, 760], [25, 35, 1000, 1400]]), ('normal control', [[[3017, 3018], [3090, 3130]], '25'], [[75, 76, 3000, 3040], [77, 79, 3080, 3160]])], [('regression: frame to millisecond conversion', [[[33, 74], [1335, 1369], [1378, 1379]], '60000/1001'], [[1, 5, 16, 83], [80, 83, 1334, 1384], [83, 84, 1384, 1401]]), ('regression variant: frame to millisecond conversion', [[[3500, 3541], [3487, 3527], [1651, 2652]], '60000/1001'], [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]]), ('partial repair probe: frame to millisecond conversion', [[[5038, 5072], [5088, 5089], [2570, 2575]], '30000/1001'], [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]]), ('partial repair variant: frame to millisecond conversion', [[[540, 581], [384, 389]], '60000/1001'], [[32, 35, 533, 583], [35, 36, 583, 600]]), ('boundary control', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[3400, 3401], [7640, 7641], [7697, 8697]], '25'], [[85, 86, 3400, 3440], [191, 192, 7640, 7680], [192, 218, 7680, 8720]]), ('normal control', [[[80, 81], [3980, 3985], [4490, 4531], [2040, 4420]], '50'], [[4, 5, 80, 100], [199, 200, 3980, 4000], [224, 227, 4480, 4540], [227, 228, 4540, 4560]]), ('normal control', [[[6960, 7000]], '25'], [[174, 175, 6960, 7000]])], [('regression: frame to millisecond conversion', [[[17, 58], [4771, 5772]], '30000/1001'], [[0, 2, 0, 66], [142, 173, 4738, 5772]]), ('regression variant: frame to millisecond conversion', [[[1041, 1042]], '30000/1001'], [[31, 32, 1034, 1067]]), ('partial repair probe: frame to millisecond conversion', [[[1501, 1542], [2503, 3503], [5714, 5734]], '24000/1001'], [[35, 37, 1459, 1543], [60, 84, 2502, 3503], [136, 138, 5672, 5755]]), ('partial repair variant: frame to millisecond conversion', [[[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', [[[0, 40], [40, 80]], '25'], [[0, 1, 0, 40], [1, 2, 40, 80]]), ('normal control', [[[80, 100]], '50'], [[4, 5, 80, 100]]), ('normal control', [[[4560, 4561]], '25'], [[114, 115, 4560, 4600]]), ('normal control', [[[3017, 3022], [3557, 3591]], '25'], [[75, 76, 3000, 3040], [88, 90, 3520, 3600]])]]\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-frame-to-millisecond-conversion","generated_at":"2026-09-29T14:49:30.729655+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":"Convert frames with floor(k*1000*D/N).","root_cause":"The frame-to-ms conversion ignores the rate denominator.","sha256":"768416a2b4225c5f200b966a125993e37b21f406c15314d542876fe495e715e8","title":"Cue snapping to video frame grid: frame to millisecond conversion · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.418,"exit_code":1,"observations":[{"actual":[[29,30,968,1001]],"check":"regression: frame to millisecond conversion","expected":[[29,30,967,1001]],"passed":false},{"actual":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5172]],"check":"regression variant: frame to millisecond conversion","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":false},{"actual":[[71,73,2961,3045]],"check":"partial repair probe: frame to millisecond conversion","expected":[[71,73,2961,3044]],"passed":false},{"actual":[[209,213,3487,3554],[213,214,3554,3570],[214,215,3570,3587]],"check":"partial repair variant: frame to millisecond conversion","expected":[[209,213,3486,3553],[213,214,3553,3570],[214,215,3570,3586]],"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":[[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":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"check":"normal control","expected":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: frame to millisecond conversion\", \"actual\": [[29, 30, 968, 1001]], \"expected\": [[29, 30, 967, 1001]], \"passed\": false}, {\"check\": \"regression variant: frame to millisecond conversion\", \"actual\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5172]], \"expected\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"passed\": false}, {\"check\": \"partial repair probe: frame to millisecond conversion\", \"actual\": [[71, 73, 2961, 3045]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": false}, {\"check\": \"partial repair variant: frame to millisecond conversion\", \"actual\": [[209, 213, 3487, 3554], [213, 214, 3554, 3570], [214, 215, 3570, 3587]], \"expected\": [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]], \"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\": \"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\": [[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}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.886,"exit_code":1,"observations":[{"actual":[[29,30,0,1]],"check":"regression: frame to millisecond conversion","expected":[[29,30,967,1001]],"passed":false},{"actual":[[150,153,5,5],[153,154,5,5],[154,155,5,5]],"check":"regression variant: frame to millisecond conversion","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":false},{"actual":[[71,73,2,3]],"check":"partial repair probe: frame to millisecond conversion","expected":[[71,73,2961,3044]],"passed":false},{"actual":[[209,213,3,3],[213,214,3,3],[214,215,3,3]],"check":"partial repair variant: frame to millisecond conversion","expected":[[209,213,3486,3553],[213,214,3553,3570],[214,215,3570,3586]],"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":[[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":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"check":"normal control","expected":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: frame to millisecond conversion\", \"actual\": [[29, 30, 0, 1]], \"expected\": [[29, 30, 967, 1001]], \"passed\": false}, {\"check\": \"regression variant: frame to millisecond conversion\", \"actual\": [[150, 153, 5, 5], [153, 154, 5, 5], [154, 155, 5, 5]], \"expected\": [[150, 153, 5005, 5105], [153, 154, 5105, 5138], [154, 155, 5138, 5171]], \"passed\": false}, {\"check\": \"partial repair probe: frame to millisecond conversion\", \"actual\": [[71, 73, 2, 3]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": false}, {\"check\": \"partial repair variant: frame to millisecond conversion\", \"actual\": [[209, 213, 3, 3], [213, 214, 3, 3], [214, 215, 3, 3]], \"expected\": [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]], \"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\": \"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\": [[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}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.753,"exit_code":0,"observations":[{"actual":[[29,30,967,1001]],"check":"regression: frame to millisecond conversion","expected":[[29,30,967,1001]],"passed":true},{"actual":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"check":"regression variant: frame to millisecond conversion","expected":[[150,153,5005,5105],[153,154,5105,5138],[154,155,5138,5171]],"passed":true},{"actual":[[71,73,2961,3044]],"check":"partial repair probe: frame to millisecond conversion","expected":[[71,73,2961,3044]],"passed":true},{"actual":[[209,213,3486,3553],[213,214,3553,3570],[214,215,3570,3586]],"check":"partial repair variant: frame to millisecond conversion","expected":[[209,213,3486,3553],[213,214,3553,3570],[214,215,3570,3586]],"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":[[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":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"check":"normal control","expected":[[0,51,0,1020],[51,52,1020,1040],[86,87,1720,1740]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: frame to millisecond conversion\", \"actual\": [[29, 30, 967, 1001]], \"expected\": [[29, 30, 967, 1001]], \"passed\": true}, {\"check\": \"regression variant: frame to millisecond conversion\", \"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: frame to millisecond conversion\", \"actual\": [[71, 73, 2961, 3044]], \"expected\": [[71, 73, 2961, 3044]], \"passed\": true}, {\"check\": \"partial repair variant: frame to millisecond conversion\", \"actual\": [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]], \"expected\": [[209, 213, 3486, 3553], [213, 214, 3553, 3570], [214, 215, 3570, 3586]], \"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\": \"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\": [[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}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}