FA-71871 / Error-correcting codes / Open access
SECDED corrects on any nonzero syndrome · case 01
Double-bit errors are "corrected" into wrong data and parity-bit errors are reported as double errors.
ROOT CAUSE
The branch is selected by s != 0 instead of the overall parity p == 1.
VERIFIED REPAIR
Use the overall parity to decide: odd means single (correctable), even with nonzero syndrome means double.
Unsuccessful approach: Accepting either condition still miscorrects double errors.
Case contract
Extended Hamming (8,4) SECDED decoder. r[0] is the overall parity bit; r[1..7] are Hamming positions 1..7 with data at 3, 5, 6, 7. s is the XOR of set positions 1..7 and p the parity of all eight bits. s=0,p=0: "clean"; p=1: single error at position s (s=0 means the overall parity bit) - "corrected"; s!=0,p=0: ["double", None]. Return [status, data]. Non-binary or wrong-length input returns None.
Why this case matters
ECC DRAM controllers must distinguish correctable single-bit errors from uncorrectable double-bit errors.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
if len(r) != 8 or any(b not in (0, 1) for b in r):
return None
s = 0
for pos in range(1, 8):
if r[pos]:
s ^= pos
p = sum(r) % 2
c = list(r)
if s == 0 and p == 0:
status = 'clean'
elif s != 0:
status = 'corrected'
c[s] ^= 1
else:
return ['double', None]
return [status, [c[3], c[5], c[6], c[7]]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['regression [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['control [[0, 1, 1, 0, 1, 0, 0, 1]]', [[0, 1, 1, 0, 1, 0, 0, 1]], ['clean', [0, 0, 0, 1]]], ['control [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]]], [['regression [[1, 1, 0, 1, 0, 0, 0, 1]]', [[1, 1, 0, 1, 0, 0, 0, 1]], ['double', None]], ['regression [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['control [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['control [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['control [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['control [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]]], [['regression [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['regression [[0, 0, 0, 0, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['control [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 0, 0, 0, 1, 1, 1, 1]]', [[0, 0, 0, 0, 1, 1, 1, 1]], ['clean', [0, 1, 1, 1]]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]]], [['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['regression [[1, 1, 0, 0, 1, 0, 0, 1]]', [[1, 1, 0, 0, 1, 0, 0, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]], ['control [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['control [[1, 0, 0, 1, 1, 0, 0, 1]]', [[1, 0, 0, 1, 1, 0, 0, 1]], ['clean', [1, 0, 0, 1]]], ['control [[1, 0, 0, 1, 1, 0, 0, 0]]', [[1, 0, 0, 1, 1, 0, 0, 0]], ['corrected', [1, 0, 0, 1]]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]]], [['regression [[0, 0, 1, 1, 0, 1, 1, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['regression [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 0, 0, 1, 0, 1, 0]]', [[0, 1, 0, 0, 1, 0, 1, 0]], ['corrected', [1, 0, 1, 0]]], ['control [[0, 0, 1, 1, 0, 0, 1, 1]]', [[0, 0, 1, 1, 0, 0, 1, 1]], ['clean', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 0, 1, 1, 1]]', [[0, 0, 1, 1, 0, 1, 1, 1]], ['corrected', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 1, 1, 1, 1, 1, 0, 0]]', [[0, 1, 1, 1, 1, 1, 0, 0]], ['corrected', [1, 1, 0, 0]]]]]
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 [[0, 0, 0, 0, 0, 0, 1, 1]] | ['corrected', [0, 0, 1, 1]] | ['double', None] | Failed |
| regression [[0, 1, 0, 1, 1, 0, 0, 1]] | ['corrected', [1, 0, 0, 1]] | ['double', None] | Failed |
| control [[0, 0, 0, 0, 0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | Passed |
| control [[0, 1, 0, 0, 0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | Passed |
| control [[0, 1, 1, 0, 1, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | Passed |
| control [[0, 1, 1, 0, 1, 1, 0, 1]] | ['corrected', [0, 0, 0, 1]] | ['corrected', [0, 0, 0, 1]] | Passed |
| control [[1, 0, 1, 0, 1, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | Passed |
| control [[1, 0, 1, 0, 1, 1, 1, 0]] | ['corrected', [0, 0, 1, 0]] | ['corrected', [0, 0, 1, 0]] | Passed |
SHA-256 / b62e352abfe26aad245473ce35e2346fddb1498cf7bcf07b39b3c218a5230fd8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
if len(r) != 8 or any(b not in (0, 1) for b in r):
return None
s = 0
for pos in range(1, 8):
if r[pos]:
s ^= pos
p = sum(r) % 2
c = list(r)
if s == 0 and p == 0:
status = 'clean'
elif p == 1 or s != 0:
status = 'corrected'
c[s] ^= 1
else:
return ['double', None]
return [status, [c[3], c[5], c[6], c[7]]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['regression [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['control [[0, 1, 1, 0, 1, 0, 0, 1]]', [[0, 1, 1, 0, 1, 0, 0, 1]], ['clean', [0, 0, 0, 1]]], ['control [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]]], [['regression [[1, 1, 0, 1, 0, 0, 0, 1]]', [[1, 1, 0, 1, 0, 0, 0, 1]], ['double', None]], ['regression [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['control [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['control [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['control [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['control [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]]], [['regression [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['regression [[0, 0, 0, 0, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['control [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 0, 0, 0, 1, 1, 1, 1]]', [[0, 0, 0, 0, 1, 1, 1, 1]], ['clean', [0, 1, 1, 1]]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]]], [['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['regression [[1, 1, 0, 0, 1, 0, 0, 1]]', [[1, 1, 0, 0, 1, 0, 0, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]], ['control [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['control [[1, 0, 0, 1, 1, 0, 0, 1]]', [[1, 0, 0, 1, 1, 0, 0, 1]], ['clean', [1, 0, 0, 1]]], ['control [[1, 0, 0, 1, 1, 0, 0, 0]]', [[1, 0, 0, 1, 1, 0, 0, 0]], ['corrected', [1, 0, 0, 1]]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]]], [['regression [[0, 0, 1, 1, 0, 1, 1, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['regression [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 0, 0, 1, 0, 1, 0]]', [[0, 1, 0, 0, 1, 0, 1, 0]], ['corrected', [1, 0, 1, 0]]], ['control [[0, 0, 1, 1, 0, 0, 1, 1]]', [[0, 0, 1, 1, 0, 0, 1, 1]], ['clean', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 0, 1, 1, 1]]', [[0, 0, 1, 1, 0, 1, 1, 1]], ['corrected', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 1, 1, 1, 1, 1, 0, 0]]', [[0, 1, 1, 1, 1, 1, 0, 0]], ['corrected', [1, 1, 0, 0]]]]]
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 [[0, 0, 0, 0, 0, 0, 1, 1]] | ['corrected', [0, 0, 1, 1]] | ['double', None] | Failed |
| regression [[0, 1, 0, 1, 1, 0, 0, 1]] | ['corrected', [1, 0, 0, 1]] | ['double', None] | Failed |
| control [[0, 0, 0, 0, 0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | Passed |
| control [[0, 1, 0, 0, 0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | Passed |
| control [[0, 1, 1, 0, 1, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | Passed |
| control [[0, 1, 1, 0, 1, 1, 0, 1]] | ['corrected', [0, 0, 0, 1]] | ['corrected', [0, 0, 0, 1]] | Passed |
| control [[1, 0, 1, 0, 1, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | Passed |
| control [[1, 0, 1, 0, 1, 1, 1, 0]] | ['corrected', [0, 0, 1, 0]] | ['corrected', [0, 0, 1, 0]] | Passed |
SHA-256 / 1f07089570d1fce817d9fe3505a524370d22b9c0e2acec8f8bdb0669ca49efda
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
if len(r) != 8 or any(b not in (0, 1) for b in r):
return None
s = 0
for pos in range(1, 8):
if r[pos]:
s ^= pos
p = sum(r) % 2
c = list(r)
if s == 0 and p == 0:
status = 'clean'
elif p == 1:
status = 'corrected'
c[s] ^= 1
else:
return ['double', None]
return [status, [c[3], c[5], c[6], c[7]]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['regression [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['control [[0, 1, 1, 0, 1, 0, 0, 1]]', [[0, 1, 1, 0, 1, 0, 0, 1]], ['clean', [0, 0, 0, 1]]], ['control [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]]], [['regression [[1, 1, 0, 1, 0, 0, 0, 1]]', [[1, 1, 0, 1, 0, 0, 0, 1]], ['double', None]], ['regression [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['control [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['control [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['control [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['control [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]]], [['regression [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['regression [[0, 0, 0, 0, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['control [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 0, 0, 0, 1, 1, 1, 1]]', [[0, 0, 0, 0, 1, 1, 1, 1]], ['clean', [0, 1, 1, 1]]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]]], [['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['regression [[1, 1, 0, 0, 1, 0, 0, 1]]', [[1, 1, 0, 0, 1, 0, 0, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]], ['control [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['control [[1, 0, 0, 1, 1, 0, 0, 1]]', [[1, 0, 0, 1, 1, 0, 0, 1]], ['clean', [1, 0, 0, 1]]], ['control [[1, 0, 0, 1, 1, 0, 0, 0]]', [[1, 0, 0, 1, 1, 0, 0, 0]], ['corrected', [1, 0, 0, 1]]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]]], [['regression [[0, 0, 1, 1, 0, 1, 1, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['regression [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 0, 0, 1, 0, 1, 0]]', [[0, 1, 0, 0, 1, 0, 1, 0]], ['corrected', [1, 0, 1, 0]]], ['control [[0, 0, 1, 1, 0, 0, 1, 1]]', [[0, 0, 1, 1, 0, 0, 1, 1]], ['clean', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 0, 1, 1, 1]]', [[0, 0, 1, 1, 0, 1, 1, 1]], ['corrected', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 1, 1, 1, 1, 1, 0, 0]]', [[0, 1, 1, 1, 1, 1, 0, 0]], ['corrected', [1, 1, 0, 0]]]]]
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 [[0, 0, 0, 0, 0, 0, 1, 1]] | ['double', None] | ['double', None] | Passed |
| regression [[0, 1, 0, 1, 1, 0, 0, 1]] | ['double', None] | ['double', None] | Passed |
| control [[0, 0, 0, 0, 0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | Passed |
| control [[0, 1, 0, 0, 0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | Passed |
| control [[0, 1, 1, 0, 1, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | Passed |
| control [[0, 1, 1, 0, 1, 1, 0, 1]] | ['corrected', [0, 0, 0, 1]] | ['corrected', [0, 0, 0, 1]] | Passed |
| control [[1, 0, 1, 0, 1, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | Passed |
| control [[1, 0, 1, 0, 1, 1, 1, 0]] | ['corrected', [0, 0, 1, 0]] | ['corrected', [0, 0, 1, 0]] | Passed |
SHA-256 / 63ec50f495488c76aa0dd4ab6f043b3d8e02ea0124dec7e62a5ac9df22866ab9
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:33.472272+00:00.
Case digest / 36fb1c6b724031b7c8a841299066bdb1b4799890fa807d859e585de27f7cdb8c