{"abstract":"Mixed frames are reported at the wrong video frames.","category":"Broadcast timecode arithmetic","checks":9,"contract":"Fields carry film frames in A2 B3 C2 D3 cadence; film frame 0 has cadence position phase and starts at field 0. Video frame v consists of fields 2v and 2v+1. For order \"upper\" field 2v is the top field; for \"lower\" field 2v is the bottom field. Return [film frame in top field, film frame in bottom field, \"clean\" or \"mixed\"]; a negative v returns None.","evaluation_group":"w2-broadcast-timecode-arithmetic-reverse-telecine","failed_approach":"The 3-2-3-2 table describes the opposite cadence.","family":"w2-broadcast-timecode-arithmetic-reverse-telecine-field-to-frame-table","id":"FA-78566","implementations":{"attempt":{"sha256":"92c12b0ca1dd1cd6a27fd024b43ccf0413ed185845d40dc528fad60a4ff854cb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(v, phase, order):\n    if v<0:\n        return None\n    base=[0,2,5,7][phase]\n    def film(f):\n        g,w=divmod(f+base,10)\n        return 4*g+[0,0,0,1,1,2,2,3,3,3][w]-phase\n    top,bottom=film(2*v),film(2*v+1)\n    if order=='lower':\n        top,bottom=bottom,top\n    return [top,bottom,'clean' if top==bottom else 'mixed']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: field to frame table', [30, 3, 'lower'], [24, 24, 'clean']), ('regression variant: field to frame table', [11, 2, 'upper'], [9, 9, 'clean']), ('partial repair probe: field to frame table', [15, 1, 'upper'], [12, 12, 'clean']), ('partial repair variant: field to frame table', [6, 0, 'upper'], [5, 5, 'clean']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('normal control', [2, 0, 'upper'], [1, 2, 'mixed']), ('normal control', [16, 3, 'upper'], [12, 13, 'mixed']), ('normal control', [10, 2, 'upper'], [8, 8, 'clean'])], [('regression: field to frame table', [23, 0, 'lower'], [19, 18, 'mixed']), ('regression variant: field to frame table', [6, 2, 'upper'], [5, 5, 'clean']), ('partial repair probe: field to frame table', [1, 0, 'upper'], [1, 1, 'clean']), ('partial repair variant: field to frame table', [2, 3, 'lower'], [2, 1, 'mixed']), ('boundary control', [2, 0, 'upper'], [1, 2, 'mixed']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('normal control', [0, 0, 'lower'], [0, 0, 'clean']), ('normal control', [-3, 2, 'lower'], None), ('normal control', [28, 1, 'upper'], [22, 22, 'clean'])], [('regression: field to frame table', [17, 1, 'upper'], [13, 14, 'mixed']), ('regression variant: field to frame table', [13, 0, 'lower'], [11, 10, 'mixed']), ('partial repair probe: field to frame table', [28, 2, 'lower'], [23, 22, 'mixed']), ('partial repair variant: field to frame table', [16, 0, 'upper'], [13, 13, 'clean']), ('boundary control', [2, 0, 'lower'], [2, 1, 'mixed']), ('boundary control', [2, 0, 'upper'], [1, 2, 'mixed']), ('normal control', [-4, 3, 'upper'], None), ('normal control', [19, 1, 'lower'], [15, 15, 'clean']), ('normal control', [17, 2, 'upper'], [13, 14, 'mixed'])], [('regression: field to frame table', [12, 1, 'upper'], [9, 10, 'mixed']), ('regression variant: field to frame table', [21, 2, 'lower'], [17, 17, 'clean']), ('partial repair probe: field to frame table', [22, 3, 'upper'], [17, 18, 'mixed']), ('partial repair variant: field to frame table', [21, 0, 'lower'], [17, 17, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('boundary control', [2, 0, 'lower'], [2, 1, 'mixed']), ('normal control', [-5, 0, 'lower'], None), ('normal control', [4, 0, 'upper'], [3, 3, 'clean']), ('normal control', [9, 3, 'lower'], [7, 7, 'clean'])], [('regression: field to frame table', [16, 2, 'lower'], [13, 13, 'clean']), ('regression variant: field to frame table', [5, 3, 'upper'], [4, 4, 'clean']), ('partial repair probe: field to frame table', [11, 0, 'upper'], [9, 9, 'clean']), ('partial repair variant: field to frame table', [17, 3, 'upper'], [13, 14, 'mixed']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('normal control', [-5, 1, 'lower'], None), ('normal control', [21, 3, 'upper'], [16, 17, 'mixed']), ('normal control', [22, 2, 'lower'], [18, 17, 'mixed'])]]\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":"8119219f3348a90753f098f7e34d1d8a59439b7e6b31a26c6e0af43b68e6111d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(v, phase, order):\n    if v<0:\n        return None\n    base=[0,2,5,7][phase]\n    def film(f):\n        g,w=divmod(f+base,10)\n        return 4*g+[0,0,1,1,1,2,2,2,3,3][w]-phase\n    top,bottom=film(2*v),film(2*v+1)\n    if order=='lower':\n        top,bottom=bottom,top\n    return [top,bottom,'clean' if top==bottom else 'mixed']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: field to frame table', [30, 3, 'lower'], [24, 24, 'clean']), ('regression variant: field to frame table', [11, 2, 'upper'], [9, 9, 'clean']), ('partial repair probe: field to frame table', [15, 1, 'upper'], [12, 12, 'clean']), ('partial repair variant: field to frame table', [6, 0, 'upper'], [5, 5, 'clean']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('normal control', [2, 0, 'upper'], [1, 2, 'mixed']), ('normal control', [16, 3, 'upper'], [12, 13, 'mixed']), ('normal control', [10, 2, 'upper'], [8, 8, 'clean'])], [('regression: field to frame table', [23, 0, 'lower'], [19, 18, 'mixed']), ('regression variant: field to frame table', [6, 2, 'upper'], [5, 5, 'clean']), ('partial repair probe: field to frame table', [1, 0, 'upper'], [1, 1, 'clean']), ('partial repair variant: field to frame table', [2, 3, 'lower'], [2, 1, 'mixed']), ('boundary control', [2, 0, 'upper'], [1, 2, 'mixed']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('normal control', [0, 0, 'lower'], [0, 0, 'clean']), ('normal control', [-3, 2, 'lower'], None), ('normal control', [28, 1, 'upper'], [22, 22, 'clean'])], [('regression: field to frame table', [17, 1, 'upper'], [13, 14, 'mixed']), ('regression variant: field to frame table', [13, 0, 'lower'], [11, 10, 'mixed']), ('partial repair probe: field to frame table', [28, 2, 'lower'], [23, 22, 'mixed']), ('partial repair variant: field to frame table', [16, 0, 'upper'], [13, 13, 'clean']), ('boundary control', [2, 0, 'lower'], [2, 1, 'mixed']), ('boundary control', [2, 0, 'upper'], [1, 2, 'mixed']), ('normal control', [-4, 3, 'upper'], None), ('normal control', [19, 1, 'lower'], [15, 15, 'clean']), ('normal control', [17, 2, 'upper'], [13, 14, 'mixed'])], [('regression: field to frame table', [12, 1, 'upper'], [9, 10, 'mixed']), ('regression variant: field to frame table', [21, 2, 'lower'], [17, 17, 'clean']), ('partial repair probe: field to frame table', [22, 3, 'upper'], [17, 18, 'mixed']), ('partial repair variant: field to frame table', [21, 0, 'lower'], [17, 17, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('boundary control', [2, 0, 'lower'], [2, 1, 'mixed']), ('normal control', [-5, 0, 'lower'], None), ('normal control', [4, 0, 'upper'], [3, 3, 'clean']), ('normal control', [9, 3, 'lower'], [7, 7, 'clean'])], [('regression: field to frame table', [16, 2, 'lower'], [13, 13, 'clean']), ('regression variant: field to frame table', [5, 3, 'upper'], [4, 4, 'clean']), ('partial repair probe: field to frame table', [11, 0, 'upper'], [9, 9, 'clean']), ('partial repair variant: field to frame table', [17, 3, 'upper'], [13, 14, 'mixed']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('normal control', [-5, 1, 'lower'], None), ('normal control', [21, 3, 'upper'], [16, 17, 'mixed']), ('normal control', [22, 2, 'lower'], [18, 17, 'mixed'])]]\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":"9920a63935b3dbe2c26fb20663215ab2979749a53f43bf647c293da66bd3db5b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(v, phase, order):\n    if v<0:\n        return None\n    base=[0,2,5,7][phase]\n    def film(f):\n        g,w=divmod(f+base,10)\n        return 4*g+[0,0,1,1,1,2,2,3,3,3][w]-phase\n    top,bottom=film(2*v),film(2*v+1)\n    if order=='lower':\n        top,bottom=bottom,top\n    return [top,bottom,'clean' if top==bottom else 'mixed']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: field to frame table', [30, 3, 'lower'], [24, 24, 'clean']), ('regression variant: field to frame table', [11, 2, 'upper'], [9, 9, 'clean']), ('partial repair probe: field to frame table', [15, 1, 'upper'], [12, 12, 'clean']), ('partial repair variant: field to frame table', [6, 0, 'upper'], [5, 5, 'clean']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('normal control', [2, 0, 'upper'], [1, 2, 'mixed']), ('normal control', [16, 3, 'upper'], [12, 13, 'mixed']), ('normal control', [10, 2, 'upper'], [8, 8, 'clean'])], [('regression: field to frame table', [23, 0, 'lower'], [19, 18, 'mixed']), ('regression variant: field to frame table', [6, 2, 'upper'], [5, 5, 'clean']), ('partial repair probe: field to frame table', [1, 0, 'upper'], [1, 1, 'clean']), ('partial repair variant: field to frame table', [2, 3, 'lower'], [2, 1, 'mixed']), ('boundary control', [2, 0, 'upper'], [1, 2, 'mixed']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('normal control', [0, 0, 'lower'], [0, 0, 'clean']), ('normal control', [-3, 2, 'lower'], None), ('normal control', [28, 1, 'upper'], [22, 22, 'clean'])], [('regression: field to frame table', [17, 1, 'upper'], [13, 14, 'mixed']), ('regression variant: field to frame table', [13, 0, 'lower'], [11, 10, 'mixed']), ('partial repair probe: field to frame table', [28, 2, 'lower'], [23, 22, 'mixed']), ('partial repair variant: field to frame table', [16, 0, 'upper'], [13, 13, 'clean']), ('boundary control', [2, 0, 'lower'], [2, 1, 'mixed']), ('boundary control', [2, 0, 'upper'], [1, 2, 'mixed']), ('normal control', [-4, 3, 'upper'], None), ('normal control', [19, 1, 'lower'], [15, 15, 'clean']), ('normal control', [17, 2, 'upper'], [13, 14, 'mixed'])], [('regression: field to frame table', [12, 1, 'upper'], [9, 10, 'mixed']), ('regression variant: field to frame table', [21, 2, 'lower'], [17, 17, 'clean']), ('partial repair probe: field to frame table', [22, 3, 'upper'], [17, 18, 'mixed']), ('partial repair variant: field to frame table', [21, 0, 'lower'], [17, 17, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('boundary control', [2, 0, 'lower'], [2, 1, 'mixed']), ('normal control', [-5, 0, 'lower'], None), ('normal control', [4, 0, 'upper'], [3, 3, 'clean']), ('normal control', [9, 3, 'lower'], [7, 7, 'clean'])], [('regression: field to frame table', [16, 2, 'lower'], [13, 13, 'clean']), ('regression variant: field to frame table', [5, 3, 'upper'], [4, 4, 'clean']), ('partial repair probe: field to frame table', [11, 0, 'upper'], [9, 9, 'clean']), ('partial repair variant: field to frame table', [17, 3, 'upper'], [13, 14, 'mixed']), ('boundary control', [0, 0, 'upper'], [0, 0, 'clean']), ('boundary control', [4, 3, 'lower'], [3, 3, 'clean']), ('normal control', [-5, 1, 'lower'], None), ('normal control', [21, 3, 'upper'], [16, 17, 'mixed']), ('normal control', [22, 2, 'lower'], [18, 17, 'mixed'])]]\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-reverse-telecine-field-to-frame-table","generated_at":"2026-09-29T14:49:36.603858+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":"Use the 2-3-2-3 field table.","root_cause":"The field-to-film table gives C three fields and D two.","sha256":"f70fdce398d32d10d884c738dccbbbf024ed06ea0460303e759918fe8fe63f4e","title":"Reverse telecine field attribution: field to frame table · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.445,"exit_code":1,"observations":[{"actual":[24,24,"clean"],"check":"regression: field to frame table","expected":[24,24,"clean"],"passed":true},{"actual":[9,9,"clean"],"check":"regression variant: field to frame table","expected":[9,9,"clean"],"passed":true},{"actual":[11,12,"mixed"],"check":"partial repair probe: field to frame table","expected":[12,12,"clean"],"passed":false},{"actual":[4,5,"mixed"],"check":"partial repair variant: field to frame table","expected":[5,5,"clean"],"passed":false},{"actual":[0,0,"clean"],"check":"boundary control","expected":[0,0,"clean"],"passed":true},{"actual":[3,3,"clean"],"check":"boundary control","expected":[3,3,"clean"],"passed":true},{"actual":[1,2,"mixed"],"check":"normal control","expected":[1,2,"mixed"],"passed":true},{"actual":[12,13,"mixed"],"check":"normal control","expected":[12,13,"mixed"],"passed":true},{"actual":[8,8,"clean"],"check":"normal control","expected":[8,8,"clean"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: field to frame table\", \"actual\": [24, 24, \"clean\"], \"expected\": [24, 24, \"clean\"], \"passed\": true}, {\"check\": \"regression variant: field to frame table\", \"actual\": [9, 9, \"clean\"], \"expected\": [9, 9, \"clean\"], \"passed\": true}, {\"check\": \"partial repair probe: field to frame table\", \"actual\": [11, 12, \"mixed\"], \"expected\": [12, 12, \"clean\"], \"passed\": false}, {\"check\": \"partial repair variant: field to frame table\", \"actual\": [4, 5, \"mixed\"], \"expected\": [5, 5, \"clean\"], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [0, 0, \"clean\"], \"expected\": [0, 0, \"clean\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [3, 3, \"clean\"], \"expected\": [3, 3, \"clean\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, 2, \"mixed\"], \"expected\": [1, 2, \"mixed\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [12, 13, \"mixed\"], \"expected\": [12, 13, \"mixed\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [8, 8, \"clean\"], \"expected\": [8, 8, \"clean\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.015,"exit_code":1,"observations":[{"actual":[24,23,"mixed"],"check":"regression: field to frame table","expected":[24,24,"clean"],"passed":false},{"actual":[8,9,"mixed"],"check":"regression variant: field to frame table","expected":[9,9,"clean"],"passed":false},{"actual":[12,12,"clean"],"check":"partial repair probe: field to frame table","expected":[12,12,"clean"],"passed":true},{"actual":[5,5,"clean"],"check":"partial repair variant: field to frame table","expected":[5,5,"clean"],"passed":true},{"actual":[0,0,"clean"],"check":"boundary control","expected":[0,0,"clean"],"passed":true},{"actual":[3,3,"clean"],"check":"boundary control","expected":[3,3,"clean"],"passed":true},{"actual":[1,2,"mixed"],"check":"normal control","expected":[1,2,"mixed"],"passed":true},{"actual":[12,13,"mixed"],"check":"normal control","expected":[12,13,"mixed"],"passed":true},{"actual":[8,8,"clean"],"check":"normal control","expected":[8,8,"clean"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: field to frame table\", \"actual\": [24, 23, \"mixed\"], \"expected\": [24, 24, \"clean\"], \"passed\": false}, {\"check\": \"regression variant: field to frame table\", \"actual\": [8, 9, \"mixed\"], \"expected\": [9, 9, \"clean\"], \"passed\": false}, {\"check\": \"partial repair probe: field to frame table\", \"actual\": [12, 12, \"clean\"], \"expected\": [12, 12, \"clean\"], \"passed\": true}, {\"check\": \"partial repair variant: field to frame table\", \"actual\": [5, 5, \"clean\"], \"expected\": [5, 5, \"clean\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [0, 0, \"clean\"], \"expected\": [0, 0, \"clean\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [3, 3, \"clean\"], \"expected\": [3, 3, \"clean\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, 2, \"mixed\"], \"expected\": [1, 2, \"mixed\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [12, 13, \"mixed\"], \"expected\": [12, 13, \"mixed\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [8, 8, \"clean\"], \"expected\": [8, 8, \"clean\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.053,"exit_code":0,"observations":[{"actual":[24,24,"clean"],"check":"regression: field to frame table","expected":[24,24,"clean"],"passed":true},{"actual":[9,9,"clean"],"check":"regression variant: field to frame table","expected":[9,9,"clean"],"passed":true},{"actual":[12,12,"clean"],"check":"partial repair probe: field to frame table","expected":[12,12,"clean"],"passed":true},{"actual":[5,5,"clean"],"check":"partial repair variant: field to frame table","expected":[5,5,"clean"],"passed":true},{"actual":[0,0,"clean"],"check":"boundary control","expected":[0,0,"clean"],"passed":true},{"actual":[3,3,"clean"],"check":"boundary control","expected":[3,3,"clean"],"passed":true},{"actual":[1,2,"mixed"],"check":"normal control","expected":[1,2,"mixed"],"passed":true},{"actual":[12,13,"mixed"],"check":"normal control","expected":[12,13,"mixed"],"passed":true},{"actual":[8,8,"clean"],"check":"normal control","expected":[8,8,"clean"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: field to frame table\", \"actual\": [24, 24, \"clean\"], \"expected\": [24, 24, \"clean\"], \"passed\": true}, {\"check\": \"regression variant: field to frame table\", \"actual\": [9, 9, \"clean\"], \"expected\": [9, 9, \"clean\"], \"passed\": true}, {\"check\": \"partial repair probe: field to frame table\", \"actual\": [12, 12, \"clean\"], \"expected\": [12, 12, \"clean\"], \"passed\": true}, {\"check\": \"partial repair variant: field to frame table\", \"actual\": [5, 5, \"clean\"], \"expected\": [5, 5, \"clean\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [0, 0, \"clean\"], \"expected\": [0, 0, \"clean\"], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [3, 3, \"clean\"], \"expected\": [3, 3, \"clean\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [1, 2, \"mixed\"], \"expected\": [1, 2, \"mixed\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [12, 13, \"mixed\"], \"expected\": [12, 13, \"mixed\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [8, 8, \"clean\"], \"expected\": [8, 8, \"clean\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}