{"abstract":"Source clips that cross midnight yield negative or near-day record durations.","category":"Broadcast timecode arithmetic","checks":9,"contract":"event [src_in, src_out, rec_in, speed_percent] with non-drop labels at fps; src_out is exclusive and may cross midnight. Record duration = source frames * 100 / |speed| rounded half up (reverse speeds use the magnitude; speed 0 returns None). Return [record_out label (exclusive, wrapped at 24 h), record duration].","contract_signature":"event, fps","evaluation_group":"w2-broadcast-timecode-arithmetic-edl-speed-event","failed_approach":"The absolute difference gives the complement of the real span for midnight-crossing clips.","family":"w2-broadcast-timecode-arithmetic-edl-speed-event-midnight-source-span","id":"FA-78501","implementations":{"attempt":{"sha256":"672be7b37c0dfe061a3ba4938e936ea6b3a14a3c03ad7465c4d96596a53af6a5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, fps):\n    def fr(t):\n        h,m,s,f=map(int,t.split(':'))\n        return ((h*60+m)*60+s)*fps+f\n    def tc(n):\n        n%=86400*fps\n        return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)\n    src_in,src_out,rec_in,speed=event\n    if speed==0:\n        return None\n    sp=abs(speed)\n    dur=abs(fr(src_out)-fr(src_in))\n    rec=(dur*200+sp)//(2*sp)\n    return [tc(fr(rec_in)+rec),rec]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: midnight source span', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('regression variant: midnight source span', [['23:59:01:12', '01:00:01:12', '00:29:59:24', 100], 25], ['01:30:59:24', 91500]), ('partial repair probe: midnight source span', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('partial repair variant: midnight source span', [['23:00:30:01', '00:29:59:29', '00:29:59:29', 75], 30], ['02:29:19:26', 214797]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('normal control', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('normal control', [['00:29:01:12', '10:00:59:01', '23:00:59:01', -100], 24], ['08:32:56:14', 823621]), ('normal control', [['00:00:01:12', '23:00:30:01', '00:01:59:00', -100], 25], ['23:02:27:14', 2070714])], [('regression: midnight source span', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('regression variant: midnight source span', [['23:01:01:01', '01:59:01:29', '23:59:01:01', 250], 30], ['01:10:13:12', 128171]), ('partial repair probe: midnight source span', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('partial repair variant: midnight source span', [['23:59:30:01', '00:00:01:01', '00:59:01:00', 75], 24], ['00:59:42:08', 992]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['01:00:00:12', '23:29:30:00', '23:59:30:24', 200], 25], ['11:14:15:18', 1012119]), ('normal control', [['00:01:01:01', '10:59:59:00', '23:29:59:01', 0], 24], None), ('normal control', [['10:00:30:01', '23:00:00:01', '23:29:01:01', 100], 30], ['12:28:31:01', 1403100])], [('regression: midnight source span', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('regression variant: midnight source span', [['23:01:01:00', '00:00:30:23', '01:01:30:01', 100], 24], ['02:01:00:00', 85679]), ('partial repair probe: midnight source span', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('partial repair variant: midnight source span', [['23:01:00:23', '10:00:30:00', '01:00:01:00', 100], 24], ['11:59:30:01', 949657]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('normal control', [['00:29:59:01', '01:59:30:24', '00:01:59:12', 200], 25], ['00:46:45:11', 67149]), ('normal control', [['10:29:30:23', '23:59:59:00', '00:59:30:01', -200], 24], ['07:44:44:02', 583537]), ('normal control', [['00:00:30:12', '23:00:59:12', '00:01:59:01', 75], 24], ['06:42:37:17', 2650528])], [('regression: midnight source span', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('regression variant: midnight source span', [['10:59:00:23', '00:00:30:00', '23:00:30:00', -50], 24], ['01:03:28:02', 2250674]), ('partial repair probe: midnight source span', [['23:59:01:12', '01:00:01:12', '00:29:59:24', 100], 25], ['01:30:59:24', 91500]), ('partial repair variant: midnight source span', [['01:00:59:24', '00:00:01:00', '00:59:59:01', -50], 25], ['22:58:01:03', 4137052]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['00:29:00:12', '23:29:59:12', '00:59:01:00', 33], 25], ['22:43:48:22', 6277197]), ('normal control', [['00:01:59:01', '23:59:00:12', '23:59:59:12', 100], 24], ['23:57:00:23', 2069315]), ('normal control', [['23:29:01:00', '23:59:00:23', '23:29:59:01', -200], 24], ['23:44:59:01', 21600])], [('regression: midnight source span', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('regression variant: midnight source span', [['23:00:30:01', '00:29:59:29', '00:29:59:29', 75], 30], ['02:29:19:26', 214797]), ('partial repair probe: midnight source span', [['23:01:01:01', '01:59:01:29', '23:59:01:01', 250], 30], ['01:10:13:12', 128171]), ('partial repair variant: midnight source span', [['10:59:30:12', '00:01:01:00', '23:00:30:01', -200], 24], ['05:31:15:07', 562686]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('normal control', [['10:59:30:23', '23:00:30:00', '01:59:01:00', 150], 24], ['09:59:40:09', 692145]), ('normal control', [['00:01:59:00', '23:00:59:01', '00:00:59:23', -50], 24], ['21:59:00:01', 3971522]), ('normal control', [['00:59:59:01', '10:29:01:12', '00:59:01:23', -200], 24], ['05:43:33:05', 409710])]]\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":"61a6e3e58a489a2c4bc4ca13fec88c58951afd7484931be6477cc32f62399207","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, fps):\n    def fr(t):\n        h,m,s,f=map(int,t.split(':'))\n        return ((h*60+m)*60+s)*fps+f\n    def tc(n):\n        n%=86400*fps\n        return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)\n    src_in,src_out,rec_in,speed=event\n    if speed==0:\n        return None\n    sp=abs(speed)\n    dur=fr(src_out)-fr(src_in)\n    rec=(dur*200+sp)//(2*sp)\n    return [tc(fr(rec_in)+rec),rec]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: midnight source span', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('regression variant: midnight source span', [['23:59:01:12', '01:00:01:12', '00:29:59:24', 100], 25], ['01:30:59:24', 91500]), ('partial repair probe: midnight source span', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('partial repair variant: midnight source span', [['23:00:30:01', '00:29:59:29', '00:29:59:29', 75], 30], ['02:29:19:26', 214797]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('normal control', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('normal control', [['00:29:01:12', '10:00:59:01', '23:00:59:01', -100], 24], ['08:32:56:14', 823621]), ('normal control', [['00:00:01:12', '23:00:30:01', '00:01:59:00', -100], 25], ['23:02:27:14', 2070714])], [('regression: midnight source span', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('regression variant: midnight source span', [['23:01:01:01', '01:59:01:29', '23:59:01:01', 250], 30], ['01:10:13:12', 128171]), ('partial repair probe: midnight source span', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('partial repair variant: midnight source span', [['23:59:30:01', '00:00:01:01', '00:59:01:00', 75], 24], ['00:59:42:08', 992]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['01:00:00:12', '23:29:30:00', '23:59:30:24', 200], 25], ['11:14:15:18', 1012119]), ('normal control', [['00:01:01:01', '10:59:59:00', '23:29:59:01', 0], 24], None), ('normal control', [['10:00:30:01', '23:00:00:01', '23:29:01:01', 100], 30], ['12:28:31:01', 1403100])], [('regression: midnight source span', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('regression variant: midnight source span', [['23:01:01:00', '00:00:30:23', '01:01:30:01', 100], 24], ['02:01:00:00', 85679]), ('partial repair probe: midnight source span', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('partial repair variant: midnight source span', [['23:01:00:23', '10:00:30:00', '01:00:01:00', 100], 24], ['11:59:30:01', 949657]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('normal control', [['00:29:59:01', '01:59:30:24', '00:01:59:12', 200], 25], ['00:46:45:11', 67149]), ('normal control', [['10:29:30:23', '23:59:59:00', '00:59:30:01', -200], 24], ['07:44:44:02', 583537]), ('normal control', [['00:00:30:12', '23:00:59:12', '00:01:59:01', 75], 24], ['06:42:37:17', 2650528])], [('regression: midnight source span', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('regression variant: midnight source span', [['10:59:00:23', '00:00:30:00', '23:00:30:00', -50], 24], ['01:03:28:02', 2250674]), ('partial repair probe: midnight source span', [['23:59:01:12', '01:00:01:12', '00:29:59:24', 100], 25], ['01:30:59:24', 91500]), ('partial repair variant: midnight source span', [['01:00:59:24', '00:00:01:00', '00:59:59:01', -50], 25], ['22:58:01:03', 4137052]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('normal control', [['00:29:00:12', '23:29:59:12', '00:59:01:00', 33], 25], ['22:43:48:22', 6277197]), ('normal control', [['00:01:59:01', '23:59:00:12', '23:59:59:12', 100], 24], ['23:57:00:23', 2069315]), ('normal control', [['23:29:01:00', '23:59:00:23', '23:29:59:01', -200], 24], ['23:44:59:01', 21600])], [('regression: midnight source span', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('regression variant: midnight source span', [['23:00:30:01', '00:29:59:29', '00:29:59:29', 75], 30], ['02:29:19:26', 214797]), ('partial repair probe: midnight source span', [['23:01:01:01', '01:59:01:29', '23:59:01:01', 250], 30], ['01:10:13:12', 128171]), ('partial repair variant: midnight source span', [['10:59:30:12', '00:01:01:00', '23:00:30:01', -200], 24], ['05:31:15:07', 562686]), ('boundary control', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('boundary control', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('normal control', [['10:59:30:23', '23:00:30:00', '01:59:01:00', 150], 24], ['09:59:40:09', 692145]), ('normal control', [['00:01:59:00', '23:00:59:01', '00:00:59:23', -50], 24], ['21:59:00:01', 3971522]), ('normal control', [['00:59:59:01', '10:29:01:12', '00:59:01:23', -200], 24], ['05:43:33:05', 409710])]]\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-edl-speed-event-midnight-source-span","generated_at":"2026-09-29T14:49:35.942764+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":"The source span is not wrapped modulo the day.","sha256":"45ecbb3f11189161ad5ecbb5e575a5c64bd5c3cd7ad5415f7f85305187936afc","title":"EDL speed-change record out: midnight source span · 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.532,"exit_code":1,"observations":[{"actual":["23:59:58:00",2159950],"check":"regression: midnight source span","expected":["00:00:02:00",50],"passed":false},{"actual":["23:28:59:24",2068500],"check":"regression variant: midnight source span","expected":["01:30:59:24",91500],"passed":false},{"actual":["06:20:29:05",2534369],"check":"partial repair probe: midnight source span","expected":["03:40:31:19",230431],"passed":false},{"actual":["06:30:40:02",3241203],"check":"partial repair variant: midnight source span","expected":["02:29:19:26",214797],"passed":false},{"actual":["10:00:02:00",50],"check":"boundary control","expected":["10:00:02:00",50],"passed":true},{"actual":["00:00:00:02",2],"check":"boundary control","expected":["00:00:00:02",2],"passed":true},{"actual":["20:35:49:21",6263709],"check":"normal control","expected":["20:35:49:21",6263709],"passed":true},{"actual":["08:32:56:14",823621],"check":"normal control","expected":["08:32:56:14",823621],"passed":true},{"actual":["23:02:27:14",2070714],"check":"normal control","expected":["23:02:27:14",2070714],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: midnight source span\", \"actual\": [\"23:59:58:00\", 2159950], \"expected\": [\"00:00:02:00\", 50], \"passed\": false}, {\"check\": \"regression variant: midnight source span\", \"actual\": [\"23:28:59:24\", 2068500], \"expected\": [\"01:30:59:24\", 91500], \"passed\": false}, {\"check\": \"partial repair probe: midnight source span\", \"actual\": [\"06:20:29:05\", 2534369], \"expected\": [\"03:40:31:19\", 230431], \"passed\": false}, {\"check\": \"partial repair variant: midnight source span\", \"actual\": [\"06:30:40:02\", 3241203], \"expected\": [\"02:29:19:26\", 214797], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [\"10:00:02:00\", 50], \"expected\": [\"10:00:02:00\", 50], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [\"00:00:00:02\", 2], \"expected\": [\"00:00:00:02\", 2], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [\"20:35:49:21\", 6263709], \"expected\": [\"20:35:49:21\", 6263709], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [\"08:32:56:14\", 823621], \"expected\": [\"08:32:56:14\", 823621], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [\"23:02:27:14\", 2070714], \"expected\": [\"23:02:27:14\", 2070714], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.914,"exit_code":1,"observations":[{"actual":["00:00:02:00",-2159950],"check":"regression: midnight source span","expected":["00:00:02:00",50],"passed":false},{"actual":["01:30:59:24",-2068500],"check":"regression variant: midnight source span","expected":["01:30:59:24",91500],"passed":false},{"actual":["19:40:31:19",-2534369],"check":"partial repair probe: midnight source span","expected":["03:40:31:19",230431],"passed":false},{"actual":["18:29:19:26",-3241203],"check":"partial repair variant: midnight source span","expected":["02:29:19:26",214797],"passed":false},{"actual":["10:00:02:00",50],"check":"boundary control","expected":["10:00:02:00",50],"passed":true},{"actual":["00:00:00:02",2],"check":"boundary control","expected":["00:00:00:02",2],"passed":true},{"actual":["20:35:49:21",6263709],"check":"normal control","expected":["20:35:49:21",6263709],"passed":true},{"actual":["08:32:56:14",823621],"check":"normal control","expected":["08:32:56:14",823621],"passed":true},{"actual":["23:02:27:14",2070714],"check":"normal control","expected":["23:02:27:14",2070714],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: midnight source span\", \"actual\": [\"00:00:02:00\", -2159950], \"expected\": [\"00:00:02:00\", 50], \"passed\": false}, {\"check\": \"regression variant: midnight source span\", \"actual\": [\"01:30:59:24\", -2068500], \"expected\": [\"01:30:59:24\", 91500], \"passed\": false}, {\"check\": \"partial repair probe: midnight source span\", \"actual\": [\"19:40:31:19\", -2534369], \"expected\": [\"03:40:31:19\", 230431], \"passed\": false}, {\"check\": \"partial repair variant: midnight source span\", \"actual\": [\"18:29:19:26\", -3241203], \"expected\": [\"02:29:19:26\", 214797], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [\"10:00:02:00\", 50], \"expected\": [\"10:00:02:00\", 50], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [\"00:00:00:02\", 2], \"expected\": [\"00:00:00:02\", 2], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [\"20:35:49:21\", 6263709], \"expected\": [\"20:35:49:21\", 6263709], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [\"08:32:56:14\", 823621], \"expected\": [\"08:32:56:14\", 823621], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [\"23:02:27:14\", 2070714], \"expected\": [\"23:02:27:14\", 2070714], \"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."}}