{"abstract":"Streams that pass the PTS rollover jump backwards by more than 13 hours.","category":"Broadcast timecode arithmetic","checks":9,"contract":"PTS values are 33-bit 90 kHz ticks. The elapsed ticks since first_pts wrap modulo 2^33, except that a PTS less than 90000 ticks before first_pts (reordering pre-roll) returns None. The frame is the nearest frame at rate [N,D] (halves up); the label uses nominal rate ceil(N/D) and wraps at 24 hours.","contract_signature":"pts, first_pts, fps","evaluation_group":"w2-broadcast-timecode-arithmetic-pts-to-frame","failed_approach":"A modulus one tick short misplaces every wrapped timestamp by a tick.","family":"w2-broadcast-timecode-arithmetic-pts-to-frame-wrap-modulus","id":"FA-78816","implementations":{"attempt":{"sha256":"8bdd36f14b86d965629ca20d141b9ebf07f6937cf08c1009342ea768b3485446","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(pts, first_pts, fps):\n    WRAP=(1<<33)-1\n    raw=pts-first_pts\n    if -90000<raw<0:\n        return None\n    d=raw%WRAP\n    num,den=fps\n    n=(2*d*num+90000*den)//(180000*den)\n    nominal=-(-num//den)\n    return [n,'%02d:%02d:%02d:%02d'%(n//(3600*nominal)%24,n//(60*nominal)%60,n//nominal%60,n%nominal)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: wrap modulus', [0, 90000, [25, 1]], [2386068, '02:30:42:18']), ('regression variant: wrap modulus', [35999, 126000, [24000, 1001]], [2288337, '02:29:07:09']), ('partial repair probe: wrap modulus', [8589934591, 0, [24000, 1001]], [2288361, '02:29:08:09']), ('partial repair variant: wrap modulus', [800, 8589933592, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1800, 0, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1502, 0, [30000, 1001]], [1, '00:00:00:01']), ('normal control', [100, 8589931092, [25, 1]], [1, '00:00:00:01']), ('normal control', [127800, 126000, [25, 1]], [1, '00:00:00:01']), ('normal control', [901502, 900000, [24000, 1001]], [0, '00:00:00:00'])], [('regression: wrap modulus', [7775999000, 8589933592, [50, 1]], [4320000, '00:00:00:00']), ('regression variant: wrap modulus', [36000, 126000, [24000, 1001]], [2288337, '02:29:07:09']), ('partial repair probe: wrap modulus', [800, 8589933592, [25, 1]], [1, '00:00:00:01']), ('partial repair variant: wrap modulus', [8589934591, 0, [30000, 1001]], [2860451, '02:29:08:11']), ('boundary control', [100, 8589931092, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1800, 0, [25, 1]], [1, '00:00:00:01']), ('normal control', [900001, 900000, [50, 1]], [0, '00:00:00:00']), ('normal control', [877, 8589933592, [50, 1]], [1, '00:00:00:01']), ('normal control', [324126000, 126000, [24000, 1001]], [86314, '00:59:56:10'])], [('regression: wrap modulus', [7775910000, 8589844592, [24000, 1001]], [2071528, '23:58:33:16']), ('regression variant: wrap modulus', [8586244592, 8589844592, [25, 1]], [2385093, '02:30:03:18']), ('partial repair probe: wrap modulus', [8589934591, 0, [30000, 1001]], [2860451, '02:29:08:11']), ('partial repair variant: wrap modulus', [502, 8589933592, [30000, 1001]], [1, '00:00:00:01']), ('boundary control', [0, 45000, [25, 1]], None), ('boundary control', [100, 8589931092, [25, 1]], [1, '00:00:00:01']), ('normal control', [126000, 126000, [25, 1]], [0, '00:00:00:00']), ('normal control', [324126000, 126000, [50, 1]], [180000, '01:00:00:00']), ('normal control', [3753, 0, [25, 1]], [1, '00:00:00:01'])], [('regression: wrap modulus', [8586333592, 8589933592, [30000, 1001]], [2859252, '02:28:28:12']), ('regression variant: wrap modulus', [7775910000, 8589844592, [25, 1]], [2160000, '00:00:00:00']), ('partial repair probe: wrap modulus', [502, 8589933592, [30000, 1001]], [1, '00:00:00:01']), ('partial repair variant: wrap modulus', [877, 8589933592, [24000, 1001]], [1, '00:00:00:01']), ('boundary control', [1502, 0, [30000, 1001]], [1, '00:00:00:01']), ('boundary control', [0, 45000, [25, 1]], None), ('normal control', [129600, 126000, [25, 1]], [1, '00:00:00:01']), ('normal control', [801, 8589933592, [30000, 1001]], [1, '00:00:00:01']), ('normal control', [323999000, 8589933592, [25, 1]], [90000, '01:00:00:00'])], [('regression: wrap modulus', [7776000000, 0, [50, 1]], [4320000, '00:00:00:00']), ('regression variant: wrap modulus', [810000, 900000, [30000, 1001]], [2860421, '02:29:07:11']), ('partial repair probe: wrap modulus', [877, 8589933592, [24000, 1001]], [1, '00:00:00:01']), ('partial repair variant: wrap modulus', [8589934591, 0, [25, 1]], [2386093, '02:30:43:18']), ('boundary control', [1800, 0, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1502, 0, [30000, 1001]], [1, '00:00:00:01']), ('normal control', [810001, 900000, [24000, 1001]], None), ('normal control', [3754, 0, [25, 1]], [1, '00:00:00:01']), ('normal control', [127502, 126000, [25, 1]], [0, '00:00:00:00'])]]\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":"72cf517f73bef704c26d88ab172ffda391bd8b90ca66d2c56efde8a40b118a64","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(pts, first_pts, fps):\n    WRAP=1<<32\n    raw=pts-first_pts\n    if -90000<raw<0:\n        return None\n    d=raw%WRAP\n    num,den=fps\n    n=(2*d*num+90000*den)//(180000*den)\n    nominal=-(-num//den)\n    return [n,'%02d:%02d:%02d:%02d'%(n//(3600*nominal)%24,n//(60*nominal)%60,n//nominal%60,n%nominal)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: wrap modulus', [0, 90000, [25, 1]], [2386068, '02:30:42:18']), ('regression variant: wrap modulus', [35999, 126000, [24000, 1001]], [2288337, '02:29:07:09']), ('partial repair probe: wrap modulus', [8589934591, 0, [24000, 1001]], [2288361, '02:29:08:09']), ('partial repair variant: wrap modulus', [800, 8589933592, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1800, 0, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1502, 0, [30000, 1001]], [1, '00:00:00:01']), ('normal control', [100, 8589931092, [25, 1]], [1, '00:00:00:01']), ('normal control', [127800, 126000, [25, 1]], [1, '00:00:00:01']), ('normal control', [901502, 900000, [24000, 1001]], [0, '00:00:00:00'])], [('regression: wrap modulus', [7775999000, 8589933592, [50, 1]], [4320000, '00:00:00:00']), ('regression variant: wrap modulus', [36000, 126000, [24000, 1001]], [2288337, '02:29:07:09']), ('partial repair probe: wrap modulus', [800, 8589933592, [25, 1]], [1, '00:00:00:01']), ('partial repair variant: wrap modulus', [8589934591, 0, [30000, 1001]], [2860451, '02:29:08:11']), ('boundary control', [100, 8589931092, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1800, 0, [25, 1]], [1, '00:00:00:01']), ('normal control', [900001, 900000, [50, 1]], [0, '00:00:00:00']), ('normal control', [877, 8589933592, [50, 1]], [1, '00:00:00:01']), ('normal control', [324126000, 126000, [24000, 1001]], [86314, '00:59:56:10'])], [('regression: wrap modulus', [7775910000, 8589844592, [24000, 1001]], [2071528, '23:58:33:16']), ('regression variant: wrap modulus', [8586244592, 8589844592, [25, 1]], [2385093, '02:30:03:18']), ('partial repair probe: wrap modulus', [8589934591, 0, [30000, 1001]], [2860451, '02:29:08:11']), ('partial repair variant: wrap modulus', [502, 8589933592, [30000, 1001]], [1, '00:00:00:01']), ('boundary control', [0, 45000, [25, 1]], None), ('boundary control', [100, 8589931092, [25, 1]], [1, '00:00:00:01']), ('normal control', [126000, 126000, [25, 1]], [0, '00:00:00:00']), ('normal control', [324126000, 126000, [50, 1]], [180000, '01:00:00:00']), ('normal control', [3753, 0, [25, 1]], [1, '00:00:00:01'])], [('regression: wrap modulus', [8586333592, 8589933592, [30000, 1001]], [2859252, '02:28:28:12']), ('regression variant: wrap modulus', [7775910000, 8589844592, [25, 1]], [2160000, '00:00:00:00']), ('partial repair probe: wrap modulus', [502, 8589933592, [30000, 1001]], [1, '00:00:00:01']), ('partial repair variant: wrap modulus', [877, 8589933592, [24000, 1001]], [1, '00:00:00:01']), ('boundary control', [1502, 0, [30000, 1001]], [1, '00:00:00:01']), ('boundary control', [0, 45000, [25, 1]], None), ('normal control', [129600, 126000, [25, 1]], [1, '00:00:00:01']), ('normal control', [801, 8589933592, [30000, 1001]], [1, '00:00:00:01']), ('normal control', [323999000, 8589933592, [25, 1]], [90000, '01:00:00:00'])], [('regression: wrap modulus', [7776000000, 0, [50, 1]], [4320000, '00:00:00:00']), ('regression variant: wrap modulus', [810000, 900000, [30000, 1001]], [2860421, '02:29:07:11']), ('partial repair probe: wrap modulus', [877, 8589933592, [24000, 1001]], [1, '00:00:00:01']), ('partial repair variant: wrap modulus', [8589934591, 0, [25, 1]], [2386093, '02:30:43:18']), ('boundary control', [1800, 0, [25, 1]], [1, '00:00:00:01']), ('boundary control', [1502, 0, [30000, 1001]], [1, '00:00:00:01']), ('normal control', [810001, 900000, [24000, 1001]], None), ('normal control', [3754, 0, [25, 1]], [1, '00:00:00:01']), ('normal control', [127502, 126000, [25, 1]], [0, '00:00:00:00'])]]\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-pts-to-frame-wrap-modulus","generated_at":"2026-09-29T14:49:38.654289+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 wrap uses a 32-bit modulus.","sha256":"ec093c28b91e6246746db269d0e833df3de7146e5cdf348cccfd9a45337dad0c","title":"90 kHz presentation timestamp to frame label: wrap modulus · 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":38.907,"exit_code":1,"observations":[{"actual":[2386068,"02:30:42:18"],"check":"regression: wrap modulus","expected":[2386068,"02:30:42:18"],"passed":true},{"actual":[2288337,"02:29:07:09"],"check":"regression variant: wrap modulus","expected":[2288337,"02:29:07:09"],"passed":true},{"actual":[0,"00:00:00:00"],"check":"partial repair probe: wrap modulus","expected":[2288361,"02:29:08:09"],"passed":false},{"actual":[0,"00:00:00:00"],"check":"partial repair variant: wrap modulus","expected":[1,"00:00:00:01"],"passed":false},{"actual":[1,"00:00:00:01"],"check":"boundary control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[1,"00:00:00:01"],"check":"boundary control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[1,"00:00:00:01"],"check":"normal control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[1,"00:00:00:01"],"check":"normal control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[0,"00:00:00:00"],"check":"normal control","expected":[0,"00:00:00:00"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: wrap modulus\", \"actual\": [2386068, \"02:30:42:18\"], \"expected\": [2386068, \"02:30:42:18\"], \"passed\": true}, {\"check\": \"regression variant: wrap modulus\", \"actual\": [2288337, \"02:29:07:09\"], \"expected\": [2288337, \"02:29:07:09\"], \"passed\": true}, {\"check\": \"partial repair probe: wrap modulus\", \"actual\": [0, \"00:00:00:00\"], \"expected\": [2288361, \"02:29:08:09\"], \"passed\": false}, {\"check\": \"partial repair variant: wrap modulus\", \"actual\": [0, \"00:00:00:00\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [0, \"00:00:00:00\"], \"expected\": [0, \"00:00:00:00\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.957,"exit_code":1,"observations":[{"actual":[1193021,"13:15:20:21"],"check":"regression: wrap modulus","expected":[2386068,"02:30:42:18"],"passed":false},{"actual":[1144156,"13:14:33:04"],"check":"regression variant: wrap modulus","expected":[2288337,"02:29:07:09"],"passed":false},{"actual":[1144180,"13:14:34:04"],"check":"partial repair probe: wrap modulus","expected":[2288361,"02:29:08:09"],"passed":false},{"actual":[1,"00:00:00:01"],"check":"partial repair variant: wrap modulus","expected":[1,"00:00:00:01"],"passed":true},{"actual":[1,"00:00:00:01"],"check":"boundary control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[1,"00:00:00:01"],"check":"boundary control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[1,"00:00:00:01"],"check":"normal control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[1,"00:00:00:01"],"check":"normal control","expected":[1,"00:00:00:01"],"passed":true},{"actual":[0,"00:00:00:00"],"check":"normal control","expected":[0,"00:00:00:00"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: wrap modulus\", \"actual\": [1193021, \"13:15:20:21\"], \"expected\": [2386068, \"02:30:42:18\"], \"passed\": false}, {\"check\": \"regression variant: wrap modulus\", \"actual\": [1144156, \"13:14:33:04\"], \"expected\": [2288337, \"02:29:07:09\"], \"passed\": false}, {\"check\": \"partial repair probe: wrap modulus\", \"actual\": [1144180, \"13:14:34:04\"], \"expected\": [2288361, \"02:29:08:09\"], \"passed\": false}, {\"check\": \"partial repair variant: wrap modulus\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, \"00:00:00:01\"], \"expected\": [1, \"00:00:00:01\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [0, \"00:00:00:00\"], \"expected\": [0, \"00:00:00:00\"], \"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."}}