{"abstract":"Frames starting on the second field of a video frame are reported as upper field first.","category":"Broadcast timecode arithmetic","checks":7,"contract":"Film frames follow the A2 B3 C2 D3 field cadence (10 fields per 4 film frames). phase is the cadence position (0=A..3=D) of film frame 0, which starts at video field 0. Negative n returns None. For film frame n return [video frame of its first field, \"upper\" for an even field index else \"lower\", number of fields].","evaluation_group":"w2-broadcast-timecode-arithmetic-pulldown-film-to-video","failed_approach":"Testing the parity of the video frame index instead of the field index reports alternating frames.","family":"w2-broadcast-timecode-arithmetic-pulldown-film-to-video-field-parity","id":"FA-78561","implementations":{"attempt":{"sha256":"39b0e5c946edafe059514317fed966b597ea31e43ae8f57c897c4c8c45da3629","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(n, phase):\n    if n<0:\n        return None\n    def sf(a):\n        return 10*(a//4)+[0,2,5,7][a%4]\n    a=n+phase\n    start=sf(a)-sf(phase)\n    count=[2,3,2,3][a%4]\n    return [start//2,'upper' if (start//2)%2==0 else 'lower',count]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: field parity', [0, 0], [0, 'upper', 2]), ('regression variant: field parity', [2, 3], [2, 'lower', 3]), ('partial repair probe: field parity', [34, 2], [42, 'lower', 2]), ('partial repair variant: field parity', [20, 1], [25, 'upper', 3]), ('normal control', [-3, 2], None), ('normal control', [-2, 3], None), ('normal control', [-2, 1], None)], [('regression: field parity', [1, 0], [1, 'upper', 3]), ('regression variant: field parity', [8, 0], [10, 'upper', 2]), ('partial repair probe: field parity', [34, 2], [42, 'lower', 2]), ('partial repair variant: field parity', [18, 3], [22, 'lower', 3]), ('normal control', [-5, 1], None), ('normal control', [-1, 1], None), ('normal control', [-4, 1], None)], [('regression: field parity', [3, 0], [3, 'lower', 3]), ('regression variant: field parity', [9, 1], [11, 'lower', 2]), ('partial repair probe: field parity', [10, 1], [12, 'lower', 3]), ('partial repair variant: field parity', [20, 0], [25, 'upper', 2]), ('normal control', [-2, 2], None), ('normal control', [-1, 0], None), ('normal control', [-2, 0], None)], [('regression: field parity', [4, 0], [5, 'upper', 2]), ('regression variant: field parity', [35, 1], [44, 'upper', 2]), ('partial repair probe: field parity', [26, 2], [32, 'lower', 2]), ('partial repair variant: field parity', [18, 1], [22, 'lower', 3]), ('normal control', [-1, 2], None), ('normal control', [-4, 2], None), ('normal control', [-2, 3], None)], [('regression: field parity', [0, 1], [0, 'upper', 3]), ('regression variant: field parity', [34, 2], [42, 'lower', 2]), ('partial repair probe: field parity', [36, 1], [45, 'upper', 3]), ('partial repair variant: field parity', [7, 2], [8, 'lower', 3]), ('normal control', [-2, 1], None), ('normal control', [-3, 0], None), ('normal control', [-1, 1], 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":"e5e2d843a0d204583a8b826920a4d1cee16590a8626a8d06302052ce32f6e1a7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(n, phase):\n    if n<0:\n        return None\n    def sf(a):\n        return 10*(a//4)+[0,2,5,7][a%4]\n    a=n+phase\n    start=sf(a)-sf(phase)\n    count=[2,3,2,3][a%4]\n    return [start//2,'upper' if start%2==1 else 'lower',count]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: field parity', [0, 0], [0, 'upper', 2]), ('regression variant: field parity', [2, 3], [2, 'lower', 3]), ('partial repair probe: field parity', [34, 2], [42, 'lower', 2]), ('partial repair variant: field parity', [20, 1], [25, 'upper', 3]), ('normal control', [-3, 2], None), ('normal control', [-2, 3], None), ('normal control', [-2, 1], None)], [('regression: field parity', [1, 0], [1, 'upper', 3]), ('regression variant: field parity', [8, 0], [10, 'upper', 2]), ('partial repair probe: field parity', [34, 2], [42, 'lower', 2]), ('partial repair variant: field parity', [18, 3], [22, 'lower', 3]), ('normal control', [-5, 1], None), ('normal control', [-1, 1], None), ('normal control', [-4, 1], None)], [('regression: field parity', [3, 0], [3, 'lower', 3]), ('regression variant: field parity', [9, 1], [11, 'lower', 2]), ('partial repair probe: field parity', [10, 1], [12, 'lower', 3]), ('partial repair variant: field parity', [20, 0], [25, 'upper', 2]), ('normal control', [-2, 2], None), ('normal control', [-1, 0], None), ('normal control', [-2, 0], None)], [('regression: field parity', [4, 0], [5, 'upper', 2]), ('regression variant: field parity', [35, 1], [44, 'upper', 2]), ('partial repair probe: field parity', [26, 2], [32, 'lower', 2]), ('partial repair variant: field parity', [18, 1], [22, 'lower', 3]), ('normal control', [-1, 2], None), ('normal control', [-4, 2], None), ('normal control', [-2, 3], None)], [('regression: field parity', [0, 1], [0, 'upper', 3]), ('regression variant: field parity', [34, 2], [42, 'lower', 2]), ('partial repair probe: field parity', [36, 1], [45, 'upper', 3]), ('partial repair variant: field parity', [7, 2], [8, 'lower', 3]), ('normal control', [-2, 1], None), ('normal control', [-3, 0], None), ('normal control', [-1, 1], 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":"b736acfeab02a172176620604a1295a272de071a886e6c1b14b09579733edfd4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(n, phase):\n    if n<0:\n        return None\n    def sf(a):\n        return 10*(a//4)+[0,2,5,7][a%4]\n    a=n+phase\n    start=sf(a)-sf(phase)\n    count=[2,3,2,3][a%4]\n    return [start//2,'upper' if start%2==0 else 'lower',count]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: field parity', [0, 0], [0, 'upper', 2]), ('regression variant: field parity', [2, 3], [2, 'lower', 3]), ('partial repair probe: field parity', [34, 2], [42, 'lower', 2]), ('partial repair variant: field parity', [20, 1], [25, 'upper', 3]), ('normal control', [-3, 2], None), ('normal control', [-2, 3], None), ('normal control', [-2, 1], None)], [('regression: field parity', [1, 0], [1, 'upper', 3]), ('regression variant: field parity', [8, 0], [10, 'upper', 2]), ('partial repair probe: field parity', [34, 2], [42, 'lower', 2]), ('partial repair variant: field parity', [18, 3], [22, 'lower', 3]), ('normal control', [-5, 1], None), ('normal control', [-1, 1], None), ('normal control', [-4, 1], None)], [('regression: field parity', [3, 0], [3, 'lower', 3]), ('regression variant: field parity', [9, 1], [11, 'lower', 2]), ('partial repair probe: field parity', [10, 1], [12, 'lower', 3]), ('partial repair variant: field parity', [20, 0], [25, 'upper', 2]), ('normal control', [-2, 2], None), ('normal control', [-1, 0], None), ('normal control', [-2, 0], None)], [('regression: field parity', [4, 0], [5, 'upper', 2]), ('regression variant: field parity', [35, 1], [44, 'upper', 2]), ('partial repair probe: field parity', [26, 2], [32, 'lower', 2]), ('partial repair variant: field parity', [18, 1], [22, 'lower', 3]), ('normal control', [-1, 2], None), ('normal control', [-4, 2], None), ('normal control', [-2, 3], None)], [('regression: field parity', [0, 1], [0, 'upper', 3]), ('regression variant: field parity', [34, 2], [42, 'lower', 2]), ('partial repair probe: field parity', [36, 1], [45, 'upper', 3]), ('partial repair variant: field parity', [7, 2], [8, 'lower', 3]), ('normal control', [-2, 1], None), ('normal control', [-3, 0], None), ('normal control', [-1, 1], 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-pulldown-film-to-video-field-parity","generated_at":"2026-09-29T14:49:36.595992+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":"Even field indexes are upper fields.","root_cause":"The field parity test is inverted.","sha256":"e7250a02e115e8de9c0ce992c5d4f5d677b75710c64058fb65d227e63dad3ad4","title":"2:3 pulldown film frame placement: field parity · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.13,"exit_code":1,"observations":[{"actual":[0,"upper",2],"check":"regression: field parity","expected":[0,"upper",2],"passed":true},{"actual":[2,"upper",3],"check":"regression variant: field parity","expected":[2,"lower",3],"passed":false},{"actual":[42,"upper",2],"check":"partial repair probe: field parity","expected":[42,"lower",2],"passed":false},{"actual":[25,"lower",3],"check":"partial repair variant: field parity","expected":[25,"upper",3],"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: field parity\", \"actual\": [0, \"upper\", 2], \"expected\": [0, \"upper\", 2], \"passed\": true}, {\"check\": \"regression variant: field parity\", \"actual\": [2, \"upper\", 3], \"expected\": [2, \"lower\", 3], \"passed\": false}, {\"check\": \"partial repair probe: field parity\", \"actual\": [42, \"upper\", 2], \"expected\": [42, \"lower\", 2], \"passed\": false}, {\"check\": \"partial repair variant: field parity\", \"actual\": [25, \"lower\", 3], \"expected\": [25, \"upper\", 3], \"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.047,"exit_code":1,"observations":[{"actual":[0,"lower",2],"check":"regression: field parity","expected":[0,"upper",2],"passed":false},{"actual":[2,"upper",3],"check":"regression variant: field parity","expected":[2,"lower",3],"passed":false},{"actual":[42,"upper",2],"check":"partial repair probe: field parity","expected":[42,"lower",2],"passed":false},{"actual":[25,"lower",3],"check":"partial repair variant: field parity","expected":[25,"upper",3],"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: field parity\", \"actual\": [0, \"lower\", 2], \"expected\": [0, \"upper\", 2], \"passed\": false}, {\"check\": \"regression variant: field parity\", \"actual\": [2, \"upper\", 3], \"expected\": [2, \"lower\", 3], \"passed\": false}, {\"check\": \"partial repair probe: field parity\", \"actual\": [42, \"upper\", 2], \"expected\": [42, \"lower\", 2], \"passed\": false}, {\"check\": \"partial repair variant: field parity\", \"actual\": [25, \"lower\", 3], \"expected\": [25, \"upper\", 3], \"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":37.712,"exit_code":0,"observations":[{"actual":[0,"upper",2],"check":"regression: field parity","expected":[0,"upper",2],"passed":true},{"actual":[2,"lower",3],"check":"regression variant: field parity","expected":[2,"lower",3],"passed":true},{"actual":[42,"lower",2],"check":"partial repair probe: field parity","expected":[42,"lower",2],"passed":true},{"actual":[25,"upper",3],"check":"partial repair variant: field parity","expected":[25,"upper",3],"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: field parity\", \"actual\": [0, \"upper\", 2], \"expected\": [0, \"upper\", 2], \"passed\": true}, {\"check\": \"regression variant: field parity\", \"actual\": [2, \"lower\", 3], \"expected\": [2, \"lower\", 3], \"passed\": true}, {\"check\": \"partial repair probe: field parity\", \"actual\": [42, \"lower\", 2], \"expected\": [42, \"lower\", 2], \"passed\": true}, {\"check\": \"partial repair variant: field parity\", \"actual\": [25, \"upper\", 3], \"expected\": [25, \"upper\", 3], \"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"}