{"abstract":"Color-framed non-drop timecode is announced as drop frame.","category":"Broadcast timecode arithmetic","checks":9,"contract":"Pack HH:MM:SS:FF into four bytes [frames, seconds, minutes, hours] in transmission order. Each byte holds units in bits 0-3 and tens from bit 4 upward. The frames byte carries the drop-frame flag (bit 6, set when the last separator is \";\") and the color-frame flag (bit 7).","contract_signature":"tc, color","evaluation_group":"w2-broadcast-timecode-arithmetic-ltc-bcd-packing","failed_approach":"Tying the color flag to drop frame loses it on non-drop timecode.","family":"w2-broadcast-timecode-arithmetic-ltc-bcd-packing-color-flag-bit","id":"FA-78626","implementations":{"attempt":{"sha256":"291df1e9bcd4cea9f72e49297ab068c9f787b09e586ddb32148a6fe474060a34","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re\nN = 1\nobservations = []\ndef solve(tc, color):\n    h,m,s,f=map(int,re.split('[:;]',tc))\n    drop=';' in tc\n    def bcd(v,flags):\n        return (v//10)<<4|v%10|flags\n    b0=bcd(f,(0x40 if drop else 0)|(0x80 if color and drop else 0))\n    b1=bcd(s,0)\n    b2=bcd(m,0)\n    b3=bcd(h,0)\n    return [b0,b1,b2,b3]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: color flag bit', ['23:59:59;29', True], [233, 89, 89, 35]), ('regression variant: color flag bit', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair probe: color flag bit', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair variant: color flag bit', ['00:10:09:00', True], [128, 9, 16, 0]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['01:02:03;04', False], [68, 3, 2, 1]), ('normal control', ['10:10:09;24', False], [100, 9, 16, 16]), ('normal control', ['10:07:59:01', False], [1, 89, 7, 16])], [('regression: color flag bit', ['01:07:10:29', True], [169, 16, 7, 1]), ('regression variant: color flag bit', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair probe: color flag bit', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair variant: color flag bit', ['00:00:09:24', True], [164, 9, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['01:02:03;04', False], [68, 3, 2, 1]), ('normal control', ['10:00:10;09', False], [73, 16, 0, 16]), ('normal control', ['10:10:00;29', False], [105, 0, 16, 16]), ('normal control', ['10:10:00;19', False], [89, 0, 16, 16])], [('regression: color flag bit', ['00:00:00:00', True], [128, 0, 0, 0]), ('regression variant: color flag bit', ['10:59:10;24', True], [228, 16, 89, 16]), ('partial repair probe: color flag bit', ['19:07:45:24', True], [164, 69, 7, 25]), ('partial repair variant: color flag bit', ['01:59:59:10', True], [144, 89, 89, 1]), ('boundary control', ['01:02:03;04', False], [68, 3, 2, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['23:10:09:01', False], [1, 9, 16, 35]), ('normal control', ['00:07:59;01', False], [65, 89, 7, 0]), ('normal control', ['01:00:10;19', False], [89, 16, 0, 1])], [('regression: color flag bit', ['19:00:09;19', True], [217, 9, 0, 25]), ('regression variant: color flag bit', ['19:07:45:24', True], [164, 69, 7, 25]), ('partial repair probe: color flag bit', ['01:00:09:10', True], [144, 9, 0, 1]), ('partial repair variant: color flag bit', ['00:00:09:01', True], [129, 9, 0, 0]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['23:10:45:09', False], [9, 69, 16, 35]), ('normal control', ['10:10:10;24', False], [100, 16, 16, 16]), ('normal control', ['00:07:00;00', False], [64, 0, 7, 0])], [('regression: color flag bit', ['01:59:10:24', True], [164, 16, 89, 1]), ('regression variant: color flag bit', ['01:00:59;19', True], [217, 89, 0, 1]), ('partial repair probe: color flag bit', ['19:10:10:24', True], [164, 16, 16, 25]), ('partial repair variant: color flag bit', ['19:59:09:00', True], [128, 9, 89, 25]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['01:02:03;04', False], [68, 3, 2, 1]), ('normal control', ['19:59:45;09', False], [73, 69, 89, 25]), ('normal control', ['01:59:59;24', False], [100, 89, 89, 1]), ('normal control', ['10:10:10;19', False], [89, 16, 16, 16])]]\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":"4f2049c61bd6be6634c11768172026d32b08c751a5273241425f6fe8db9fa111","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re\nN = 1\nobservations = []\ndef solve(tc, color):\n    h,m,s,f=map(int,re.split('[:;]',tc))\n    drop=';' in tc\n    def bcd(v,flags):\n        return (v//10)<<4|v%10|flags\n    b0=bcd(f,(0x40 if drop else 0)|(0x40 if color else 0))\n    b1=bcd(s,0)\n    b2=bcd(m,0)\n    b3=bcd(h,0)\n    return [b0,b1,b2,b3]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: color flag bit', ['23:59:59;29', True], [233, 89, 89, 35]), ('regression variant: color flag bit', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair probe: color flag bit', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair variant: color flag bit', ['00:10:09:00', True], [128, 9, 16, 0]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['01:02:03;04', False], [68, 3, 2, 1]), ('normal control', ['10:10:09;24', False], [100, 9, 16, 16]), ('normal control', ['10:07:59:01', False], [1, 89, 7, 16])], [('regression: color flag bit', ['01:07:10:29', True], [169, 16, 7, 1]), ('regression variant: color flag bit', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair probe: color flag bit', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair variant: color flag bit', ['00:00:09:24', True], [164, 9, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['01:02:03;04', False], [68, 3, 2, 1]), ('normal control', ['10:00:10;09', False], [73, 16, 0, 16]), ('normal control', ['10:10:00;29', False], [105, 0, 16, 16]), ('normal control', ['10:10:00;19', False], [89, 0, 16, 16])], [('regression: color flag bit', ['00:00:00:00', True], [128, 0, 0, 0]), ('regression variant: color flag bit', ['10:59:10;24', True], [228, 16, 89, 16]), ('partial repair probe: color flag bit', ['19:07:45:24', True], [164, 69, 7, 25]), ('partial repair variant: color flag bit', ['01:59:59:10', True], [144, 89, 89, 1]), ('boundary control', ['01:02:03;04', False], [68, 3, 2, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['23:10:09:01', False], [1, 9, 16, 35]), ('normal control', ['00:07:59;01', False], [65, 89, 7, 0]), ('normal control', ['01:00:10;19', False], [89, 16, 0, 1])], [('regression: color flag bit', ['19:00:09;19', True], [217, 9, 0, 25]), ('regression variant: color flag bit', ['19:07:45:24', True], [164, 69, 7, 25]), ('partial repair probe: color flag bit', ['01:00:09:10', True], [144, 9, 0, 1]), ('partial repair variant: color flag bit', ['00:00:09:01', True], [129, 9, 0, 0]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['23:10:45:09', False], [9, 69, 16, 35]), ('normal control', ['10:10:10;24', False], [100, 16, 16, 16]), ('normal control', ['00:07:00;00', False], [64, 0, 7, 0])], [('regression: color flag bit', ['01:59:10:24', True], [164, 16, 89, 1]), ('regression variant: color flag bit', ['01:00:59;19', True], [217, 89, 0, 1]), ('partial repair probe: color flag bit', ['19:10:10:24', True], [164, 16, 16, 25]), ('partial repair variant: color flag bit', ['19:59:09:00', True], [128, 9, 89, 25]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['01:02:03;04', False], [68, 3, 2, 1]), ('normal control', ['19:59:45;09', False], [73, 69, 89, 25]), ('normal control', ['01:59:59;24', False], [100, 89, 89, 1]), ('normal control', ['10:10:10;19', False], [89, 16, 16, 16])]]\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-ltc-bcd-packing-color-flag-bit","generated_at":"2026-09-29T14:49:37.291804+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 color flag is written into the drop-frame bit.","sha256":"52c3900160de5f0bbd54ce231c576fc2f5902924286bbe2f6062a0ebed78fa3e","title":"Linear timecode BCD field packing: color flag bit · 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":41.551,"exit_code":1,"observations":[{"actual":[233,89,89,35],"check":"regression: color flag bit","expected":[233,89,89,35],"passed":true},{"actual":[41,9,7,0],"check":"regression variant: color flag bit","expected":[169,9,7,0],"passed":false},{"actual":[36,16,89,1],"check":"partial repair probe: color flag bit","expected":[164,16,89,1],"passed":false},{"actual":[0,9,16,0],"check":"partial repair variant: color flag bit","expected":[128,9,16,0],"passed":false},{"actual":[0,0,0,0],"check":"boundary control","expected":[0,0,0,0],"passed":true},{"actual":[16,16,16,16],"check":"boundary control","expected":[16,16,16,16],"passed":true},{"actual":[68,3,2,1],"check":"normal control","expected":[68,3,2,1],"passed":true},{"actual":[100,9,16,16],"check":"normal control","expected":[100,9,16,16],"passed":true},{"actual":[1,89,7,16],"check":"normal control","expected":[1,89,7,16],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: color flag bit\", \"actual\": [233, 89, 89, 35], \"expected\": [233, 89, 89, 35], \"passed\": true}, {\"check\": \"regression variant: color flag bit\", \"actual\": [41, 9, 7, 0], \"expected\": [169, 9, 7, 0], \"passed\": false}, {\"check\": \"partial repair probe: color flag bit\", \"actual\": [36, 16, 89, 1], \"expected\": [164, 16, 89, 1], \"passed\": false}, {\"check\": \"partial repair variant: color flag bit\", \"actual\": [0, 9, 16, 0], \"expected\": [128, 9, 16, 0], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [0, 0, 0, 0], \"expected\": [0, 0, 0, 0], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [16, 16, 16, 16], \"expected\": [16, 16, 16, 16], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [68, 3, 2, 1], \"expected\": [68, 3, 2, 1], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [100, 9, 16, 16], \"expected\": [100, 9, 16, 16], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, 89, 7, 16], \"expected\": [1, 89, 7, 16], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.646,"exit_code":1,"observations":[{"actual":[105,89,89,35],"check":"regression: color flag bit","expected":[233,89,89,35],"passed":false},{"actual":[105,9,7,0],"check":"regression variant: color flag bit","expected":[169,9,7,0],"passed":false},{"actual":[100,16,89,1],"check":"partial repair probe: color flag bit","expected":[164,16,89,1],"passed":false},{"actual":[64,9,16,0],"check":"partial repair variant: color flag bit","expected":[128,9,16,0],"passed":false},{"actual":[0,0,0,0],"check":"boundary control","expected":[0,0,0,0],"passed":true},{"actual":[16,16,16,16],"check":"boundary control","expected":[16,16,16,16],"passed":true},{"actual":[68,3,2,1],"check":"normal control","expected":[68,3,2,1],"passed":true},{"actual":[100,9,16,16],"check":"normal control","expected":[100,9,16,16],"passed":true},{"actual":[1,89,7,16],"check":"normal control","expected":[1,89,7,16],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: color flag bit\", \"actual\": [105, 89, 89, 35], \"expected\": [233, 89, 89, 35], \"passed\": false}, {\"check\": \"regression variant: color flag bit\", \"actual\": [105, 9, 7, 0], \"expected\": [169, 9, 7, 0], \"passed\": false}, {\"check\": \"partial repair probe: color flag bit\", \"actual\": [100, 16, 89, 1], \"expected\": [164, 16, 89, 1], \"passed\": false}, {\"check\": \"partial repair variant: color flag bit\", \"actual\": [64, 9, 16, 0], \"expected\": [128, 9, 16, 0], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [0, 0, 0, 0], \"expected\": [0, 0, 0, 0], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [16, 16, 16, 16], \"expected\": [16, 16, 16, 16], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [68, 3, 2, 1], \"expected\": [68, 3, 2, 1], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [100, 9, 16, 16], \"expected\": [100, 9, 16, 16], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, 89, 7, 16], \"expected\": [1, 89, 7, 16], \"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."}}