FAILURE MAP
← Case archive

FA-71936 / Error-correcting codes / Open access

Convolutional encoder emits the g=5 parity first · case 01

Receivers pair the parity streams the wrong way round.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The two parities are appended in the order g=5, g=7.

VERIFIED REPAIR

Emit the g=7 parity then the g=5 parity for every input bit.

Unsuccessful approach: Keeping the order but tapping the middle register bit for the second generator changes the code.

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 & 0b101).count('1') % 2)
        out.append(bin(reg & 0b111).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 fixtureActualExpectedOutcome
regression [[1, 1, 0]][1, 1, 1, 0, 1, 0, 1, 1, 0, 0][1, 1, 0, 1, 0, 1, 1, 1, 0, 0]Failed
regression [[0, 1, 1, 0]][0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 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, 0, 1, 0, 1, 1, 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, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1][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, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1][1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]Failed

SHA-256 / 2e7b20806e3624b1beff4a4977f022529fc811bae64127d43c27e9fa252fe01a

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 & 0b110).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 fixtureActualExpectedOutcome
regression [[1, 1, 0]][1, 1, 0, 0, 0, 1, 1, 0, 0, 0][1, 1, 0, 1, 0, 1, 1, 1, 0, 0]Failed
regression [[0, 1, 1, 0]][0, 0, 1, 1, 0, 0, 0, 1, 1, 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, 0, 0, 1, 1, 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, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 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, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0][1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1]Failed

SHA-256 / 82119f2f0bc43845bdf6d8d44f9c01fb299e02fd637753917e2c8e07b7841f63

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 fixtureActualExpectedOutcome
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.064081+00:00.

Case digest / 7526b787dadae07257b1102f4622562913188aaf4d8ebb9ccc08d55558ccaf82