{"abstract":"A lag of 1.5 frames is reported as -2 frames and +50 subframes.","category":"Broadcast timecode arithmetic","checks":9,"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":"Taking the subframe remainder of the signed value still gives the floor-complement.","family":"w2-broadcast-timecode-arithmetic-subframe-offset-magnitude-split","id":"FA-78796","implementations":{"attempt":{"sha256":"23b045f4f7ecc134697bc19bfa9e69bbcfd5cd2f70775ff3b5452c761a6e7d71","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.ljust(2,'0'))\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=(abs(d)//100,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: magnitude split', ['00:00:00:01.50', '00:00:00:00.00', 25], [-1, -50]), ('regression variant: magnitude split', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('partial repair probe: magnitude split', ['12:59:30:01.50', '00:59:59:00.05', 30], [-1295131, -45]), ('partial repair variant: magnitude split', ['23:59:30:00.0', '23:00:00:29.05', 30], [-107070, -95]), ('boundary control', ['00:00:00:00.00', '00:00:00:01.50', 25], [1, 50]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('normal control', ['00:59:59:00.5', '01:59:00:29.50', 30], [106259, 0]), ('normal control', ['00:30:59:00.0', '12:30:59:00.0', 30], [1296000, 0])], [('regression: magnitude split', ['01:00:59:29.50', '00:30:30:29.99', 30], [-54869, -51]), ('regression variant: magnitude split', ['00:00:00:01.05', '23:00:00:01.05', 25], [-90000, 0]), ('partial repair probe: magnitude split', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('partial repair variant: magnitude split', ['00:00:00:01.05', '12:00:59:24.5', 25], [-1078501, -55]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('boundary control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('normal control', ['01:30:59:29.05', '13:30:59:29.05', 30], [1296000, 0]), ('normal control', ['23:59:00:24.5', '00:30:59:01.0', 25], [47951, 50]), ('normal control', ['23:30:59:00.5', '23:59:30:01.00', 30], [51330, 50])], [('regression: magnitude split', ['01:00:30:00.99', '23:30:00:29.50', 30], [-162871, -49]), ('regression variant: magnitude split', ['00:59:00:29.00', '00:00:00:01.05', 30], [-106227, -95]), ('partial repair probe: magnitude split', ['12:00:59:01.50', '01:00:00:01.05', 25], [-991475, -45]), ('partial repair variant: magnitude split', ['01:59:30:00.99', '23:00:59:00.00', 30], [-321330, -99]), ('boundary control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('boundary control', ['00:00:00:00.00', '00:00:00:01.50', 25], [1, 50]), ('normal control', ['12:59:59:01.05', '00:00:59:24.00', 25], [991522, 95]), ('normal control', ['23:59:59:29.05', '00:59:00:01.00', 30], [106201, 95]), ('normal control', ['23:00:00:00.05', '23:30:00:01.0', 30], [54000, 95])], [('regression: magnitude split', ['01:59:30:29.50', '01:30:30:29.0', 30], [-52200, -50]), ('regression variant: magnitude split', ['00:59:30:01.5', '23:00:00:29.50', 30], [-215072, 0]), ('partial repair probe: magnitude split', ['12:00:59:01.50', '01:00:00:01.05', 25], [-991475, -45]), ('partial repair variant: magnitude split', ['12:59:59:00.5', '01:59:00:00.99', 30], [-1189769, -51]), ('boundary control', ['00:00:00:00.00', '00:00:00:01.50', 25], [1, 50]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['01:00:00:00.00', '01:59:00:01.50', 30], [106201, 50]), ('normal control', ['00:59:00:01.50', '12:30:59:00.00', 25], [1037973, 50]), ('normal control', ['00:59:59:01.05', '12:59:59:01.05', 30], [1296000, 0])], [('regression: magnitude split', ['12:59:30:01.50', '00:59:59:00.05', 30], [-1295131, -45]), ('regression variant: magnitude split', ['12:00:59:01.50', '01:00:00:01.05', 25], [-991475, -45]), ('partial repair probe: magnitude split', ['01:30:00:00.0', '01:00:59:24.99', 25], [-43500, -1]), ('partial repair variant: magnitude split', ['12:59:59:24.99', '12:59:00:24.05', 25], [-1475, -94]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('boundary control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('normal control', ['23:00:59:01.5', '01:30:00:00.0', 30], [268228, 50]), ('normal control', ['01:59:30:29.05', '13:59:30:29.05', 30], [1296000, 0]), ('normal control', ['23:30:30:01.99', '23:59:59:01.05', 25], [44224, 6])]]\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":"014e9aeb9833858ad5de6991c76ac4b9c5fbaffa9cecac9e519f48e0a10b4ce4","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.ljust(2,'0'))\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(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: magnitude split', ['00:00:00:01.50', '00:00:00:00.00', 25], [-1, -50]), ('regression variant: magnitude split', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('partial repair probe: magnitude split', ['12:59:30:01.50', '00:59:59:00.05', 30], [-1295131, -45]), ('partial repair variant: magnitude split', ['23:59:30:00.0', '23:00:00:29.05', 30], [-107070, -95]), ('boundary control', ['00:00:00:00.00', '00:00:00:01.50', 25], [1, 50]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('normal control', ['00:59:59:00.5', '01:59:00:29.50', 30], [106259, 0]), ('normal control', ['00:30:59:00.0', '12:30:59:00.0', 30], [1296000, 0])], [('regression: magnitude split', ['01:00:59:29.50', '00:30:30:29.99', 30], [-54869, -51]), ('regression variant: magnitude split', ['00:00:00:01.05', '23:00:00:01.05', 25], [-90000, 0]), ('partial repair probe: magnitude split', ['01:30:00:00.5', '01:00:59:00.05', 30], [-52230, -45]), ('partial repair variant: magnitude split', ['00:00:00:01.05', '12:00:59:24.5', 25], [-1078501, -55]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('boundary control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('normal control', ['01:30:59:29.05', '13:30:59:29.05', 30], [1296000, 0]), ('normal control', ['23:59:00:24.5', '00:30:59:01.0', 25], [47951, 50]), ('normal control', ['23:30:59:00.5', '23:59:30:01.00', 30], [51330, 50])], [('regression: magnitude split', ['01:00:30:00.99', '23:30:00:29.50', 30], [-162871, -49]), ('regression variant: magnitude split', ['00:59:00:29.00', '00:00:00:01.05', 30], [-106227, -95]), ('partial repair probe: magnitude split', ['12:00:59:01.50', '01:00:00:01.05', 25], [-991475, -45]), ('partial repair variant: magnitude split', ['01:59:30:00.99', '23:00:59:00.00', 30], [-321330, -99]), ('boundary control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('boundary control', ['00:00:00:00.00', '00:00:00:01.50', 25], [1, 50]), ('normal control', ['12:59:59:01.05', '00:00:59:24.00', 25], [991522, 95]), ('normal control', ['23:59:59:29.05', '00:59:00:01.00', 30], [106201, 95]), ('normal control', ['23:00:00:00.05', '23:30:00:01.0', 30], [54000, 95])], [('regression: magnitude split', ['01:59:30:29.50', '01:30:30:29.0', 30], [-52200, -50]), ('regression variant: magnitude split', ['00:59:30:01.5', '23:00:00:29.50', 30], [-215072, 0]), ('partial repair probe: magnitude split', ['12:00:59:01.50', '01:00:00:01.05', 25], [-991475, -45]), ('partial repair variant: magnitude split', ['12:59:59:00.5', '01:59:00:00.99', 30], [-1189769, -51]), ('boundary control', ['00:00:00:00.00', '00:00:00:01.50', 25], [1, 50]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('normal control', ['01:00:00:00.00', '01:59:00:01.50', 30], [106201, 50]), ('normal control', ['00:59:00:01.50', '12:30:59:00.00', 25], [1037973, 50]), ('normal control', ['00:59:59:01.05', '12:59:59:01.05', 30], [1296000, 0])], [('regression: magnitude split', ['12:59:30:01.50', '00:59:59:00.05', 30], [-1295131, -45]), ('regression variant: magnitude split', ['12:00:59:01.50', '01:00:00:01.05', 25], [-991475, -45]), ('partial repair probe: magnitude split', ['01:30:00:00.0', '01:00:59:24.99', 25], [-43500, -1]), ('partial repair variant: magnitude split', ['12:59:59:24.99', '12:59:00:24.05', 25], [-1475, -94]), ('boundary control', ['00:00:00:00.0', '12:00:00:00.0', 25], [1080000, 0]), ('boundary control', ['23:59:59:24.5', '00:00:00:00.0', 25], [0, 50]), ('normal control', ['23:00:59:01.5', '01:30:00:00.0', 30], [268228, 50]), ('normal control', ['01:59:30:29.05', '13:59:30:29.05', 30], [1296000, 0]), ('normal control', ['23:30:30:01.99', '23:59:59:01.05', 25], [44224, 6])]]\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-magnitude-split","generated_at":"2026-09-29T14:49:38.605906+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":"Negative offsets are split with floor division before applying the sign.","sha256":"8a5deb72b83b08ed93254f391688c2d1c497f07dc2acf9fe5f3f4d4a3c4e9499","title":"Chase-lock offset with subframes: magnitude split · 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":42.203,"exit_code":1,"observations":[{"actual":[-1,-50],"check":"regression: magnitude split","expected":[-1,-50],"passed":true},{"actual":[-52230,-55],"check":"regression variant: magnitude split","expected":[-52230,-45],"passed":false},{"actual":[-1295131,-55],"check":"partial repair probe: magnitude split","expected":[-1295131,-45],"passed":false},{"actual":[-107070,-5],"check":"partial repair variant: magnitude split","expected":[-107070,-95],"passed":false},{"actual":[1,50],"check":"boundary control","expected":[1,50],"passed":true},{"actual":[1080000,0],"check":"boundary control","expected":[1080000,0],"passed":true},{"actual":[0,50],"check":"normal control","expected":[0,50],"passed":true},{"actual":[106259,0],"check":"normal control","expected":[106259,0],"passed":true},{"actual":[1296000,0],"check":"normal control","expected":[1296000,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: magnitude split\", \"actual\": [-1, -50], \"expected\": [-1, -50], \"passed\": true}, {\"check\": \"regression variant: magnitude split\", \"actual\": [-52230, -55], \"expected\": [-52230, -45], \"passed\": false}, {\"check\": \"partial repair probe: magnitude split\", \"actual\": [-1295131, -55], \"expected\": [-1295131, -45], \"passed\": false}, {\"check\": \"partial repair variant: magnitude split\", \"actual\": [-107070, -5], \"expected\": [-107070, -95], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [1, 50], \"expected\": [1, 50], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [1080000, 0], \"expected\": [1080000, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [0, 50], \"expected\": [0, 50], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [106259, 0], \"expected\": [106259, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1296000, 0], \"expected\": [1296000, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.558,"exit_code":1,"observations":[{"actual":[2,-50],"check":"regression: magnitude split","expected":[-1,-50],"passed":false},{"actual":[52231,-55],"check":"regression variant: magnitude split","expected":[-52230,-45],"passed":false},{"actual":[1295132,-55],"check":"partial repair probe: magnitude split","expected":[-1295131,-45],"passed":false},{"actual":[107071,-5],"check":"partial repair variant: magnitude split","expected":[-107070,-95],"passed":false},{"actual":[1,50],"check":"boundary control","expected":[1,50],"passed":true},{"actual":[1080000,0],"check":"boundary control","expected":[1080000,0],"passed":true},{"actual":[0,50],"check":"normal control","expected":[0,50],"passed":true},{"actual":[106259,0],"check":"normal control","expected":[106259,0],"passed":true},{"actual":[1296000,0],"check":"normal control","expected":[1296000,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: magnitude split\", \"actual\": [2, -50], \"expected\": [-1, -50], \"passed\": false}, {\"check\": \"regression variant: magnitude split\", \"actual\": [52231, -55], \"expected\": [-52230, -45], \"passed\": false}, {\"check\": \"partial repair probe: magnitude split\", \"actual\": [1295132, -55], \"expected\": [-1295131, -45], \"passed\": false}, {\"check\": \"partial repair variant: magnitude split\", \"actual\": [107071, -5], \"expected\": [-107070, -95], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [1, 50], \"expected\": [1, 50], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [1080000, 0], \"expected\": [1080000, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [0, 50], \"expected\": [0, 50], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [106259, 0], \"expected\": [106259, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1296000, 0], \"expected\": [1296000, 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."}}