{"abstract":"The second field is taken from the previous video frame.","category":"Broadcast timecode arithmetic","checks":7,"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":"Field 2v+2 belongs to the next video frame.","family":"w2-broadcast-timecode-arithmetic-reverse-telecine-second-field-index","id":"FA-78571","implementations":{"attempt":{"sha256":"800c3a2e1d91d35f11f51c33f040204e815efd25142260e23613b10b81ddbc18","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+2)\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: second field index', [0, 0, 'upper'], [0, 0, 'clean']), ('regression variant: second field index', [16, 3, 'upper'], [12, 13, 'mixed']), ('partial repair probe: second field index', [10, 2, 'upper'], [8, 8, 'clean']), ('partial repair variant: second field index', [4, 1, 'upper'], [3, 3, 'clean']), ('normal control', [-3, 2, 'lower'], None), ('normal control', [-5, 0, 'lower'], None), ('normal control', [-4, 2, 'lower'], None)], [('regression: second field index', [2, 0, 'upper'], [1, 2, 'mixed']), ('regression variant: second field index', [10, 2, 'upper'], [8, 8, 'clean']), ('partial repair probe: second field index', [24, 0, 'upper'], [19, 19, 'clean']), ('partial repair variant: second field index', [19, 1, 'lower'], [15, 15, 'clean']), ('normal control', [-5, 3, 'lower'], None), ('normal control', [-3, 0, 'lower'], None), ('normal control', [-1, 2, 'upper'], None)], [('regression: second field index', [2, 0, 'lower'], [2, 1, 'mixed']), ('regression variant: second field index', [30, 3, 'lower'], [24, 24, 'clean']), ('partial repair probe: second field index', [0, 0, 'lower'], [0, 0, 'clean']), ('partial repair variant: second field index', [25, 2, 'lower'], [20, 20, 'clean']), ('normal control', [-3, 3, 'upper'], None), ('normal control', [-2, 2, 'upper'], None), ('normal control', [-4, 3, 'lower'], None)], [('regression: second field index', [0, 1, 'upper'], [0, 0, 'clean']), ('regression variant: second field index', [0, 0, 'lower'], [0, 0, 'clean']), ('partial repair probe: second field index', [20, 2, 'upper'], [16, 16, 'clean']), ('partial repair variant: second field index', [19, 2, 'upper'], [15, 15, 'clean']), ('normal control', [-2, 2, 'lower'], None), ('normal control', [-5, 1, 'upper'], None), ('normal control', [-2, 3, 'lower'], None)], [('regression: second field index', [4, 3, 'lower'], [3, 3, 'clean']), ('regression variant: second field index', [12, 3, 'lower'], [10, 9, 'mixed']), ('partial repair probe: second field index', [29, 1, 'lower'], [23, 23, 'clean']), ('partial repair variant: second field index', [4, 0, 'upper'], [3, 3, 'clean']), ('normal control', [-3, 3, 'lower'], None), ('normal control', [-1, 0, 'upper'], None), ('normal control', [-3, 0, 'upper'], None)]]\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":"d6f6dea6274d8ab71c478b16b7d75bfdcda3bbd37ef327b6fea31e1dcb66db5c","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: second field index', [0, 0, 'upper'], [0, 0, 'clean']), ('regression variant: second field index', [16, 3, 'upper'], [12, 13, 'mixed']), ('partial repair probe: second field index', [10, 2, 'upper'], [8, 8, 'clean']), ('partial repair variant: second field index', [4, 1, 'upper'], [3, 3, 'clean']), ('normal control', [-3, 2, 'lower'], None), ('normal control', [-5, 0, 'lower'], None), ('normal control', [-4, 2, 'lower'], None)], [('regression: second field index', [2, 0, 'upper'], [1, 2, 'mixed']), ('regression variant: second field index', [10, 2, 'upper'], [8, 8, 'clean']), ('partial repair probe: second field index', [24, 0, 'upper'], [19, 19, 'clean']), ('partial repair variant: second field index', [19, 1, 'lower'], [15, 15, 'clean']), ('normal control', [-5, 3, 'lower'], None), ('normal control', [-3, 0, 'lower'], None), ('normal control', [-1, 2, 'upper'], None)], [('regression: second field index', [2, 0, 'lower'], [2, 1, 'mixed']), ('regression variant: second field index', [30, 3, 'lower'], [24, 24, 'clean']), ('partial repair probe: second field index', [0, 0, 'lower'], [0, 0, 'clean']), ('partial repair variant: second field index', [25, 2, 'lower'], [20, 20, 'clean']), ('normal control', [-3, 3, 'upper'], None), ('normal control', [-2, 2, 'upper'], None), ('normal control', [-4, 3, 'lower'], None)], [('regression: second field index', [0, 1, 'upper'], [0, 0, 'clean']), ('regression variant: second field index', [0, 0, 'lower'], [0, 0, 'clean']), ('partial repair probe: second field index', [20, 2, 'upper'], [16, 16, 'clean']), ('partial repair variant: second field index', [19, 2, 'upper'], [15, 15, 'clean']), ('normal control', [-2, 2, 'lower'], None), ('normal control', [-5, 1, 'upper'], None), ('normal control', [-2, 3, 'lower'], None)], [('regression: second field index', [4, 3, 'lower'], [3, 3, 'clean']), ('regression variant: second field index', [12, 3, 'lower'], [10, 9, 'mixed']), ('partial repair probe: second field index', [29, 1, 'lower'], [23, 23, 'clean']), ('partial repair variant: second field index', [4, 0, 'upper'], [3, 3, 'clean']), ('normal control', [-3, 3, 'lower'], None), ('normal control', [-1, 0, 'upper'], None), ('normal control', [-3, 0, 'upper'], None)]]\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":"7d748ce29f45b5c6b762f84ec90391d11f3e8b905740a18835ab4504c5481882","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: second field index', [0, 0, 'upper'], [0, 0, 'clean']), ('regression variant: second field index', [16, 3, 'upper'], [12, 13, 'mixed']), ('partial repair probe: second field index', [10, 2, 'upper'], [8, 8, 'clean']), ('partial repair variant: second field index', [4, 1, 'upper'], [3, 3, 'clean']), ('normal control', [-3, 2, 'lower'], None), ('normal control', [-5, 0, 'lower'], None), ('normal control', [-4, 2, 'lower'], None)], [('regression: second field index', [2, 0, 'upper'], [1, 2, 'mixed']), ('regression variant: second field index', [10, 2, 'upper'], [8, 8, 'clean']), ('partial repair probe: second field index', [24, 0, 'upper'], [19, 19, 'clean']), ('partial repair variant: second field index', [19, 1, 'lower'], [15, 15, 'clean']), ('normal control', [-5, 3, 'lower'], None), ('normal control', [-3, 0, 'lower'], None), ('normal control', [-1, 2, 'upper'], None)], [('regression: second field index', [2, 0, 'lower'], [2, 1, 'mixed']), ('regression variant: second field index', [30, 3, 'lower'], [24, 24, 'clean']), ('partial repair probe: second field index', [0, 0, 'lower'], [0, 0, 'clean']), ('partial repair variant: second field index', [25, 2, 'lower'], [20, 20, 'clean']), ('normal control', [-3, 3, 'upper'], None), ('normal control', [-2, 2, 'upper'], None), ('normal control', [-4, 3, 'lower'], None)], [('regression: second field index', [0, 1, 'upper'], [0, 0, 'clean']), ('regression variant: second field index', [0, 0, 'lower'], [0, 0, 'clean']), ('partial repair probe: second field index', [20, 2, 'upper'], [16, 16, 'clean']), ('partial repair variant: second field index', [19, 2, 'upper'], [15, 15, 'clean']), ('normal control', [-2, 2, 'lower'], None), ('normal control', [-5, 1, 'upper'], None), ('normal control', [-2, 3, 'lower'], None)], [('regression: second field index', [4, 3, 'lower'], [3, 3, 'clean']), ('regression variant: second field index', [12, 3, 'lower'], [10, 9, 'mixed']), ('partial repair probe: second field index', [29, 1, 'lower'], [23, 23, 'clean']), ('partial repair variant: second field index', [4, 0, 'upper'], [3, 3, 'clean']), ('normal control', [-3, 3, 'lower'], None), ('normal control', [-1, 0, 'upper'], None), ('normal control', [-3, 0, 'upper'], None)]]\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-second-field-index","generated_at":"2026-09-29T14:49:36.631741+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":"The second field of video frame v is 2v+1.","root_cause":"The second field index is 2v-1.","sha256":"23b3e85e726aa5d62e0a492db041c48a763dec11099c48678671c934cf096b85","title":"Reverse telecine field attribution: second field index · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.062,"exit_code":1,"observations":[{"actual":[0,1,"mixed"],"check":"regression: second field index","expected":[0,0,"clean"],"passed":false},{"actual":[12,13,"mixed"],"check":"regression variant: second field index","expected":[12,13,"mixed"],"passed":true},{"actual":[8,9,"mixed"],"check":"partial repair probe: second field index","expected":[8,8,"clean"],"passed":false},{"actual":[3,4,"mixed"],"check":"partial repair variant: second field index","expected":[3,3,"clean"],"passed":false},{"actual":null,"check":"normal control","expected":null,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: second field index\", \"actual\": [0, 1, \"mixed\"], \"expected\": [0, 0, \"clean\"], \"passed\": false}, {\"check\": \"regression variant: second field index\", \"actual\": [12, 13, \"mixed\"], \"expected\": [12, 13, \"mixed\"], \"passed\": true}, {\"check\": \"partial repair probe: second field index\", \"actual\": [8, 9, \"mixed\"], \"expected\": [8, 8, \"clean\"], \"passed\": false}, {\"check\": \"partial repair variant: second field index\", \"actual\": [3, 4, \"mixed\"], \"expected\": [3, 3, \"clean\"], \"passed\": false}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.681,"exit_code":1,"observations":[{"actual":[0,-1,"mixed"],"check":"regression: second field index","expected":[0,0,"clean"],"passed":false},{"actual":[12,12,"clean"],"check":"regression variant: second field index","expected":[12,13,"mixed"],"passed":false},{"actual":[8,7,"mixed"],"check":"partial repair probe: second field index","expected":[8,8,"clean"],"passed":false},{"actual":[3,2,"mixed"],"check":"partial repair variant: second field index","expected":[3,3,"clean"],"passed":false},{"actual":null,"check":"normal control","expected":null,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: second field index\", \"actual\": [0, -1, \"mixed\"], \"expected\": [0, 0, \"clean\"], \"passed\": false}, {\"check\": \"regression variant: second field index\", \"actual\": [12, 12, \"clean\"], \"expected\": [12, 13, \"mixed\"], \"passed\": false}, {\"check\": \"partial repair probe: second field index\", \"actual\": [8, 7, \"mixed\"], \"expected\": [8, 8, \"clean\"], \"passed\": false}, {\"check\": \"partial repair variant: second field index\", \"actual\": [3, 2, \"mixed\"], \"expected\": [3, 3, \"clean\"], \"passed\": false}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.246,"exit_code":0,"observations":[{"actual":[0,0,"clean"],"check":"regression: second field index","expected":[0,0,"clean"],"passed":true},{"actual":[12,13,"mixed"],"check":"regression variant: second field index","expected":[12,13,"mixed"],"passed":true},{"actual":[8,8,"clean"],"check":"partial repair probe: second field index","expected":[8,8,"clean"],"passed":true},{"actual":[3,3,"clean"],"check":"partial repair variant: second field index","expected":[3,3,"clean"],"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: second field index\", \"actual\": [0, 0, \"clean\"], \"expected\": [0, 0, \"clean\"], \"passed\": true}, {\"check\": \"regression variant: second field index\", \"actual\": [12, 13, \"mixed\"], \"expected\": [12, 13, \"mixed\"], \"passed\": true}, {\"check\": \"partial repair probe: second field index\", \"actual\": [8, 8, \"clean\"], \"expected\": [8, 8, \"clean\"], \"passed\": true}, {\"check\": \"partial repair variant: second field index\", \"actual\": [3, 3, \"clean\"], \"expected\": [3, 3, \"clean\"], \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}