{"abstract":"Cues exactly at the permitted reading speed are flagged.","category":"Subtitle cue timing","checks":9,"contract":"For cues [start,end,text] return the 1-based indices whose reading speed exceeds max_cps. Tags <...> are removed, CRLF is treated as one line break, line breaks are not counted, all other characters (including spaces) count. The test is chars*1000 > max_cps*duration; a cue with duration <= 0 is flagged iff it has any counted character.","contract_signature":"cues, max_cps","evaluation_group":"w2-subtitle-cue-timing-reading-speed","failed_approach":"Dividing by whole seconds loses the sub-second part of the duration and misjudges short cues.","family":"w2-subtitle-cue-timing-reading-speed-speed-threshold","id":"FA-78031","implementations":{"attempt":{"sha256":"2405f8c757650424a41fe73795bd2c96a73885fa418c9f0984982ebcace7fe7b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re\nN = 1\nobservations = []\ndef solve(cues, max_cps):\n    flagged=[]\n    for idx,(start,end,text) in enumerate(cues,1):\n        visible=re.sub(r'<[^>]*>','',text)\n        visible=visible.replace('\\r\\n','\\n')\n        chars=len(visible.replace('\\n',''))\n        dur=end-start\n        if dur<=0:\n            if chars>0: flagged.append(idx)\n            continue\n        if chars//(dur//1000 or 1)>max_cps:\n            flagged.append(idx)\n    return flagged\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: speed threshold', [[[0, 1000, 'abcdefghij']], 10], []), ('regression variant: speed threshold', [[[5543, 5743, '<font color=\"red\">Red</font>'], [3551, 4551, 'Two\\nlines'], [4354, 4454, '<i>A</i>']], 15], []), ('partial repair probe: speed threshold', [[[8892, 9392, 'Two\\nlines']], 10], [1]), ('partial repair variant: speed threshold', [[[9754, 12754, 'Long line of dialogue here'], [617, 617, 'A\\r\\nB\\r\\nC'], [5734, 7734, 'Two\\r\\nlines'], [3694, 4361, 'Two\\r\\nlines'], [253, 353, '  spaced  ']], 15], [2, 5]), ('boundary control', [[[0, 0, 'a']], 17], [1]), ('boundary control', [[[0, 0, '']], 17], []), ('normal control', [[[0, 500, 'a\\r\\nb']], 5], []), ('normal control', [[[839, 3839, 'I'], [4652, 6652, 'x\\ny\\nz']], 17], []), ('normal control', [[[1857, 1857, 'x\\ny\\nz']], 10], [1])], [('regression: speed threshold', [[[2569, 2769, 'A\\r\\nB\\r\\nC'], [1782, 1782, 'x\\ny\\nz']], 15], [2]), ('regression variant: speed threshold', [[[4903, 5303, 'Two\\r\\nlines'], [7669, 7920, 'Hello'], [9175, 12175, 'Two\\nlines']], 20], []), ('partial repair probe: speed threshold', [[[6012, 6112, 'Hi there']], 15], [1]), ('partial repair variant: speed threshold', [[[5112, 5760, '<i>Italic</i> text'], [2636, 2931, 'Hello'], [1678, 1778, 'Two\\r\\nlines'], [6527, 6586, 'a'], [9403, 9403, 'x\\n']], 17], [3, 5]), ('boundary control', [[[0, 0, '']], 17], []), ('boundary control', [[[0, 500, 'a\\r\\nb']], 5], []), ('normal control', [[[7799, 7899, ''], [6867, 9867, 'Hello'], [1132, 1132, '<c.yellow>Cue</c> text'], [3310, 3310, 'a']], 17], [3, 4]), ('normal control', [[[3439, 3939, 'a<b>b</b>c<i>d</i>'], [7218, 9218, '<c.yellow>Cue</c> text'], [9347, 11347, 'Two\\r\\nlines'], [1314, 1314, 'A\\r\\nB\\r\\nC'], [1557, 3557, 'x\\ny\\nz']], 10], [4]), ('normal control', [[[5029, 5019, 'a<b>b</b>c<i>d</i>']], 20], [1])], [('regression: speed threshold', [[[9565, 11365, 'a<b>b</b>c<i>d</i>'], [7862, 10862, 'a<b>b</b>c<i>d</i>'], [9297, 9397, 'a']], 10], []), ('regression variant: speed threshold', [[[4743, 5143, '<i>A</i>'], [1982, 2982, 'Hi there'], [5318, 5468, '<font color=\"red\">Red</font>'], [4990, 5140, '<font color=\"red\">Red</font>'], [1465, 1965, '<i>A</i>']], 20], []), ('partial repair probe: speed threshold', [[[2466, 4200, 'Long line of dialogue here'], [3387, 5387, '<c.yellow>Cue</c> text']], 15], []), ('partial repair variant: speed threshold', [[[7253, 10253, '<c.yellow>Cue</c> text'], [7954, 8954, 'x\\ny\\nz'], [4376, 4476, 'x\\ny\\nz'], [5892, 6892, 'Hi there']], 15], [3]), ('boundary control', [[[0, 500, 'a\\r\\nb']], 5], []), ('boundary control', [[[0, 0, 'a']], 17], [1]), ('normal control', [[[5649, 5916, 'a<b>b</b>c<i>d</i>'], [3007, 2997, 'Hello'], [9574, 9574, 'A\\r\\nB\\r\\nC'], [6652, 7319, '  spaced  ']], 15], [2, 3]), ('normal control', [[[6795, 6795, 'x\\n']], 17], [1]), ('normal control', [[[959, 1459, 'Two\\nlines'], [7727, 7727, 'x\\ny\\nz'], [3146, 3146, '<i>Italic</i> text'], [3843, 6843, 'Long line of dialogue here']], 20], [2, 3])], [('regression: speed threshold', [[[5207, 5208, ''], [8379, 8879, '  spaced  '], [9114, 9365, 'x\\ny\\nz'], [2354, 2344, 'Hi there'], [3706, 3756, 'x\\n']], 20], [4]), ('regression variant: speed threshold', [[[3319, 3319, ''], [9021, 9021, '  spaced  '], [4466, 5367, 'Two\\nlines'], [3595, 4096, 'Hello'], [4276, 5276, '  spaced  ']], 10], [2]), ('partial repair probe: speed threshold', [[[7961, 7961, 'x\\n'], [4865, 5399, 'Hi there'], [9675, 12675, ''], [2209, 3410, 'a<b>b</b>c<i>d</i>'], [4016, 4116, 'a<b>b</b>c<i>d</i>']], 15], [1, 5]), ('partial repair variant: speed threshold', [[[936, 1137, 'A\\r\\nB\\r\\nC'], [5836, 7570, 'Long line of dialogue here'], [1739, 1739, '']], 15], []), ('boundary control', [[[0, 0, 'a']], 17], [1]), ('boundary control', [[[0, 0, '']], 17], []), ('normal control', [[[3192, 3393, 'a<b>b</b>c<i>d</i>']], 20], []), ('normal control', [[[3725, 6725, '<c.yellow>Cue</c> text'], [8427, 8663, 'a<b>b</b>c<i>d</i>'], [9335, 9325, '<font color=\"red\">Red</font>']], 17], [3]), ('normal control', [[[6632, 6632, 'Two\\nlines'], [8773, 8763, 'Two\\nlines'], [815, 815, '<c.yellow>Cue</c> text']], 10], [1, 2, 3])], [('regression: speed threshold', [[[4694, 5494, 'Two\\nlines'], [3327, 3327, 'x\\ny\\nz'], [2373, 4573, '<c.yellow>Cue</c> text'], [1711, 1911, 'x\\n'], [7573, 7573, '<c.yellow>Cue</c> text']], 10], [2, 5]), ('regression variant: speed threshold', [[[955, 1005, '<i>A</i>'], [9350, 11350, 'a<b>b</b>c<i>d</i>'], [864, 854, 'A\\r\\nB\\r\\nC'], [6216, 6716, 'Long line of dialogue here']], 20], [3, 4]), ('partial repair probe: speed threshold', [[[7027, 7527, 'Two\\nlines'], [1204, 1851, '<i>Italic</i> text'], [7529, 9059, 'Long line of dialogue here'], [3040, 3216, '<font color=\"red\">Red</font>'], [5263, 5253, 'Two\\r\\nlines']], 17], [2, 4, 5]), ('partial repair variant: speed threshold', [[[2544, 2544, '  spaced  '], [4666, 4766, 'Hello'], [1260, 1250, ''], [1606, 1807, 'x\\ny\\nz']], 15], [1, 2]), ('boundary control', [[[0, 0, '']], 17], []), ('boundary control', [[[0, 500, 'a\\r\\nb']], 5], []), ('normal control', [[[4014, 4081, 'a'], [3684, 6684, 'Hi there']], 15], []), ('normal control', [[[8878, 9378, 'a'], [1695, 1990, 'x\\ny\\nz'], [8649, 8649, '<c.yellow>Cue</c> text'], [4805, 5334, 'Two\\nlines']], 17], [3]), ('normal control', [[[3769, 4036, 'a<b>b</b>c<i>d</i>']], 15], [])]]\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":"33312b654bcad7516c0a98a3e1efd32da03246bbb351dd6255f25a5137faf034","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re\nN = 1\nobservations = []\ndef solve(cues, max_cps):\n    flagged=[]\n    for idx,(start,end,text) in enumerate(cues,1):\n        visible=re.sub(r'<[^>]*>','',text)\n        visible=visible.replace('\\r\\n','\\n')\n        chars=len(visible.replace('\\n',''))\n        dur=end-start\n        if dur<=0:\n            if chars>0: flagged.append(idx)\n            continue\n        if chars*1000>=max_cps*dur:\n            flagged.append(idx)\n    return flagged\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: speed threshold', [[[0, 1000, 'abcdefghij']], 10], []), ('regression variant: speed threshold', [[[5543, 5743, '<font color=\"red\">Red</font>'], [3551, 4551, 'Two\\nlines'], [4354, 4454, '<i>A</i>']], 15], []), ('partial repair probe: speed threshold', [[[8892, 9392, 'Two\\nlines']], 10], [1]), ('partial repair variant: speed threshold', [[[9754, 12754, 'Long line of dialogue here'], [617, 617, 'A\\r\\nB\\r\\nC'], [5734, 7734, 'Two\\r\\nlines'], [3694, 4361, 'Two\\r\\nlines'], [253, 353, '  spaced  ']], 15], [2, 5]), ('boundary control', [[[0, 0, 'a']], 17], [1]), ('boundary control', [[[0, 0, '']], 17], []), ('normal control', [[[0, 500, 'a\\r\\nb']], 5], []), ('normal control', [[[839, 3839, 'I'], [4652, 6652, 'x\\ny\\nz']], 17], []), ('normal control', [[[1857, 1857, 'x\\ny\\nz']], 10], [1])], [('regression: speed threshold', [[[2569, 2769, 'A\\r\\nB\\r\\nC'], [1782, 1782, 'x\\ny\\nz']], 15], [2]), ('regression variant: speed threshold', [[[4903, 5303, 'Two\\r\\nlines'], [7669, 7920, 'Hello'], [9175, 12175, 'Two\\nlines']], 20], []), ('partial repair probe: speed threshold', [[[6012, 6112, 'Hi there']], 15], [1]), ('partial repair variant: speed threshold', [[[5112, 5760, '<i>Italic</i> text'], [2636, 2931, 'Hello'], [1678, 1778, 'Two\\r\\nlines'], [6527, 6586, 'a'], [9403, 9403, 'x\\n']], 17], [3, 5]), ('boundary control', [[[0, 0, '']], 17], []), ('boundary control', [[[0, 500, 'a\\r\\nb']], 5], []), ('normal control', [[[7799, 7899, ''], [6867, 9867, 'Hello'], [1132, 1132, '<c.yellow>Cue</c> text'], [3310, 3310, 'a']], 17], [3, 4]), ('normal control', [[[3439, 3939, 'a<b>b</b>c<i>d</i>'], [7218, 9218, '<c.yellow>Cue</c> text'], [9347, 11347, 'Two\\r\\nlines'], [1314, 1314, 'A\\r\\nB\\r\\nC'], [1557, 3557, 'x\\ny\\nz']], 10], [4]), ('normal control', [[[5029, 5019, 'a<b>b</b>c<i>d</i>']], 20], [1])], [('regression: speed threshold', [[[9565, 11365, 'a<b>b</b>c<i>d</i>'], [7862, 10862, 'a<b>b</b>c<i>d</i>'], [9297, 9397, 'a']], 10], []), ('regression variant: speed threshold', [[[4743, 5143, '<i>A</i>'], [1982, 2982, 'Hi there'], [5318, 5468, '<font color=\"red\">Red</font>'], [4990, 5140, '<font color=\"red\">Red</font>'], [1465, 1965, '<i>A</i>']], 20], []), ('partial repair probe: speed threshold', [[[2466, 4200, 'Long line of dialogue here'], [3387, 5387, '<c.yellow>Cue</c> text']], 15], []), ('partial repair variant: speed threshold', [[[7253, 10253, '<c.yellow>Cue</c> text'], [7954, 8954, 'x\\ny\\nz'], [4376, 4476, 'x\\ny\\nz'], [5892, 6892, 'Hi there']], 15], [3]), ('boundary control', [[[0, 500, 'a\\r\\nb']], 5], []), ('boundary control', [[[0, 0, 'a']], 17], [1]), ('normal control', [[[5649, 5916, 'a<b>b</b>c<i>d</i>'], [3007, 2997, 'Hello'], [9574, 9574, 'A\\r\\nB\\r\\nC'], [6652, 7319, '  spaced  ']], 15], [2, 3]), ('normal control', [[[6795, 6795, 'x\\n']], 17], [1]), ('normal control', [[[959, 1459, 'Two\\nlines'], [7727, 7727, 'x\\ny\\nz'], [3146, 3146, '<i>Italic</i> text'], [3843, 6843, 'Long line of dialogue here']], 20], [2, 3])], [('regression: speed threshold', [[[5207, 5208, ''], [8379, 8879, '  spaced  '], [9114, 9365, 'x\\ny\\nz'], [2354, 2344, 'Hi there'], [3706, 3756, 'x\\n']], 20], [4]), ('regression variant: speed threshold', [[[3319, 3319, ''], [9021, 9021, '  spaced  '], [4466, 5367, 'Two\\nlines'], [3595, 4096, 'Hello'], [4276, 5276, '  spaced  ']], 10], [2]), ('partial repair probe: speed threshold', [[[7961, 7961, 'x\\n'], [4865, 5399, 'Hi there'], [9675, 12675, ''], [2209, 3410, 'a<b>b</b>c<i>d</i>'], [4016, 4116, 'a<b>b</b>c<i>d</i>']], 15], [1, 5]), ('partial repair variant: speed threshold', [[[936, 1137, 'A\\r\\nB\\r\\nC'], [5836, 7570, 'Long line of dialogue here'], [1739, 1739, '']], 15], []), ('boundary control', [[[0, 0, 'a']], 17], [1]), ('boundary control', [[[0, 0, '']], 17], []), ('normal control', [[[3192, 3393, 'a<b>b</b>c<i>d</i>']], 20], []), ('normal control', [[[3725, 6725, '<c.yellow>Cue</c> text'], [8427, 8663, 'a<b>b</b>c<i>d</i>'], [9335, 9325, '<font color=\"red\">Red</font>']], 17], [3]), ('normal control', [[[6632, 6632, 'Two\\nlines'], [8773, 8763, 'Two\\nlines'], [815, 815, '<c.yellow>Cue</c> text']], 10], [1, 2, 3])], [('regression: speed threshold', [[[4694, 5494, 'Two\\nlines'], [3327, 3327, 'x\\ny\\nz'], [2373, 4573, '<c.yellow>Cue</c> text'], [1711, 1911, 'x\\n'], [7573, 7573, '<c.yellow>Cue</c> text']], 10], [2, 5]), ('regression variant: speed threshold', [[[955, 1005, '<i>A</i>'], [9350, 11350, 'a<b>b</b>c<i>d</i>'], [864, 854, 'A\\r\\nB\\r\\nC'], [6216, 6716, 'Long line of dialogue here']], 20], [3, 4]), ('partial repair probe: speed threshold', [[[7027, 7527, 'Two\\nlines'], [1204, 1851, '<i>Italic</i> text'], [7529, 9059, 'Long line of dialogue here'], [3040, 3216, '<font color=\"red\">Red</font>'], [5263, 5253, 'Two\\r\\nlines']], 17], [2, 4, 5]), ('partial repair variant: speed threshold', [[[2544, 2544, '  spaced  '], [4666, 4766, 'Hello'], [1260, 1250, ''], [1606, 1807, 'x\\ny\\nz']], 15], [1, 2]), ('boundary control', [[[0, 0, '']], 17], []), ('boundary control', [[[0, 500, 'a\\r\\nb']], 5], []), ('normal control', [[[4014, 4081, 'a'], [3684, 6684, 'Hi there']], 15], []), ('normal control', [[[8878, 9378, 'a'], [1695, 1990, 'x\\ny\\nz'], [8649, 8649, '<c.yellow>Cue</c> text'], [4805, 5334, 'Two\\nlines']], 17], [3]), ('normal control', [[[3769, 4036, 'a<b>b</b>c<i>d</i>']], 15], [])]]\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-reading-speed-speed-threshold","generated_at":"2026-09-29T14:49:31.387526+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 speed comparison is inclusive at the limit.","sha256":"870c3ddd740d1cfb692536ed09e05ef6c28c93ed79c11612bb3c942ae927586e","title":"Subtitle reading-speed check: speed threshold · 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":41.733,"exit_code":1,"observations":[{"actual":[],"check":"regression: speed threshold","expected":[],"passed":true},{"actual":[],"check":"regression variant: speed threshold","expected":[],"passed":true},{"actual":[],"check":"partial repair probe: speed threshold","expected":[1],"passed":false},{"actual":[2],"check":"partial repair variant: speed threshold","expected":[2,5],"passed":false},{"actual":[1],"check":"boundary control","expected":[1],"passed":true},{"actual":[],"check":"boundary control","expected":[],"passed":true},{"actual":[],"check":"normal control","expected":[],"passed":true},{"actual":[],"check":"normal control","expected":[],"passed":true},{"actual":[1],"check":"normal control","expected":[1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: speed threshold\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression variant: speed threshold\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial repair probe: speed threshold\", \"actual\": [], \"expected\": [1], \"passed\": false}, {\"check\": \"partial repair variant: speed threshold\", \"actual\": [2], \"expected\": [2, 5], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1], \"expected\": [1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.694,"exit_code":1,"observations":[{"actual":[1],"check":"regression: speed threshold","expected":[],"passed":false},{"actual":[1],"check":"regression variant: speed threshold","expected":[],"passed":false},{"actual":[1],"check":"partial repair probe: speed threshold","expected":[1],"passed":true},{"actual":[2,5],"check":"partial repair variant: speed threshold","expected":[2,5],"passed":true},{"actual":[1],"check":"boundary control","expected":[1],"passed":true},{"actual":[],"check":"boundary control","expected":[],"passed":true},{"actual":[],"check":"normal control","expected":[],"passed":true},{"actual":[],"check":"normal control","expected":[],"passed":true},{"actual":[1],"check":"normal control","expected":[1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: speed threshold\", \"actual\": [1], \"expected\": [], \"passed\": false}, {\"check\": \"regression variant: speed threshold\", \"actual\": [1], \"expected\": [], \"passed\": false}, {\"check\": \"partial repair probe: speed threshold\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"partial repair variant: speed threshold\", \"actual\": [2, 5], \"expected\": [2, 5], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1], \"expected\": [1], \"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."}}