{"abstract":"Output parities stop depending on the latest input bits.","category":"Error-correcting codes","checks":8,"contract":"Rate-1/2, constraint-length-3 convolutional encoder with generators 7 (111) and 5 (101) octal. The register holds the current bit in bit 2 and the two previous bits below it; for each input bit output the g=7 parity then the g=5 parity, then shift. Two zero tail bits terminate the trellis. Return the output bit list.","contract_signature":"data","evaluation_group":"w2-error_correcting_codes-convolutional-encode","failed_approach":"Shifting but keeping only one memory bit shortens the constraint length.","family":"w2-error_correcting_codes-convolutional-encode-state-shift","id":"FA-71931","implementations":{"attempt":{"sha256":"a799a07ddd3d7b8bf5b61d0492eb60c06155f510b52a68d10d0ed211df3d6e2f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    state = 0\n    out = []\n    for b in data + [0, 0]:\n        reg = (b << 2) | state\n        out.append(bin(reg & 0b111).count('1') % 2)\n        out.append(bin(reg & 0b101).count('1') % 2)\n        state = (reg >> 1) & 0b10\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['regression [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]]], [['regression [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['regression [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]]], [['regression [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['regression [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]]], [['regression [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]], ['regression [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]]], [['regression [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['regression [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]], ['control [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]]]]\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":"8dd74d5d01686f9857871ff2af148e7416b91f440a36419f933b6368fb9d983d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    state = 0\n    out = []\n    for b in data + [0, 0]:\n        reg = (b << 2) | state\n        out.append(bin(reg & 0b111).count('1') % 2)\n        out.append(bin(reg & 0b101).count('1') % 2)\n        state = reg & 0b11\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['regression [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]]], [['regression [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['regression [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]]], [['regression [[0, 0, 1]]', [[0, 0, 1]], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1]], ['regression [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 1, 0]]', [[1, 1, 0]], [1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['control [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]]], [['regression [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]], ['regression [[1, 1, 1, 1, 1]]', [[1, 1, 1, 1, 1]], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1, 0, 1, 1, 1, 1]]', [[1, 0, 1, 1, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1]], ['control [[1, 0, 0, 1, 1, 1, 1, 1]]', [[1, 0, 0, 1, 1, 1, 1, 1]], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]]], [['regression [[0, 1, 1, 0]]', [[0, 1, 1, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0]], ['regression [[0, 1, 1, 0, 0]]', [[0, 1, 1, 0, 0]], [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[]]', [[]], [0, 0, 0, 0]], ['control [[0]]', [[0]], [0, 0, 0, 0, 0, 0]], ['control [[0, 0]]', [[0, 0]], [0, 0, 0, 0, 0, 0, 0, 0]], ['control [[1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 0, 1, 1, 0, 0]], [1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]], ['control [[1]]', [[1]], [1, 1, 1, 0, 1, 1]], ['control [[1, 0, 1, 1]]', [[1, 0, 1, 1]], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]]]]\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 of the named code under the stated contract; not a production codec. 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-error_correcting_codes-convolutional-encode-state-shift","generated_at":"2026-09-29T14:48:34.064081+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Satellite and wireless links protect data with the classic K=3 (7,5) convolutional code.","root_cause":"The next state keeps reg & 0b11 (the two older bits) instead of shifting the new bit in.","sha256":"44f6616c47aebb894dc87b6abd5150bce99638ef922ce513aeffe2fb572c8e9f","title":"Convolutional encoder keeps the oldest bits · 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":39.638,"exit_code":1,"observations":[{"actual":[1,1,0,1,1,0,0,0,0,0],"check":"regression [[1, 1, 0]]","expected":[1,1,0,1,0,1,1,1,0,0],"passed":false},{"actual":[0,0,1,1,0,1,1,0,0,0,0,0],"check":"regression [[0, 1, 1, 0]]","expected":[0,0,1,1,0,1,0,1,1,1,0,0],"passed":false},{"actual":[0,0,0,0,0,0],"check":"control [[0]]","expected":[0,0,0,0,0,0],"passed":true},{"actual":[0,0,0,0,0,0,0,0],"check":"control [[0, 0]]","expected":[0,0,0,0,0,0,0,0],"passed":true},{"actual":[0,0,0,0],"check":"control [[]]","expected":[0,0,0,0],"passed":true},{"actual":[0,0,1,1,0,1,1,0,0,0,0,0,0,0],"check":"control [[0, 1, 1, 0, 0]]","expected":[0,0,1,1,0,1,0,1,1,1,0,0,0,0],"passed":false},{"actual":[1,1,1,0,1,1,0,1,0,1,0,1,1,0,0,0],"check":"control [[1, 0, 1, 1, 1, 1]]","expected":[1,1,1,0,0,0,0,1,1,0,1,0,0,1,1,1],"passed":false},{"actual":[1,1,1,0,0,0,1,1,0,1,0,1,0,1,0,1,1,0,0,0],"check":"control [[1, 0, 0, 1, 1, 1, 1, 1]]","expected":[1,1,1,0,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[1, 1, 0]]\", \"actual\": [1, 1, 0, 1, 1, 0, 0, 0, 0, 0], \"expected\": [1, 1, 0, 1, 0, 1, 1, 1, 0, 0], \"passed\": false}, {\"check\": \"regression [[0, 1, 1, 0]]\", \"actual\": [0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0], \"expected\": [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], \"passed\": false}, {\"check\": \"control [[0]]\", \"actual\": [0, 0, 0, 0, 0, 0], \"expected\": [0, 0, 0, 0, 0, 0], \"passed\": true}, {\"check\": \"control [[0, 0]]\", \"actual\": [0, 0, 0, 0, 0, 0, 0, 0], \"expected\": [0, 0, 0, 0, 0, 0, 0, 0], \"passed\": true}, {\"check\": \"control [[]]\", \"actual\": [0, 0, 0, 0], \"expected\": [0, 0, 0, 0], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 0]]\", \"actual\": [0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0], \"expected\": [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0], \"passed\": false}, {\"check\": \"control [[1, 0, 1, 1, 1, 1]]\", \"actual\": [1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0], \"expected\": [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1], \"passed\": false}, {\"check\": \"control [[1, 0, 0, 1, 1, 1, 1, 1]]\", \"actual\": [1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0], \"expected\": [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.651,"exit_code":1,"observations":[{"actual":[1,1,1,1,0,0,0,0,0,0],"check":"regression [[1, 1, 0]]","expected":[1,1,0,1,0,1,1,1,0,0],"passed":false},{"actual":[0,0,1,1,1,1,0,0,0,0,0,0],"check":"regression [[0, 1, 1, 0]]","expected":[0,0,1,1,0,1,0,1,1,1,0,0],"passed":false},{"actual":[0,0,0,0,0,0],"check":"control [[0]]","expected":[0,0,0,0,0,0],"passed":true},{"actual":[0,0,0,0,0,0,0,0],"check":"control [[0, 0]]","expected":[0,0,0,0,0,0,0,0],"passed":true},{"actual":[0,0,0,0],"check":"control [[]]","expected":[0,0,0,0],"passed":true},{"actual":[0,0,1,1,1,1,0,0,0,0,0,0,0,0],"check":"control [[0, 1, 1, 0, 0]]","expected":[0,0,1,1,0,1,0,1,1,1,0,0,0,0],"passed":false},{"actual":[1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0],"check":"control [[1, 0, 1, 1, 1, 1]]","expected":[1,1,1,0,0,0,0,1,1,0,1,0,0,1,1,1],"passed":false},{"actual":[1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0],"check":"control [[1, 0, 0, 1, 1, 1, 1, 1]]","expected":[1,1,1,0,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[1, 1, 0]]\", \"actual\": [1, 1, 1, 1, 0, 0, 0, 0, 0, 0], \"expected\": [1, 1, 0, 1, 0, 1, 1, 1, 0, 0], \"passed\": false}, {\"check\": \"regression [[0, 1, 1, 0]]\", \"actual\": [0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], \"expected\": [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], \"passed\": false}, {\"check\": \"control [[0]]\", \"actual\": [0, 0, 0, 0, 0, 0], \"expected\": [0, 0, 0, 0, 0, 0], \"passed\": true}, {\"check\": \"control [[0, 0]]\", \"actual\": [0, 0, 0, 0, 0, 0, 0, 0], \"expected\": [0, 0, 0, 0, 0, 0, 0, 0], \"passed\": true}, {\"check\": \"control [[]]\", \"actual\": [0, 0, 0, 0], \"expected\": [0, 0, 0, 0], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 0]]\", \"actual\": [0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], \"expected\": [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0], \"passed\": false}, {\"check\": \"control [[1, 0, 1, 1, 1, 1]]\", \"actual\": [1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], \"expected\": [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1], \"passed\": false}, {\"check\": \"control [[1, 0, 0, 1, 1, 1, 1, 1]]\", \"actual\": [1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], \"expected\": [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1], \"passed\": false}], \"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."}}