FA-71931 / Error-correcting codes / Open access
Convolutional encoder keeps the oldest bits · case 01
Output parities stop depending on the latest input bits.
ROOT CAUSE
The next state keeps reg & 0b11 (the two older bits) instead of shifting the new bit in.
VERIFIED REPAIR
Set state = reg >> 1 so the current bit becomes the newest memory bit.
Unsuccessful approach: Shifting but keeping only one memory bit shortens the constraint length.
Case 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.
Why this case matters
Satellite and wireless links protect data with the classic K=3 (7,5) convolutional code.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data):
state = 0
out = []
for b in data + [0, 0]:
reg = (b << 2) | state
out.append(bin(reg & 0b111).count('1') % 2)
out.append(bin(reg & 0b101).count('1') % 2)
state = reg & 0b11
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression [[1, 1, 0]] | [1, 1, 1, 1, 0, 0, 0, 0, 0, 0] | [1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | Failed |
| regression [[0, 1, 1, 0]] | [0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | Failed |
| control [[0]] | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| control [[0, 0]] | [0, 0, 0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0, 0, 0] | Passed |
| control [[]] | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
| control [[0, 1, 1, 0, 0]] | [0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0] | Failed |
| control [[1, 0, 1, 1, 1, 1]] | [1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0] | [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1] | Failed |
| control [[1, 0, 0, 1, 1, 1, 1, 1]] | [1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0] | [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1] | Failed |
SHA-256 / 8dd74d5d01686f9857871ff2af148e7416b91f440a36419f933b6368fb9d983d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data):
state = 0
out = []
for b in data + [0, 0]:
reg = (b << 2) | state
out.append(bin(reg & 0b111).count('1') % 2)
out.append(bin(reg & 0b101).count('1') % 2)
state = (reg >> 1) & 0b10
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression [[1, 1, 0]] | [1, 1, 0, 1, 1, 0, 0, 0, 0, 0] | [1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | Failed |
| regression [[0, 1, 1, 0]] | [0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | Failed |
| control [[0]] | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| control [[0, 0]] | [0, 0, 0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0, 0, 0] | Passed |
| control [[]] | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
| control [[0, 1, 1, 0, 0]] | [0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0] | Failed |
| control [[1, 0, 1, 1, 1, 1]] | [1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0] | [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1] | Failed |
| control [[1, 0, 0, 1, 1, 1, 1, 1]] | [1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0] | [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1] | Failed |
SHA-256 / a799a07ddd3d7b8bf5b61d0492eb60c06155f510b52a68d10d0ed211df3d6e2f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data):
state = 0
out = []
for b in data + [0, 0]:
reg = (b << 2) | state
out.append(bin(reg & 0b111).count('1') % 2)
out.append(bin(reg & 0b101).count('1') % 2)
state = reg >> 1
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression [[1, 1, 0]] | [1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | [1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | Passed |
| regression [[0, 1, 1, 0]] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0] | Passed |
| control [[0]] | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| control [[0, 0]] | [0, 0, 0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0, 0, 0] | Passed |
| control [[]] | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
| control [[0, 1, 1, 0, 0]] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0] | [0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0] | Passed |
| control [[1, 0, 1, 1, 1, 1]] | [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1] | [1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1] | Passed |
| control [[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] | [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1] | Passed |
SHA-256 / 4e0b8093115afe32d6ea969e92a4bbf59b4a2061a5b54b6f35a723ba4f42c8b1
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:34.061728+00:00.
Case digest / 65fb41c647ab80dcfdb0a9dc4ebdfb8577a7327f8a2a768c538a9bb2a608cd3e