{"abstract":"Recommended durations fall short of the computed minimum by part of a frame.","category":"Subtitle cue timing","checks":8,"contract":"rules [base,per_char,min,max]. Count characters other than spaces and line breaks; duration = base + count*per_char, clamped to [min,max]; then rounded up to whole frames at fps [N,D]. Return [frames, ceil(frames*1000*D/N)].","contract_signature":"text, fps, rules","evaluation_group":"w2-subtitle-cue-timing-recommended-duration","failed_approach":"Adding one half and rounding uses half-to-even, so exact odd frame counts gain an extra frame.","family":"w2-subtitle-cue-timing-recommended-duration-frame-ceiling","id":"FA-78276","implementations":{"attempt":{"sha256":"dee4a727342e2698e95981d23e21359353f41b306c7f1d36987a44f10aef8df4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(text, fps, rules):\n    base,per,lo,hi=rules\n    n=len(text.replace(' ','').replace('\\n',''))\n    d=base+n*per\n    d=max(lo,min(hi,d))\n    num,den=fps\n    fr=round(d*num/(1000*den)+0.5)\n    return [fr,-((-fr*1000*den)//num)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: frame ceiling', ['Two\\nlines here', [30000, 1001], [0, 70, 800, 7000]], [26, 868]), ('regression variant: frame ceiling', ['Two\\nlines here', [30000, 1001], [300, 50, 1200, 1500]], [36, 1202]), ('partial repair probe: frame ceiling', ['Hello world', [30, 1], [700, 100, 1000, 2000]], [51, 1700]), ('partial repair variant: frame ceiling', ['Hello world', [30, 1], [500, 60, 1000, 6000]], [33, 1100]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['Two\\nlines here', [25, 1], [300, 50, 1200, 1500]], [30, 1200]), ('normal control', ['Hello world', [25, 1], [300, 50, 1200, 1500]], [30, 1200]), ('normal control', ['ok', [30, 1], [700, 100, 1000, 2000]], [30, 1000])], [('regression: frame ceiling', ['ok', [24, 1], [0, 70, 800, 7000]], [20, 834]), ('regression variant: frame ceiling', ['Two\\nlines here', [24000, 1001], [700, 100, 1000, 2000]], [46, 1919]), ('partial repair probe: frame ceiling', ['Two\\nlines here', [30, 1], [700, 100, 1000, 2000]], [57, 1900]), ('partial repair variant: frame ceiling', ['A much longer subtitle line to read', [30, 1], [300, 50, 1200, 1500]], [45, 1500]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['Hello world', [30, 1], [0, 70, 800, 7000]], [24, 800]), ('normal control', ['   ', [24, 1], [700, 100, 1000, 2000]], [24, 1000]), ('normal control', ['ok', [24, 1], [500, 60, 1000, 6000]], [24, 1000])], [('regression: frame ceiling', ['A much longer subtitle line to read', [24000, 1001], [300, 50, 1200, 1500]], [36, 1502]), ('regression variant: frame ceiling', ['Hello world', [30000, 1001], [0, 70, 800, 7000]], [24, 801]), ('partial repair probe: frame ceiling', ['   ', [25, 1], [500, 60, 1000, 6000]], [25, 1000]), ('partial repair variant: frame ceiling', ['ok', [25, 1], [700, 100, 1000, 2000]], [25, 1000]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['ok', [25, 1], [300, 50, 1200, 1500]], [30, 1200]), ('normal control', ['A much longer subtitle line to read', [24, 1], [700, 100, 1000, 2000]], [48, 2000]), ('normal control', ['', [24, 1], [700, 100, 1000, 2000]], [24, 1000])], [('regression: frame ceiling', ['Hi', [24, 1], [0, 70, 800, 7000]], [20, 834]), ('regression variant: frame ceiling', ['ok', [30000, 1001], [300, 50, 1200, 1500]], [36, 1202]), ('partial repair probe: frame ceiling', ['Hi', [25, 1], [700, 100, 1000, 2000]], [25, 1000]), ('partial repair variant: frame ceiling', ['', [25, 1], [700, 100, 1000, 2000]], [25, 1000]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['   ', [24, 1], [500, 60, 1000, 6000]], [24, 1000]), ('normal control', ['Hi', [25, 1], [0, 70, 800, 7000]], [20, 800]), ('normal control', ['', [24, 1], [500, 60, 1000, 6000]], [24, 1000])], [('regression: frame ceiling', ['   ', [24000, 1001], [0, 70, 800, 7000]], [20, 835]), ('regression variant: frame ceiling', ['', [24, 1], [300, 50, 1200, 1500]], [29, 1209]), ('partial repair probe: frame ceiling', ['ok', [25, 1], [500, 60, 1000, 6000]], [25, 1000]), ('partial repair variant: frame ceiling', ['Hi', [25, 1], [500, 60, 1000, 6000]], [25, 1000]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['A much longer subtitle line to read', [24, 1], [300, 50, 1200, 1500]], [36, 1500]), ('normal control', ['', [30, 1], [700, 100, 1000, 2000]], [30, 1000]), ('normal control', ['', [30, 1], [500, 60, 1000, 6000]], [30, 1000])]]\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":"eb0b299c948c4857b95a72a056c31331b4b91fc11ef45faee9a5a0c23cb758e3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(text, fps, rules):\n    base,per,lo,hi=rules\n    n=len(text.replace(' ','').replace('\\n',''))\n    d=base+n*per\n    d=max(lo,min(hi,d))\n    num,den=fps\n    fr=(d*num)//(1000*den)\n    return [fr,-((-fr*1000*den)//num)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: frame ceiling', ['Two\\nlines here', [30000, 1001], [0, 70, 800, 7000]], [26, 868]), ('regression variant: frame ceiling', ['Two\\nlines here', [30000, 1001], [300, 50, 1200, 1500]], [36, 1202]), ('partial repair probe: frame ceiling', ['Hello world', [30, 1], [700, 100, 1000, 2000]], [51, 1700]), ('partial repair variant: frame ceiling', ['Hello world', [30, 1], [500, 60, 1000, 6000]], [33, 1100]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['Two\\nlines here', [25, 1], [300, 50, 1200, 1500]], [30, 1200]), ('normal control', ['Hello world', [25, 1], [300, 50, 1200, 1500]], [30, 1200]), ('normal control', ['ok', [30, 1], [700, 100, 1000, 2000]], [30, 1000])], [('regression: frame ceiling', ['ok', [24, 1], [0, 70, 800, 7000]], [20, 834]), ('regression variant: frame ceiling', ['Two\\nlines here', [24000, 1001], [700, 100, 1000, 2000]], [46, 1919]), ('partial repair probe: frame ceiling', ['Two\\nlines here', [30, 1], [700, 100, 1000, 2000]], [57, 1900]), ('partial repair variant: frame ceiling', ['A much longer subtitle line to read', [30, 1], [300, 50, 1200, 1500]], [45, 1500]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['Hello world', [30, 1], [0, 70, 800, 7000]], [24, 800]), ('normal control', ['   ', [24, 1], [700, 100, 1000, 2000]], [24, 1000]), ('normal control', ['ok', [24, 1], [500, 60, 1000, 6000]], [24, 1000])], [('regression: frame ceiling', ['A much longer subtitle line to read', [24000, 1001], [300, 50, 1200, 1500]], [36, 1502]), ('regression variant: frame ceiling', ['Hello world', [30000, 1001], [0, 70, 800, 7000]], [24, 801]), ('partial repair probe: frame ceiling', ['   ', [25, 1], [500, 60, 1000, 6000]], [25, 1000]), ('partial repair variant: frame ceiling', ['ok', [25, 1], [700, 100, 1000, 2000]], [25, 1000]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['ok', [25, 1], [300, 50, 1200, 1500]], [30, 1200]), ('normal control', ['A much longer subtitle line to read', [24, 1], [700, 100, 1000, 2000]], [48, 2000]), ('normal control', ['', [24, 1], [700, 100, 1000, 2000]], [24, 1000])], [('regression: frame ceiling', ['Hi', [24, 1], [0, 70, 800, 7000]], [20, 834]), ('regression variant: frame ceiling', ['ok', [30000, 1001], [300, 50, 1200, 1500]], [36, 1202]), ('partial repair probe: frame ceiling', ['Hi', [25, 1], [700, 100, 1000, 2000]], [25, 1000]), ('partial repair variant: frame ceiling', ['', [25, 1], [700, 100, 1000, 2000]], [25, 1000]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['   ', [24, 1], [500, 60, 1000, 6000]], [24, 1000]), ('normal control', ['Hi', [25, 1], [0, 70, 800, 7000]], [20, 800]), ('normal control', ['', [24, 1], [500, 60, 1000, 6000]], [24, 1000])], [('regression: frame ceiling', ['   ', [24000, 1001], [0, 70, 800, 7000]], [20, 835]), ('regression variant: frame ceiling', ['', [24, 1], [300, 50, 1200, 1500]], [29, 1209]), ('partial repair probe: frame ceiling', ['ok', [25, 1], [500, 60, 1000, 6000]], [25, 1000]), ('partial repair variant: frame ceiling', ['Hi', [25, 1], [500, 60, 1000, 6000]], [25, 1000]), ('boundary control', ['A much longer subtitle line to read', [25, 1], [500, 60, 1000, 2000]], [50, 2000]), ('normal control', ['A much longer subtitle line to read', [24, 1], [300, 50, 1200, 1500]], [36, 1500]), ('normal control', ['', [30, 1], [700, 100, 1000, 2000]], [30, 1000]), ('normal control', ['', [30, 1], [500, 60, 1000, 6000]], [30, 1000])]]\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-recommended-duration-frame-ceiling","generated_at":"2026-09-29T14:49:33.982477+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 duration is floored to whole frames.","sha256":"50ac98472d0b2a0c4f3d7d5b12accf9142d401aac136d1fb5257767247791fa2","title":"Recommended cue duration on frame grid: frame ceiling · 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.481,"exit_code":1,"observations":[{"actual":[26,868],"check":"regression: frame ceiling","expected":[26,868],"passed":true},{"actual":[36,1202],"check":"regression variant: frame ceiling","expected":[36,1202],"passed":true},{"actual":[52,1734],"check":"partial repair probe: frame ceiling","expected":[51,1700],"passed":false},{"actual":[34,1134],"check":"partial repair variant: frame ceiling","expected":[33,1100],"passed":false},{"actual":[50,2000],"check":"boundary control","expected":[50,2000],"passed":true},{"actual":[30,1200],"check":"normal control","expected":[30,1200],"passed":true},{"actual":[30,1200],"check":"normal control","expected":[30,1200],"passed":true},{"actual":[30,1000],"check":"normal control","expected":[30,1000],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: frame ceiling\", \"actual\": [26, 868], \"expected\": [26, 868], \"passed\": true}, {\"check\": \"regression variant: frame ceiling\", \"actual\": [36, 1202], \"expected\": [36, 1202], \"passed\": true}, {\"check\": \"partial repair probe: frame ceiling\", \"actual\": [52, 1734], \"expected\": [51, 1700], \"passed\": false}, {\"check\": \"partial repair variant: frame ceiling\", \"actual\": [34, 1134], \"expected\": [33, 1100], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [50, 2000], \"expected\": [50, 2000], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [30, 1200], \"expected\": [30, 1200], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [30, 1200], \"expected\": [30, 1200], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [30, 1000], \"expected\": [30, 1000], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.495,"exit_code":1,"observations":[{"actual":[25,835],"check":"regression: frame ceiling","expected":[26,868],"passed":false},{"actual":[35,1168],"check":"regression variant: frame ceiling","expected":[36,1202],"passed":false},{"actual":[51,1700],"check":"partial repair probe: frame ceiling","expected":[51,1700],"passed":true},{"actual":[33,1100],"check":"partial repair variant: frame ceiling","expected":[33,1100],"passed":true},{"actual":[50,2000],"check":"boundary control","expected":[50,2000],"passed":true},{"actual":[30,1200],"check":"normal control","expected":[30,1200],"passed":true},{"actual":[30,1200],"check":"normal control","expected":[30,1200],"passed":true},{"actual":[30,1000],"check":"normal control","expected":[30,1000],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: frame ceiling\", \"actual\": [25, 835], \"expected\": [26, 868], \"passed\": false}, {\"check\": \"regression variant: frame ceiling\", \"actual\": [35, 1168], \"expected\": [36, 1202], \"passed\": false}, {\"check\": \"partial repair probe: frame ceiling\", \"actual\": [51, 1700], \"expected\": [51, 1700], \"passed\": true}, {\"check\": \"partial repair variant: frame ceiling\", \"actual\": [33, 1100], \"expected\": [33, 1100], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [50, 2000], \"expected\": [50, 2000], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [30, 1200], \"expected\": [30, 1200], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [30, 1200], \"expected\": [30, 1200], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [30, 1000], \"expected\": [30, 1000], \"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."}}