{"abstract":"Decoders read 10:00:00:00 as a scrambled time.","category":"Broadcast timecode arithmetic","checks":8,"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).","evaluation_group":"w2-broadcast-timecode-arithmetic-ltc-bcd-packing","failed_approach":"Swapping the nibbles puts the units digit in the tens position.","family":"w2-broadcast-timecode-arithmetic-ltc-bcd-packing-tens-digit-position","id":"FA-78616","implementations":{"attempt":{"sha256":"239b1944535b80422a4902ef38e1e7bb36b9406e2010169b3b1039e3162f4f62","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 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: tens digit position', ['23:59:59;29', True], [233, 89, 89, 35]), ('regression variant: tens digit position', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair probe: tens digit position', ['01:02:03;04', False], [68, 3, 2, 1]), ('partial repair variant: tens digit position', ['10:59:10;24', True], [228, 16, 89, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0])], [('regression: tens digit position', ['10:10:10:10', False], [16, 16, 16, 16]), ('regression variant: tens digit position', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair probe: tens digit position', ['01:07:10:29', True], [169, 16, 7, 1]), ('partial repair variant: tens digit position', ['19:07:45:24', True], [164, 69, 7, 25]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0])], [('regression: tens digit position', ['01:07:10:29', True], [169, 16, 7, 1]), ('regression variant: tens digit position', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair probe: tens digit position', ['10:10:09;24', False], [100, 9, 16, 16]), ('partial repair variant: tens digit position', ['01:00:59;19', True], [217, 89, 0, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0])], [('regression: tens digit position', ['10:10:09;24', False], [100, 9, 16, 16]), ('regression variant: tens digit position', ['10:59:10;24', True], [228, 16, 89, 16]), ('partial repair probe: tens digit position', ['19:00:09;19', True], [217, 9, 0, 25]), ('partial repair variant: tens digit position', ['10:07:59:01', False], [1, 89, 7, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0])], [('regression: tens digit position', ['19:00:09;19', True], [217, 9, 0, 25]), ('regression variant: tens digit position', ['19:07:45:24', True], [164, 69, 7, 25]), ('partial repair probe: tens digit position', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair variant: tens digit position', ['23:59:59;01', True], [193, 89, 89, 35]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 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":"1673a4ebd78382aba7ac08b06e7c567f3242efd3016902b53019ffe3768cc4d1","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)<<3|v%10|flags\n    b0=bcd(f,(0x40 if drop else 0)|(0x80 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: tens digit position', ['23:59:59;29', True], [233, 89, 89, 35]), ('regression variant: tens digit position', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair probe: tens digit position', ['01:02:03;04', False], [68, 3, 2, 1]), ('partial repair variant: tens digit position', ['10:59:10;24', True], [228, 16, 89, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0])], [('regression: tens digit position', ['10:10:10:10', False], [16, 16, 16, 16]), ('regression variant: tens digit position', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair probe: tens digit position', ['01:07:10:29', True], [169, 16, 7, 1]), ('partial repair variant: tens digit position', ['19:07:45:24', True], [164, 69, 7, 25]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0])], [('regression: tens digit position', ['01:07:10:29', True], [169, 16, 7, 1]), ('regression variant: tens digit position', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair probe: tens digit position', ['10:10:09;24', False], [100, 9, 16, 16]), ('partial repair variant: tens digit position', ['01:00:59;19', True], [217, 89, 0, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0])], [('regression: tens digit position', ['10:10:09;24', False], [100, 9, 16, 16]), ('regression variant: tens digit position', ['10:59:10;24', True], [228, 16, 89, 16]), ('partial repair probe: tens digit position', ['19:00:09;19', True], [217, 9, 0, 25]), ('partial repair variant: tens digit position', ['10:07:59:01', False], [1, 89, 7, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0])], [('regression: tens digit position', ['19:00:09;19', True], [217, 9, 0, 25]), ('regression variant: tens digit position', ['19:07:45:24', True], [164, 69, 7, 25]), ('partial repair probe: tens digit position', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair variant: tens digit position', ['23:59:59;01', True], [193, 89, 89, 35]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 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"},"fixed":{"sha256":"c1bcea50a83d0fb6bb734dcea36a4e15cdbabb1adf039d16efd53839df0f3eca","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 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: tens digit position', ['23:59:59;29', True], [233, 89, 89, 35]), ('regression variant: tens digit position', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair probe: tens digit position', ['01:02:03;04', False], [68, 3, 2, 1]), ('partial repair variant: tens digit position', ['10:59:10;24', True], [228, 16, 89, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0])], [('regression: tens digit position', ['10:10:10:10', False], [16, 16, 16, 16]), ('regression variant: tens digit position', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair probe: tens digit position', ['01:07:10:29', True], [169, 16, 7, 1]), ('partial repair variant: tens digit position', ['19:07:45:24', True], [164, 69, 7, 25]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0])], [('regression: tens digit position', ['01:07:10:29', True], [169, 16, 7, 1]), ('regression variant: tens digit position', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair probe: tens digit position', ['10:10:09;24', False], [100, 9, 16, 16]), ('partial repair variant: tens digit position', ['01:00:59;19', True], [217, 89, 0, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0])], [('regression: tens digit position', ['10:10:09;24', False], [100, 9, 16, 16]), ('regression variant: tens digit position', ['10:59:10;24', True], [228, 16, 89, 16]), ('partial repair probe: tens digit position', ['19:00:09;19', True], [217, 9, 0, 25]), ('partial repair variant: tens digit position', ['10:07:59:01', False], [1, 89, 7, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0])], [('regression: tens digit position', ['19:00:09;19', True], [217, 9, 0, 25]), ('regression variant: tens digit position', ['19:07:45:24', True], [164, 69, 7, 25]), ('partial repair probe: tens digit position', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair variant: tens digit position', ['23:59:59;01', True], [193, 89, 89, 35]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:00:00;00', False], [64, 0, 0, 0]), ('normal control', ['00:00:00;00', True], [192, 0, 0, 0]), ('normal control', ['00:00:00:00', True], [128, 0, 0, 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-ltc-bcd-packing-tens-digit-position","generated_at":"2026-09-29T14:49:37.038215+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.","repair":"Place tens from bit 4 and units in bits 0-3.","root_cause":"The tens digit is shifted into bit 3, overlapping the units nibble.","sha256":"860d6306334b8d79e238bb8d3e3871f0b23f4e7a68f561a078c9b138b1757916","title":"Linear timecode BCD field packing: tens digit position · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":66.398,"exit_code":1,"observations":[{"actual":[210,149,149,50],"check":"regression: tens digit position","expected":[233,89,89,35],"passed":false},{"actual":[194,1,149,16],"check":"regression variant: tens digit position","expected":[164,16,89,1],"passed":false},{"actual":[64,48,32,16],"check":"partial repair probe: tens digit position","expected":[68,3,2,1],"passed":false},{"actual":[194,1,149,1],"check":"partial repair variant: tens digit position","expected":[228,16,89,16],"passed":false},{"actual":[0,0,0,0],"check":"boundary control","expected":[0,0,0,0],"passed":true},{"actual":[64,0,0,0],"check":"normal control","expected":[64,0,0,0],"passed":true},{"actual":[192,0,0,0],"check":"normal control","expected":[192,0,0,0],"passed":true},{"actual":[128,0,0,0],"check":"normal control","expected":[128,0,0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: tens digit position\", \"actual\": [210, 149, 149, 50], \"expected\": [233, 89, 89, 35], \"passed\": false}, {\"check\": \"regression variant: tens digit position\", \"actual\": [194, 1, 149, 16], \"expected\": [164, 16, 89, 1], \"passed\": false}, {\"check\": \"partial repair probe: tens digit position\", \"actual\": [64, 48, 32, 16], \"expected\": [68, 3, 2, 1], \"passed\": false}, {\"check\": \"partial repair variant: tens digit position\", \"actual\": [194, 1, 149, 1], \"expected\": [228, 16, 89, 16], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [0, 0, 0, 0], \"expected\": [0, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [64, 0, 0, 0], \"expected\": [64, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [192, 0, 0, 0], \"expected\": [192, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [128, 0, 0, 0], \"expected\": [128, 0, 0, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.61,"exit_code":1,"observations":[{"actual":[217,41,41,19],"check":"regression: tens digit position","expected":[233,89,89,35],"passed":false},{"actual":[148,8,41,1],"check":"regression variant: tens digit position","expected":[164,16,89,1],"passed":false},{"actual":[68,3,2,1],"check":"partial repair probe: tens digit position","expected":[68,3,2,1],"passed":true},{"actual":[212,8,41,8],"check":"partial repair variant: tens digit position","expected":[228,16,89,16],"passed":false},{"actual":[0,0,0,0],"check":"boundary control","expected":[0,0,0,0],"passed":true},{"actual":[64,0,0,0],"check":"normal control","expected":[64,0,0,0],"passed":true},{"actual":[192,0,0,0],"check":"normal control","expected":[192,0,0,0],"passed":true},{"actual":[128,0,0,0],"check":"normal control","expected":[128,0,0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: tens digit position\", \"actual\": [217, 41, 41, 19], \"expected\": [233, 89, 89, 35], \"passed\": false}, {\"check\": \"regression variant: tens digit position\", \"actual\": [148, 8, 41, 1], \"expected\": [164, 16, 89, 1], \"passed\": false}, {\"check\": \"partial repair probe: tens digit position\", \"actual\": [68, 3, 2, 1], \"expected\": [68, 3, 2, 1], \"passed\": true}, {\"check\": \"partial repair variant: tens digit position\", \"actual\": [212, 8, 41, 8], \"expected\": [228, 16, 89, 16], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [0, 0, 0, 0], \"expected\": [0, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [64, 0, 0, 0], \"expected\": [64, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [192, 0, 0, 0], \"expected\": [192, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [128, 0, 0, 0], \"expected\": [128, 0, 0, 0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":53.198,"exit_code":0,"observations":[{"actual":[233,89,89,35],"check":"regression: tens digit position","expected":[233,89,89,35],"passed":true},{"actual":[164,16,89,1],"check":"regression variant: tens digit position","expected":[164,16,89,1],"passed":true},{"actual":[68,3,2,1],"check":"partial repair probe: tens digit position","expected":[68,3,2,1],"passed":true},{"actual":[228,16,89,16],"check":"partial repair variant: tens digit position","expected":[228,16,89,16],"passed":true},{"actual":[0,0,0,0],"check":"boundary control","expected":[0,0,0,0],"passed":true},{"actual":[64,0,0,0],"check":"normal control","expected":[64,0,0,0],"passed":true},{"actual":[192,0,0,0],"check":"normal control","expected":[192,0,0,0],"passed":true},{"actual":[128,0,0,0],"check":"normal control","expected":[128,0,0,0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: tens digit position\", \"actual\": [233, 89, 89, 35], \"expected\": [233, 89, 89, 35], \"passed\": true}, {\"check\": \"regression variant: tens digit position\", \"actual\": [164, 16, 89, 1], \"expected\": [164, 16, 89, 1], \"passed\": true}, {\"check\": \"partial repair probe: tens digit position\", \"actual\": [68, 3, 2, 1], \"expected\": [68, 3, 2, 1], \"passed\": true}, {\"check\": \"partial repair variant: tens digit position\", \"actual\": [228, 16, 89, 16], \"expected\": [228, 16, 89, 16], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [0, 0, 0, 0], \"expected\": [0, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [64, 0, 0, 0], \"expected\": [64, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [192, 0, 0, 0], \"expected\": [192, 0, 0, 0], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [128, 0, 0, 0], \"expected\": [128, 0, 0, 0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}