{"abstract":"Cue ends are off by a millisecond relative to the independently scaled timeline.","category":"Subtitle cue timing","checks":9,"contract":"Cue times authored against a src frame rate are rescaled for playback at dst by t*src/dst, rounded half up to integer ms. Rates are \"N\", \"N/D\", or the aliases \"23.976\"/\"29.97\" meaning (N+1)*1000/1001. The end is rounded independently; an end that does not exceed the start becomes start+1.","contract_signature":"cues, src, dst","evaluation_group":"w2-subtitle-cue-timing-frame-rate-retime","failed_approach":"Rounding the scaled duration still adds two separately rounded quantities and misses the true end.","family":"w2-subtitle-cue-timing-frame-rate-retime-independent-end-rounding","id":"FA-77936","implementations":{"attempt":{"sha256":"6677c804254b0b5b41129f1273ef62f395df62d08c2a4ad28e997b9d001aa032","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(cues, src, dst):\n    def rate(r):\n        if '/' in r:\n            a,b=r.split('/')\n            return Fraction(int(a),int(b))\n        if '.' in r:\n            return Fraction(int(float(r)+0.5)*1000,1001)\n        return Fraction(int(r))\n    k=rate(src)/rate(dst)\n    out=[]\n    for start,end in cues:\n        rs=math.floor(start*k+Fraction(1,2))\n        re_=rs+math.floor((end-start)*k+Fraction(1,2))\n        if re_<=rs:\n            re_=rs+1\n        out.append([rs,re_])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: independent end rounding', [[[540231, 541231], [0, 3]], '50', '29.97'], [[901285, 902954], [0, 5]]), ('regression variant: independent end rounding', [[[583859, 583862], [0, 1000], [3, 6], [881562, 881564]], '25', '30'], [[486549, 486552], [0, 833], [3, 5], [734635, 734637]]), ('partial repair probe: independent end rounding', [[[268354, 268356], [12345, 14346], [0, 42]], '60', '25'], [[644050, 644054], [29628, 34430], [0, 101]]), ('partial repair variant: independent end rounding', [[[1001, 1004], [7, 9], [999, 1001]], '30', '25'], [[1201, 1205], [8, 11], [1199, 1201]]), ('boundary control', [[[1000, 2000]], '25', '50'], [[500, 1000]]), ('boundary control', [[[1, 2], [3, 4]], '23.976', '25'], [[1, 2], [3, 4]]), ('normal control', [[[1001, 3003]], '24000/1001', '24'], [[1000, 3000]]), ('normal control', [[[1, 1001]], '30000/1001', '29.97'], [[1, 1001]]), ('normal control', [[[269050, 271051]], '30000/1001', '23.976'], [[336313, 338814]])], [('regression: independent end rounding', [[[268354, 268356], [12345, 14346], [0, 42]], '60', '25'], [[644050, 644054], [29628, 34430], [0, 101]]), ('regression variant: independent end rounding', [[[209282, 209284], [999, 1000], [1, 1001]], '12', '29.97'], [[83797, 83798], [400, 401], [0, 401]]), ('partial repair probe: independent end rounding', [[[583859, 583862], [0, 1000], [3, 6], [881562, 881564]], '25', '30'], [[486549, 486552], [0, 833], [3, 5], [734635, 734637]]), ('partial repair variant: independent end rounding', [[[1, 3], [1, 4]], '12', '30'], [[0, 1], [0, 2]]), ('boundary control', [[[1001, 3003]], '24000/1001', '24'], [[1000, 3000]]), ('boundary control', [[[1000, 2000]], '25', '50'], [[500, 1000]]), ('normal control', [[[1, 4]], '15', '15'], [[1, 4]]), ('normal control', [[[12345, 15451]], '24000/1001', '24000/1001'], [[12345, 15451]]), ('normal control', [[[999, 1001], [1001, 2001], [428247, 428249], [0, 4875]], '60', '15'], [[3996, 4004], [4004, 8004], [1712988, 1712996], [0, 19500]])], [('regression: independent end rounding', [[[999, 3000], [3, 1003], [999, 2960]], '23.976', '60'], [[399, 1199], [1, 401], [399, 1183]]), ('regression variant: independent end rounding', [[[3, 1003], [999, 1000], [3, 5]], '50', '30'], [[5, 1672], [1665, 1667], [5, 8]]), ('partial repair probe: independent end rounding', [[[999, 4970]], '30', '60'], [[500, 2485]]), ('partial repair variant: independent end rounding', [[[3, 6]], '29.97', '24'], [[4, 7]]), ('boundary control', [[[5, 6]], '24', '25'], [[5, 6]]), ('boundary control', [[[1001, 3003]], '24000/1001', '24'], [[1000, 3000]]), ('normal control', [[[7, 8], [3, 2004]], '60', '12'], [[35, 40], [15, 10020]]), ('normal control', [[[594534, 596535], [7, 10]], '29.97', '29.97'], [[594534, 596535], [7, 10]]), ('normal control', [[[821125, 821127], [0, 1]], '30', '30'], [[821125, 821127], [0, 1]])], [('regression: independent end rounding', [[[1, 4], [7, 9], [12345, 14346], [1001, 1002]], '24000/1001', '12'], [[2, 8], [14, 18], [24665, 28663], [2000, 2002]]), ('regression variant: independent end rounding', [[[7, 2008], [1001, 3002]], '50', '12'], [[29, 8367], [4171, 12508]]), ('partial repair probe: independent end rounding', [[[1, 4]], '23.976', '15'], [[2, 6]]), ('partial repair variant: independent end rounding', [[[1, 4]], '24000/1001', '50'], [[0, 2]]), ('boundary control', [[[1, 2], [3, 4]], '23.976', '25'], [[1, 2], [3, 4]]), ('boundary control', [[[5, 6]], '24', '25'], [[5, 6]]), ('normal control', [[[1, 2], [7, 2008], [1001, 1002]], '50', '25'], [[2, 4], [14, 4016], [2002, 2004]]), ('normal control', [[[717467, 717469], [0, 1], [3, 4]], '12', '30'], [[286987, 286988], [0, 1], [1, 2]]), ('normal control', [[[7, 9], [0, 2], [7, 10], [3, 6]], '15', '50'], [[2, 3], [0, 1], [2, 3], [1, 2]])], [('regression: independent end rounding', [[[3, 6]], '30', '48'], [[2, 4]]), ('regression variant: independent end rounding', [[[999, 1001], [1001, 1003], [54677, 54680], [7, 2008]], '48', '25'], [[1918, 1922], [1922, 1926], [104980, 104986], [13, 3855]]), ('partial repair probe: independent end rounding', [[[209282, 209284], [999, 1000], [1, 1001]], '12', '29.97'], [[83797, 83798], [400, 401], [0, 401]]), ('partial repair variant: independent end rounding', [[[0, 1], [1001, 1002], [1001, 1002], [0, 2]], '60', '25'], [[0, 2], [2402, 2405], [2402, 2405], [0, 5]]), ('boundary control', [[[1000, 2000]], '25', '50'], [[500, 1000]]), ('boundary control', [[[1, 2], [3, 4]], '23.976', '25'], [[1, 2], [3, 4]]), ('normal control', [[[1, 4]], '24', '30'], [[1, 3]]), ('normal control', [[[1, 3], [7, 1267]], '25', '12'], [[2, 6], [15, 2640]]), ('normal control', [[[3, 1003]], '48', '24'], [[6, 2006]])]]\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":"8beb8092828762d875d4e2b55f47b77ffb96be98a436518e5f9c9eed2cab6304","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(cues, src, dst):\n    def rate(r):\n        if '/' in r:\n            a,b=r.split('/')\n            return Fraction(int(a),int(b))\n        if '.' in r:\n            return Fraction(int(float(r)+0.5)*1000,1001)\n        return Fraction(int(r))\n    k=rate(src)/rate(dst)\n    out=[]\n    for start,end in cues:\n        rs=math.floor(start*k+Fraction(1,2))\n        re_=rs+math.floor((end-start)*k)\n        if re_<=rs:\n            re_=rs+1\n        out.append([rs,re_])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: independent end rounding', [[[540231, 541231], [0, 3]], '50', '29.97'], [[901285, 902954], [0, 5]]), ('regression variant: independent end rounding', [[[583859, 583862], [0, 1000], [3, 6], [881562, 881564]], '25', '30'], [[486549, 486552], [0, 833], [3, 5], [734635, 734637]]), ('partial repair probe: independent end rounding', [[[268354, 268356], [12345, 14346], [0, 42]], '60', '25'], [[644050, 644054], [29628, 34430], [0, 101]]), ('partial repair variant: independent end rounding', [[[1001, 1004], [7, 9], [999, 1001]], '30', '25'], [[1201, 1205], [8, 11], [1199, 1201]]), ('boundary control', [[[1000, 2000]], '25', '50'], [[500, 1000]]), ('boundary control', [[[1, 2], [3, 4]], '23.976', '25'], [[1, 2], [3, 4]]), ('normal control', [[[1001, 3003]], '24000/1001', '24'], [[1000, 3000]]), ('normal control', [[[1, 1001]], '30000/1001', '29.97'], [[1, 1001]]), ('normal control', [[[269050, 271051]], '30000/1001', '23.976'], [[336313, 338814]])], [('regression: independent end rounding', [[[268354, 268356], [12345, 14346], [0, 42]], '60', '25'], [[644050, 644054], [29628, 34430], [0, 101]]), ('regression variant: independent end rounding', [[[209282, 209284], [999, 1000], [1, 1001]], '12', '29.97'], [[83797, 83798], [400, 401], [0, 401]]), ('partial repair probe: independent end rounding', [[[583859, 583862], [0, 1000], [3, 6], [881562, 881564]], '25', '30'], [[486549, 486552], [0, 833], [3, 5], [734635, 734637]]), ('partial repair variant: independent end rounding', [[[1, 3], [1, 4]], '12', '30'], [[0, 1], [0, 2]]), ('boundary control', [[[1001, 3003]], '24000/1001', '24'], [[1000, 3000]]), ('boundary control', [[[1000, 2000]], '25', '50'], [[500, 1000]]), ('normal control', [[[1, 4]], '15', '15'], [[1, 4]]), ('normal control', [[[12345, 15451]], '24000/1001', '24000/1001'], [[12345, 15451]]), ('normal control', [[[999, 1001], [1001, 2001], [428247, 428249], [0, 4875]], '60', '15'], [[3996, 4004], [4004, 8004], [1712988, 1712996], [0, 19500]])], [('regression: independent end rounding', [[[999, 3000], [3, 1003], [999, 2960]], '23.976', '60'], [[399, 1199], [1, 401], [399, 1183]]), ('regression variant: independent end rounding', [[[3, 1003], [999, 1000], [3, 5]], '50', '30'], [[5, 1672], [1665, 1667], [5, 8]]), ('partial repair probe: independent end rounding', [[[999, 4970]], '30', '60'], [[500, 2485]]), ('partial repair variant: independent end rounding', [[[3, 6]], '29.97', '24'], [[4, 7]]), ('boundary control', [[[5, 6]], '24', '25'], [[5, 6]]), ('boundary control', [[[1001, 3003]], '24000/1001', '24'], [[1000, 3000]]), ('normal control', [[[7, 8], [3, 2004]], '60', '12'], [[35, 40], [15, 10020]]), ('normal control', [[[594534, 596535], [7, 10]], '29.97', '29.97'], [[594534, 596535], [7, 10]]), ('normal control', [[[821125, 821127], [0, 1]], '30', '30'], [[821125, 821127], [0, 1]])], [('regression: independent end rounding', [[[1, 4], [7, 9], [12345, 14346], [1001, 1002]], '24000/1001', '12'], [[2, 8], [14, 18], [24665, 28663], [2000, 2002]]), ('regression variant: independent end rounding', [[[7, 2008], [1001, 3002]], '50', '12'], [[29, 8367], [4171, 12508]]), ('partial repair probe: independent end rounding', [[[1, 4]], '23.976', '15'], [[2, 6]]), ('partial repair variant: independent end rounding', [[[1, 4]], '24000/1001', '50'], [[0, 2]]), ('boundary control', [[[1, 2], [3, 4]], '23.976', '25'], [[1, 2], [3, 4]]), ('boundary control', [[[5, 6]], '24', '25'], [[5, 6]]), ('normal control', [[[1, 2], [7, 2008], [1001, 1002]], '50', '25'], [[2, 4], [14, 4016], [2002, 2004]]), ('normal control', [[[717467, 717469], [0, 1], [3, 4]], '12', '30'], [[286987, 286988], [0, 1], [1, 2]]), ('normal control', [[[7, 9], [0, 2], [7, 10], [3, 6]], '15', '50'], [[2, 3], [0, 1], [2, 3], [1, 2]])], [('regression: independent end rounding', [[[3, 6]], '30', '48'], [[2, 4]]), ('regression variant: independent end rounding', [[[999, 1001], [1001, 1003], [54677, 54680], [7, 2008]], '48', '25'], [[1918, 1922], [1922, 1926], [104980, 104986], [13, 3855]]), ('partial repair probe: independent end rounding', [[[209282, 209284], [999, 1000], [1, 1001]], '12', '29.97'], [[83797, 83798], [400, 401], [0, 401]]), ('partial repair variant: independent end rounding', [[[0, 1], [1001, 1002], [1001, 1002], [0, 2]], '60', '25'], [[0, 2], [2402, 2405], [2402, 2405], [0, 5]]), ('boundary control', [[[1000, 2000]], '25', '50'], [[500, 1000]]), ('boundary control', [[[1, 2], [3, 4]], '23.976', '25'], [[1, 2], [3, 4]]), ('normal control', [[[1, 4]], '24', '30'], [[1, 3]]), ('normal control', [[[1, 3], [7, 1267]], '25', '12'], [[2, 6], [15, 2640]]), ('normal control', [[[3, 1003]], '48', '24'], [[6, 2006]])]]\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-rate-retime-independent-end-rounding","generated_at":"2026-09-29T14:49:30.627753+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Subtitle timing defects shift, hide or overlap captions that viewers depend on for comprehension and accessibility.","root_cause":"The end is derived from the rounded start plus a truncated scaled duration, compounding rounding error.","sha256":"34c749184f080bd387853e77d2af416009dbf33cee128dd0175702834745c39a","title":"Subtitle frame-rate retiming: independent end rounding · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":43.471,"exit_code":1,"observations":[{"actual":[[901285,902953],[0,5]],"check":"regression: independent end rounding","expected":[[901285,902954],[0,5]],"passed":false},{"actual":[[486549,486552],[0,833],[3,6],[734635,734637]],"check":"regression variant: independent end rounding","expected":[[486549,486552],[0,833],[3,5],[734635,734637]],"passed":false},{"actual":[[644050,644055],[29628,34430],[0,101]],"check":"partial repair probe: independent end rounding","expected":[[644050,644054],[29628,34430],[0,101]],"passed":false},{"actual":[[1201,1205],[8,10],[1199,1201]],"check":"partial repair variant: independent end rounding","expected":[[1201,1205],[8,11],[1199,1201]],"passed":false},{"actual":[[500,1000]],"check":"boundary control","expected":[[500,1000]],"passed":true},{"actual":[[1,2],[3,4]],"check":"boundary control","expected":[[1,2],[3,4]],"passed":true},{"actual":[[1000,3000]],"check":"normal control","expected":[[1000,3000]],"passed":true},{"actual":[[1,1001]],"check":"normal control","expected":[[1,1001]],"passed":true},{"actual":[[336313,338814]],"check":"normal control","expected":[[336313,338814]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: independent end rounding\", \"actual\": [[901285, 902953], [0, 5]], \"expected\": [[901285, 902954], [0, 5]], \"passed\": false}, {\"check\": \"regression variant: independent end rounding\", \"actual\": [[486549, 486552], [0, 833], [3, 6], [734635, 734637]], \"expected\": [[486549, 486552], [0, 833], [3, 5], [734635, 734637]], \"passed\": false}, {\"check\": \"partial repair probe: independent end rounding\", \"actual\": [[644050, 644055], [29628, 34430], [0, 101]], \"expected\": [[644050, 644054], [29628, 34430], [0, 101]], \"passed\": false}, {\"check\": \"partial repair variant: independent end rounding\", \"actual\": [[1201, 1205], [8, 10], [1199, 1201]], \"expected\": [[1201, 1205], [8, 11], [1199, 1201]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[500, 1000]], \"expected\": [[500, 1000]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[1, 2], [3, 4]], \"expected\": [[1, 2], [3, 4]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1000, 3000]], \"expected\": [[1000, 3000]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1, 1001]], \"expected\": [[1, 1001]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[336313, 338814]], \"expected\": [[336313, 338814]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.71,"exit_code":1,"observations":[{"actual":[[901285,902953],[0,5]],"check":"regression: independent end rounding","expected":[[901285,902954],[0,5]],"passed":false},{"actual":[[486549,486551],[0,833],[3,5],[734635,734636]],"check":"regression variant: independent end rounding","expected":[[486549,486552],[0,833],[3,5],[734635,734637]],"passed":false},{"actual":[[644050,644054],[29628,34430],[0,100]],"check":"partial repair probe: independent end rounding","expected":[[644050,644054],[29628,34430],[0,101]],"passed":false},{"actual":[[1201,1204],[8,10],[1199,1201]],"check":"partial repair variant: independent end rounding","expected":[[1201,1205],[8,11],[1199,1201]],"passed":false},{"actual":[[500,1000]],"check":"boundary control","expected":[[500,1000]],"passed":true},{"actual":[[1,2],[3,4]],"check":"boundary control","expected":[[1,2],[3,4]],"passed":true},{"actual":[[1000,3000]],"check":"normal control","expected":[[1000,3000]],"passed":true},{"actual":[[1,1001]],"check":"normal control","expected":[[1,1001]],"passed":true},{"actual":[[336313,338814]],"check":"normal control","expected":[[336313,338814]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: independent end rounding\", \"actual\": [[901285, 902953], [0, 5]], \"expected\": [[901285, 902954], [0, 5]], \"passed\": false}, {\"check\": \"regression variant: independent end rounding\", \"actual\": [[486549, 486551], [0, 833], [3, 5], [734635, 734636]], \"expected\": [[486549, 486552], [0, 833], [3, 5], [734635, 734637]], \"passed\": false}, {\"check\": \"partial repair probe: independent end rounding\", \"actual\": [[644050, 644054], [29628, 34430], [0, 100]], \"expected\": [[644050, 644054], [29628, 34430], [0, 101]], \"passed\": false}, {\"check\": \"partial repair variant: independent end rounding\", \"actual\": [[1201, 1204], [8, 10], [1199, 1201]], \"expected\": [[1201, 1205], [8, 11], [1199, 1201]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[500, 1000]], \"expected\": [[500, 1000]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[1, 2], [3, 4]], \"expected\": [[1, 2], [3, 4]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1000, 3000]], \"expected\": [[1000, 3000]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1, 1001]], \"expected\": [[1, 1001]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[336313, 338814]], \"expected\": [[336313, 338814]], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}