{"abstract":"A label ending in .5 contributes 5 hundredths instead of 50.","category":"Broadcast timecode arithmetic","checks":8,"contract":"Labels HH:MM:SS:FF.s where s is one or two digits of hundredths of a frame (\".5\" means 50). Return the offset from a to b as [frames, subframes] along the shorter way round 24 hours (exactly 12 hours is positive), with both components carrying the sign and 0 <= |subframes| < 100.","contract_signature":"a, b, fps","evaluation_group":"w2-broadcast-timecode-arithmetic-subframe-offset","failed_approach":"Multiplying every subframe by ten breaks two-digit subframes.","family":"w2-broadcast-timecode-arithmetic-subframe-offset-subframe-digits","id":"FA-78806","implementations":{"attempt":{"sha256":"3679c69183324ee61e0fb792a9afe3d36a56985616c14a6ce9cc665ccc407758","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, fps):\n    def parse(t):\n        main,sub=t.split('.')\n        h,m,s,f=map(int,main.split(':'))\n        return (((h*60+m)*60+s)*fps+f)*100+int(sub)*10\n    day=86400*fps*100\n    d=(parse(b)-parse(a))%day\n    if d>day//2:\n        d-=day\n    sign=-1 if d<0 else 1\n    q,r=divmod(abs(d),100)\n    return [sign*q,sign*r]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: subframe digits', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('regression variant: subframe digits', ['00:59:30:01.5', '23:00:00:29.50', 30], [-215072, 0]), ('partial repair probe: subframe digits', ['00:59:59:00.5', '01:59:00:29.50', 30], [106259, 0]), ('partial repair variant: subframe digits', ['12:59:30:01.50', '00:59:59:00.05', 30], [-1295131, -45]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:30:59:00.0', '12:30:59:00.0', 30], [1296000, 0]), ('normal control', ['23:00:00:00.99', '00:00:59:01.99', 30], [109771, 0]), ('normal control', ['00:00:00:01.05', '23:00:00:01.05', 25], [-90000, 0])], [('regression: subframe digits', ['00:59:59:00.5', '01:59:00:29.50', 30], [106259, 0]), ('regression variant: subframe digits', ['23:59:59:01.5', '01:30:00:29.0', 30], [162057, 50]), ('partial repair probe: subframe digits', ['12:30:30:01.00', '23:30:00:24.05', 25], [989273, 5]), ('partial repair variant: subframe digits', ['23:30:00:00.0', '00:59:30:00.99', 30], [161100, 99]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:00:00:29.05', '12:00:00:29.05', 30], [1296000, 0]), ('normal control', ['00:59:59:01.05', '12:59:59:01.05', 30], [1296000, 0]), ('normal control', ['12:00:00:29.0', '00:59:59:00.0', 30], [-1188059, 0])], [('regression: subframe digits', ['23:59:00:24.5', '00:30:59:01.0', 25], [47951, 50]), ('regression variant: subframe digits', ['01:30:00:24.50', '12:59:00:01.5', 25], [1033477, 0]), ('partial repair probe: subframe digits', ['23:00:00:24.50', '23:00:30:01.99', 25], [727, 49]), ('partial repair variant: subframe digits', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['01:59:30:29.05', '13:59:30:29.05', 30], [1296000, 0]), ('normal control', ['00:59:30:00.99', '12:59:30:00.99', 25], [1080000, 0]), ('normal control', ['12:30:59:01.99', '00:30:59:01.99', 30], [1296000, 0])], [('regression: subframe digits', ['23:30:59:00.5', '23:59:30:01.00', 30], [51330, 50]), ('regression variant: subframe digits', ['23:00:59:01.5', '01:30:00:00.0', 30], [268228, 50]), ('partial repair probe: subframe digits', ['01:00:59:29.50', '00:30:30:29.99', 30], [-54869, -51]), ('partial repair variant: subframe digits', ['12:59:59:01.05', '00:00:59:24.00', 25], [991522, 95]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:59:00:24.00', '12:59:00:24.00', 25], [1080000, 0]), ('normal control', ['12:30:30:29.00', '00:30:30:29.00', 30], [1296000, 0]), ('normal control', ['01:30:00:01.5', '13:30:00:01.5', 25], [1080000, 0])], [('regression: subframe digits', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('regression variant: subframe digits', ['23:00:59:29.5', '23:59:00:29.99', 30], [104430, 49]), ('partial repair probe: subframe digits', ['01:00:30:00.99', '23:30:00:29.50', 30], [-162871, -49]), ('partial repair variant: subframe digits', ['23:59:59:29.05', '00:59:00:01.00', 30], [106201, 95]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:00:30:29.50', '12:00:30:29.50', 30], [1296000, 0]), ('normal control', ['00:00:59:29.0', '00:00:59:00.0', 30], [-29, 0]), ('normal control', ['00:30:59:29.00', '12:30:59:29.00', 30], [1296000, 0])]]\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":"f873a1ac5bf4b78270ab7c4f94d354fa51a94942e18b59887cb0c1e86bfcdd6a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, fps):\n    def parse(t):\n        main,sub=t.split('.')\n        h,m,s,f=map(int,main.split(':'))\n        return (((h*60+m)*60+s)*fps+f)*100+int(sub)\n    day=86400*fps*100\n    d=(parse(b)-parse(a))%day\n    if d>day//2:\n        d-=day\n    sign=-1 if d<0 else 1\n    q,r=divmod(abs(d),100)\n    return [sign*q,sign*r]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: subframe digits', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('regression variant: subframe digits', ['00:59:30:01.5', '23:00:00:29.50', 30], [-215072, 0]), ('partial repair probe: subframe digits', ['00:59:59:00.5', '01:59:00:29.50', 30], [106259, 0]), ('partial repair variant: subframe digits', ['12:59:30:01.50', '00:59:59:00.05', 30], [-1295131, -45]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:30:59:00.0', '12:30:59:00.0', 30], [1296000, 0]), ('normal control', ['23:00:00:00.99', '00:00:59:01.99', 30], [109771, 0]), ('normal control', ['00:00:00:01.05', '23:00:00:01.05', 25], [-90000, 0])], [('regression: subframe digits', ['00:59:59:00.5', '01:59:00:29.50', 30], [106259, 0]), ('regression variant: subframe digits', ['23:59:59:01.5', '01:30:00:29.0', 30], [162057, 50]), ('partial repair probe: subframe digits', ['12:30:30:01.00', '23:30:00:24.05', 25], [989273, 5]), ('partial repair variant: subframe digits', ['23:30:00:00.0', '00:59:30:00.99', 30], [161100, 99]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:00:00:29.05', '12:00:00:29.05', 30], [1296000, 0]), ('normal control', ['00:59:59:01.05', '12:59:59:01.05', 30], [1296000, 0]), ('normal control', ['12:00:00:29.0', '00:59:59:00.0', 30], [-1188059, 0])], [('regression: subframe digits', ['23:59:00:24.5', '00:30:59:01.0', 25], [47951, 50]), ('regression variant: subframe digits', ['01:30:00:24.50', '12:59:00:01.5', 25], [1033477, 0]), ('partial repair probe: subframe digits', ['23:00:00:24.50', '23:00:30:01.99', 25], [727, 49]), ('partial repair variant: subframe digits', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['01:59:30:29.05', '13:59:30:29.05', 30], [1296000, 0]), ('normal control', ['00:59:30:00.99', '12:59:30:00.99', 25], [1080000, 0]), ('normal control', ['12:30:59:01.99', '00:30:59:01.99', 30], [1296000, 0])], [('regression: subframe digits', ['23:30:59:00.5', '23:59:30:01.00', 30], [51330, 50]), ('regression variant: subframe digits', ['23:00:59:01.5', '01:30:00:00.0', 30], [268228, 50]), ('partial repair probe: subframe digits', ['01:00:59:29.50', '00:30:30:29.99', 30], [-54869, -51]), ('partial repair variant: subframe digits', ['12:59:59:01.05', '00:00:59:24.00', 25], [991522, 95]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:59:00:24.00', '12:59:00:24.00', 25], [1080000, 0]), ('normal control', ['12:30:30:29.00', '00:30:30:29.00', 30], [1296000, 0]), ('normal control', ['01:30:00:01.5', '13:30:00:01.5', 25], [1080000, 0])], [('regression: subframe digits', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('regression variant: subframe digits', ['23:00:59:29.5', '23:59:00:29.99', 30], [104430, 49]), ('partial repair probe: subframe digits', ['01:00:30:00.99', '23:30:00:29.50', 30], [-162871, -49]), ('partial repair variant: subframe digits', ['23:59:59:29.05', '00:59:00:01.00', 30], [106201, 95]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['00:00:30:29.50', '12:00:30:29.50', 30], [1296000, 0]), ('normal control', ['00:00:59:29.0', '00:00:59:00.0', 30], [-29, 0]), ('normal control', ['00:30:59:29.00', '12:30:59:29.00', 30], [1296000, 0])]]\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 SMPTE or any broadcast 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-broadcast-timecode-arithmetic-subframe-offset-subframe-digits","generated_at":"2026-09-29T14:49:38.607570+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Timecode arithmetic errors misplace edits, commercial breaks and captions against the broadcast clock.","root_cause":"One-digit subframes are read as hundredths.","sha256":"8bc2f1881f0a2187fc29007f2cf4bc69a16134c8b3417ab1effdf637378e4e16","title":"Chase-lock offset with subframes: subframe digits · 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":39.063,"exit_code":1,"observations":[{"actual":[0,50],"check":"regression: subframe digits","expected":[0,50],"passed":true},{"actual":[-215067,-50],"check":"regression variant: subframe digits","expected":[-215072,0],"passed":false},{"actual":[106263,50],"check":"partial repair probe: subframe digits","expected":[106259,0],"passed":false},{"actual":[-1295135,-50],"check":"partial repair variant: subframe digits","expected":[-1295131,-45],"passed":false},{"actual":[1080000,0],"check":"boundary control","expected":[1080000,0],"passed":true},{"actual":[1296000,0],"check":"normal control","expected":[1296000,0],"passed":true},{"actual":[109771,0],"check":"normal control","expected":[109771,0],"passed":true},{"actual":[-90000,0],"check":"normal control","expected":[-90000,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: subframe digits\", \"actual\": [0, 50], \"expected\": [0, 50], \"passed\": true}, {\"check\": \"regression variant: subframe digits\", \"actual\": [-215067, -50], \"expected\": [-215072, 0], \"passed\": false}, {\"check\": \"partial repair probe: subframe digits\", \"actual\": [106263, 50], \"expected\": [106259, 0], \"passed\": false}, {\"check\": \"partial repair variant: subframe digits\", \"actual\": [-1295135, -50], \"expected\": [-1295131, -45], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [1080000, 0], \"expected\": [1080000, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1296000, 0], \"expected\": [1296000, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [109771, 0], \"expected\": [109771, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [-90000, 0], \"expected\": [-90000, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.381,"exit_code":1,"observations":[{"actual":[0,95],"check":"regression: subframe digits","expected":[0,50],"passed":false},{"actual":[-215071,-55],"check":"regression variant: subframe digits","expected":[-215072,0],"passed":false},{"actual":[106259,45],"check":"partial repair probe: subframe digits","expected":[106259,0],"passed":false},{"actual":[-1295131,-45],"check":"partial repair variant: subframe digits","expected":[-1295131,-45],"passed":true},{"actual":[1080000,0],"check":"boundary control","expected":[1080000,0],"passed":true},{"actual":[1296000,0],"check":"normal control","expected":[1296000,0],"passed":true},{"actual":[109771,0],"check":"normal control","expected":[109771,0],"passed":true},{"actual":[-90000,0],"check":"normal control","expected":[-90000,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: subframe digits\", \"actual\": [0, 95], \"expected\": [0, 50], \"passed\": false}, {\"check\": \"regression variant: subframe digits\", \"actual\": [-215071, -55], \"expected\": [-215072, 0], \"passed\": false}, {\"check\": \"partial repair probe: subframe digits\", \"actual\": [106259, 45], \"expected\": [106259, 0], \"passed\": false}, {\"check\": \"partial repair variant: subframe digits\", \"actual\": [-1295131, -45], \"expected\": [-1295131, -45], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [1080000, 0], \"expected\": [1080000, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1296000, 0], \"expected\": [1296000, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [109771, 0], \"expected\": [109771, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [-90000, 0], \"expected\": [-90000, 0], \"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."}}