{"abstract":"A frame field equal to the frame rate is accepted and rolls into the next second.","category":"Subtitle cue timing","checks":9,"contract":"Evaluate a timed-text time expression to integer ms, rounded half up. Offset form <number><metric> with metric h, m, s, ms, f (frames at frame_rate) or t (ticks at tick_rate). Clock form HH:MM:SS with optional .fraction (any digits) or :FF frames (FF < frame_rate). Minutes/seconds above 59 or malformed text give None.","contract_signature":"expr, frame_rate, tick_rate","evaluation_group":"w2-subtitle-cue-timing-ttml-time-expression","failed_approach":"A fixed limit of 60 ignores the declared frame rate.","family":"w2-subtitle-cue-timing-ttml-time-expression-clock-frame-bound","id":"FA-78206","implementations":{"attempt":{"sha256":"ac3c738bf6977c94fed71671d16dc38fe8b9e8b72266e0dc55e8cb12cdaf7b00","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport re\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(expr, frame_rate, tick_rate):\n    m=re.fullmatch(r'(\\d+(?:\\.\\d+)?)(h|ms|m|s|f|t)',expr)\n    if m:\n        v=Fraction(m.group(1))\n        unit=m.group(2)\n        scale={'h':3600000,'m':60000,'s':1000,'ms':1}\n        if unit in scale:\n            x=v*scale[unit]\n        elif unit=='f':\n            x=v*1000/frame_rate\n        else:\n            x=v*1000/tick_rate\n        return math.floor(x+Fraction(1,2))\n    m=re.fullmatch(r'(\\d{2,}):(\\d{2}):(\\d{2})(?:\\.(\\d+)|:(\\d{2,}))?',expr)\n    if not m:\n        return None\n    h,mi,se,frac,fr=m.groups()\n    if int(mi)>59 or int(se)>59:\n        return None\n    x=Fraction(int(h)*3600+int(mi)*60+int(se))*1000\n    if frac:\n        x+=Fraction('0.'+frac)*1000\n    if fr:\n        if int(fr)>=60:\n            return None\n        x+=Fraction(int(fr)*1000,frame_rate)\n    return (x*2+1)//2\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: clock frame bound', ['00:00:00:25', 25, 1000], None), ('regression variant: clock frame bound', ['100:59:05:30', 30, 1000], None), ('partial repair probe: clock frame bound', ['10:30:00:25', 16, 10000000], None), ('partial repair variant: clock frame bound', ['100:30:00:29', 25, 90000], None), ('boundary control', ['10t', 25, 1000], 10), ('boundary control', ['00:00:01.0005', 25, 1000], 1001), ('normal control', ['3f', 16, 1000], 188), ('normal control', ['10:59:59:15', 40, 1000], 39599375), ('normal control', ['01:60:59:30', 50, 10000000], None)], [('regression: clock frame bound', ['100:59:05:30', 30, 1000], None), ('regression variant: clock frame bound', ['10:00:00:25', 25, 3], None), ('partial repair probe: clock frame bound', ['100:30:05:30', 16, 10000000], None), ('partial repair variant: clock frame bound', ['10:30:05:25', 24, 3], None), ('boundary control', ['3f', 16, 1000], 188), ('boundary control', ['10t', 25, 1000], 10), ('normal control', ['0ms', 16, 90000], 0), ('normal control', ['2t', 30, 3], 667), ('normal control', ['0.001t', 24, 1000], 0)], [('regression: clock frame bound', ['10:00:00:25', 25, 3], None), ('regression variant: clock frame bound', ['00:30:59:30', 30, 3], None), ('partial repair probe: clock frame bound', ['01:30:05:25', 16, 90000], None), ('partial repair variant: clock frame bound', ['01:59:59:24', 16, 3], None), ('boundary control', ['00:00:01:15', 16, 1000], 1938), ('boundary control', ['3f', 16, 1000], 188), ('normal control', ['0f', 24, 90000], 0), ('normal control', ['15t', 30, 3], 5000), ('normal control', ['01:60:05:12', 16, 10000000], None)], [('regression: clock frame bound', ['00:30:59:30', 30, 3], None), ('regression variant: clock frame bound', ['01:59:05:24', 24, 3], None), ('partial repair probe: clock frame bound', ['10:00:00:30', 25, 1000], None), ('partial repair variant: clock frame bound', ['01:00:59:29', 25, 10000000], None), ('boundary control', ['00:00:01.0005', 25, 1000], 1001), ('boundary control', ['00:00:01:15', 16, 1000], 1938), ('normal control', ['0t', 24, 3], 0), ('normal control', ['17s', 25, 1000], 17000), ('normal control', ['100:59:59:03', 50, 3], 363599060)], [('regression: clock frame bound', ['01:59:05:24', 24, 3], None), ('regression variant: clock frame bound', ['00:00:00:25', 25, 1000], None), ('partial repair probe: clock frame bound', ['00:59:59:30', 24, 3], None), ('partial repair variant: clock frame bound', ['00:59:05:30', 24, 3], None), ('boundary control', ['10t', 25, 1000], 10), ('boundary control', ['00:00:01.0005', 25, 1000], 1001), ('normal control', ['2ms', 40, 90000], 2), ('normal control', ['17h', 24, 10000000], 61200000), ('normal control', ['00:59:00:03', 24, 1000], 3540125)]]\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":"530861df00828f628d4751d317d37d9f4516b872ed65efe7670e2f097703d1a8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport re\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(expr, frame_rate, tick_rate):\n    m=re.fullmatch(r'(\\d+(?:\\.\\d+)?)(h|ms|m|s|f|t)',expr)\n    if m:\n        v=Fraction(m.group(1))\n        unit=m.group(2)\n        scale={'h':3600000,'m':60000,'s':1000,'ms':1}\n        if unit in scale:\n            x=v*scale[unit]\n        elif unit=='f':\n            x=v*1000/frame_rate\n        else:\n            x=v*1000/tick_rate\n        return math.floor(x+Fraction(1,2))\n    m=re.fullmatch(r'(\\d{2,}):(\\d{2}):(\\d{2})(?:\\.(\\d+)|:(\\d{2,}))?',expr)\n    if not m:\n        return None\n    h,mi,se,frac,fr=m.groups()\n    if int(mi)>59 or int(se)>59:\n        return None\n    x=Fraction(int(h)*3600+int(mi)*60+int(se))*1000\n    if frac:\n        x+=Fraction('0.'+frac)*1000\n    if fr:\n        if int(fr)>frame_rate:\n            return None\n        x+=Fraction(int(fr)*1000,frame_rate)\n    return (x*2+1)//2\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: clock frame bound', ['00:00:00:25', 25, 1000], None), ('regression variant: clock frame bound', ['100:59:05:30', 30, 1000], None), ('partial repair probe: clock frame bound', ['10:30:00:25', 16, 10000000], None), ('partial repair variant: clock frame bound', ['100:30:00:29', 25, 90000], None), ('boundary control', ['10t', 25, 1000], 10), ('boundary control', ['00:00:01.0005', 25, 1000], 1001), ('normal control', ['3f', 16, 1000], 188), ('normal control', ['10:59:59:15', 40, 1000], 39599375), ('normal control', ['01:60:59:30', 50, 10000000], None)], [('regression: clock frame bound', ['100:59:05:30', 30, 1000], None), ('regression variant: clock frame bound', ['10:00:00:25', 25, 3], None), ('partial repair probe: clock frame bound', ['100:30:05:30', 16, 10000000], None), ('partial repair variant: clock frame bound', ['10:30:05:25', 24, 3], None), ('boundary control', ['3f', 16, 1000], 188), ('boundary control', ['10t', 25, 1000], 10), ('normal control', ['0ms', 16, 90000], 0), ('normal control', ['2t', 30, 3], 667), ('normal control', ['0.001t', 24, 1000], 0)], [('regression: clock frame bound', ['10:00:00:25', 25, 3], None), ('regression variant: clock frame bound', ['00:30:59:30', 30, 3], None), ('partial repair probe: clock frame bound', ['01:30:05:25', 16, 90000], None), ('partial repair variant: clock frame bound', ['01:59:59:24', 16, 3], None), ('boundary control', ['00:00:01:15', 16, 1000], 1938), ('boundary control', ['3f', 16, 1000], 188), ('normal control', ['0f', 24, 90000], 0), ('normal control', ['15t', 30, 3], 5000), ('normal control', ['01:60:05:12', 16, 10000000], None)], [('regression: clock frame bound', ['00:30:59:30', 30, 3], None), ('regression variant: clock frame bound', ['01:59:05:24', 24, 3], None), ('partial repair probe: clock frame bound', ['10:00:00:30', 25, 1000], None), ('partial repair variant: clock frame bound', ['01:00:59:29', 25, 10000000], None), ('boundary control', ['00:00:01.0005', 25, 1000], 1001), ('boundary control', ['00:00:01:15', 16, 1000], 1938), ('normal control', ['0t', 24, 3], 0), ('normal control', ['17s', 25, 1000], 17000), ('normal control', ['100:59:59:03', 50, 3], 363599060)], [('regression: clock frame bound', ['01:59:05:24', 24, 3], None), ('regression variant: clock frame bound', ['00:00:00:25', 25, 1000], None), ('partial repair probe: clock frame bound', ['00:59:59:30', 24, 3], None), ('partial repair variant: clock frame bound', ['00:59:05:30', 24, 3], None), ('boundary control', ['10t', 25, 1000], 10), ('boundary control', ['00:00:01.0005', 25, 1000], 1001), ('normal control', ['2ms', 40, 90000], 2), ('normal control', ['17h', 24, 10000000], 61200000), ('normal control', ['00:59:00:03', 24, 1000], 3540125)]]\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-ttml-time-expression-clock-frame-bound","generated_at":"2026-09-29T14:49:33.289709+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 frame field bound allows the frame rate itself.","sha256":"891a2fb93eb617ec159e48ef2280a5fe1e45bf37378b22596e4f06cd2cacb8c2","title":"Timed-text time expression evaluation: clock frame bound · 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":44.944,"exit_code":1,"observations":[{"actual":1000,"check":"regression: clock frame bound","expected":null,"passed":false},{"actual":363546000,"check":"regression variant: clock frame bound","expected":null,"passed":false},{"actual":37801563,"check":"partial repair probe: clock frame bound","expected":null,"passed":false},{"actual":361801160,"check":"partial repair variant: clock frame bound","expected":null,"passed":false},{"actual":10,"check":"boundary control","expected":10,"passed":true},{"actual":1001,"check":"boundary control","expected":1001,"passed":true},{"actual":188,"check":"normal control","expected":188,"passed":true},{"actual":39599375,"check":"normal control","expected":39599375,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: clock frame bound\", \"actual\": 1000, \"expected\": null, \"passed\": false}, {\"check\": \"regression variant: clock frame bound\", \"actual\": 363546000, \"expected\": null, \"passed\": false}, {\"check\": \"partial repair probe: clock frame bound\", \"actual\": 37801563, \"expected\": null, \"passed\": false}, {\"check\": \"partial repair variant: clock frame bound\", \"actual\": 361801160, \"expected\": null, \"passed\": false}, {\"check\": \"boundary control\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"boundary control\", \"actual\": 1001, \"expected\": 1001, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 188, \"expected\": 188, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 39599375, \"expected\": 39599375, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.204,"exit_code":1,"observations":[{"actual":1000,"check":"regression: clock frame bound","expected":null,"passed":false},{"actual":363546000,"check":"regression variant: clock frame bound","expected":null,"passed":false},{"actual":null,"check":"partial repair probe: clock frame bound","expected":null,"passed":true},{"actual":null,"check":"partial repair variant: clock frame bound","expected":null,"passed":true},{"actual":10,"check":"boundary control","expected":10,"passed":true},{"actual":1001,"check":"boundary control","expected":1001,"passed":true},{"actual":188,"check":"normal control","expected":188,"passed":true},{"actual":39599375,"check":"normal control","expected":39599375,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: clock frame bound\", \"actual\": 1000, \"expected\": null, \"passed\": false}, {\"check\": \"regression variant: clock frame bound\", \"actual\": 363546000, \"expected\": null, \"passed\": false}, {\"check\": \"partial repair probe: clock frame bound\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"partial repair variant: clock frame bound\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary control\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"boundary control\", \"actual\": 1001, \"expected\": 1001, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 188, \"expected\": 188, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 39599375, \"expected\": 39599375, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"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."}}