FA-71876 / Error-correcting codes / Open access
SECDED overall parity ignores the parity bit itself · case 01
Clean words with an odd number of data/check ones are misclassified.
ROOT CAUSE
p is computed over r[1:] only.
VERIFIED REPAIR
Compute the overall parity over all eight bits.
Unsuccessful approach: Using r[0] alone as the parity indicator ignores the other seven bits.
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[1:]) % 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 [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['regression [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['partial-repair [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['partial-repair [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['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, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]]], [['regression [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['regression [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['partial-repair [[1, 0, 0, 1, 1, 0, 1, 0]]', [[1, 0, 0, 1, 1, 0, 1, 0]], ['double', None]], ['control [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['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, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]], ['control [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]]], [['regression [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['regression [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['partial-repair [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['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, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['control [[0, 1, 0, 1, 0, 1, 0, 1]]', [[0, 1, 0, 1, 0, 1, 0, 1]], ['clean', [1, 1, 0, 1]]]], [['regression [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['regression [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['partial-repair [[1, 0, 1, 1, 0, 1, 1, 1]]', [[1, 0, 1, 1, 0, 1, 1, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 1, 0, 0, 0, 0, 0]]', [[0, 1, 1, 0, 0, 0, 0, 0]], ['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, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]]], [['regression [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 0, 0]]', [[0, 1, 1, 1, 0, 0, 0, 0]], ['corrected', [1, 0, 0, 0]]], ['control [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['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, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]]]]
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, 0, 1, 0, 1, 0, 1, 0]] | ['corrected', [0, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | Failed |
| regression [[1, 0, 1, 0, 1, 1, 1, 0]] | ['double', None] | ['corrected', [0, 0, 1, 0]] | Failed |
| partial-repair [[0, 1, 0, 0, 0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | Passed |
| partial-repair [[0, 1, 1, 0, 1, 1, 0, 1]] | ['corrected', [0, 0, 0, 1]] | ['corrected', [0, 0, 0, 1]] | Passed |
| control [[0, 0, 0, 0, 0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | Passed |
| control [[0, 0, 0, 0, 0, 0, 1, 1]] | ['double', None] | ['double', None] | Passed |
| control [[0, 1, 1, 0, 1, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | Passed |
| control [[0, 1, 0, 1, 1, 0, 0, 1]] | ['double', None] | ['double', None] | Passed |
SHA-256 / ba058e82e8a94bffa730e091743c4ec1ad93beecd5c586f717364c9c7bc49396
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 = r[0]
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 [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['regression [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['partial-repair [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['partial-repair [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['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, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]]], [['regression [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['regression [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['partial-repair [[1, 0, 0, 1, 1, 0, 1, 0]]', [[1, 0, 0, 1, 1, 0, 1, 0]], ['double', None]], ['control [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['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, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]], ['control [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]]], [['regression [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['regression [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['partial-repair [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['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, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['control [[0, 1, 0, 1, 0, 1, 0, 1]]', [[0, 1, 0, 1, 0, 1, 0, 1]], ['clean', [1, 1, 0, 1]]]], [['regression [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['regression [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['partial-repair [[1, 0, 1, 1, 0, 1, 1, 1]]', [[1, 0, 1, 1, 0, 1, 1, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 1, 0, 0, 0, 0, 0]]', [[0, 1, 1, 0, 0, 0, 0, 0]], ['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, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]]], [['regression [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 0, 0]]', [[0, 1, 1, 1, 0, 0, 0, 0]], ['corrected', [1, 0, 0, 0]]], ['control [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['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, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]]]]
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, 0, 1, 0, 1, 0, 1, 0]] | ['corrected', [0, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | Failed |
| regression [[1, 0, 1, 0, 1, 1, 1, 0]] | ['corrected', [0, 0, 1, 0]] | ['corrected', [0, 0, 1, 0]] | Passed |
| partial-repair [[0, 1, 0, 0, 0, 0, 0, 0]] | ['double', None] | ['corrected', [0, 0, 0, 0]] | Failed |
| partial-repair [[0, 1, 1, 0, 1, 1, 0, 1]] | ['double', None] | ['corrected', [0, 0, 0, 1]] | Failed |
| control [[0, 0, 0, 0, 0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | Passed |
| control [[0, 0, 0, 0, 0, 0, 1, 1]] | ['double', None] | ['double', None] | Passed |
| control [[0, 1, 1, 0, 1, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | Passed |
| control [[0, 1, 0, 1, 1, 0, 0, 1]] | ['double', None] | ['double', None] | Passed |
SHA-256 / 537a7935061a0883465f1be745304525e9c735d238d402ffdb29efbebfd58c1c
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 [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['regression [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['partial-repair [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['partial-repair [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['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, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]]], [['regression [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['regression [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['partial-repair [[1, 0, 0, 1, 1, 0, 1, 0]]', [[1, 0, 0, 1, 1, 0, 1, 0]], ['double', None]], ['control [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['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, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]], ['control [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]]], [['regression [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['regression [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['partial-repair [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['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, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['control [[0, 1, 0, 1, 0, 1, 0, 1]]', [[0, 1, 0, 1, 0, 1, 0, 1]], ['clean', [1, 1, 0, 1]]]], [['regression [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['regression [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['partial-repair [[1, 0, 1, 1, 0, 1, 1, 1]]', [[1, 0, 1, 1, 0, 1, 1, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 1, 0, 0, 0, 0, 0]]', [[0, 1, 1, 0, 0, 0, 0, 0]], ['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, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]]], [['regression [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 0, 0]]', [[0, 1, 1, 1, 0, 0, 0, 0]], ['corrected', [1, 0, 0, 0]]], ['control [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['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, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]]]]
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, 0, 1, 0, 1, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | ['clean', [0, 0, 1, 0]] | Passed |
| regression [[1, 0, 1, 0, 1, 1, 1, 0]] | ['corrected', [0, 0, 1, 0]] | ['corrected', [0, 0, 1, 0]] | Passed |
| partial-repair [[0, 1, 0, 0, 0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | ['corrected', [0, 0, 0, 0]] | Passed |
| partial-repair [[0, 1, 1, 0, 1, 1, 0, 1]] | ['corrected', [0, 0, 0, 1]] | ['corrected', [0, 0, 0, 1]] | Passed |
| control [[0, 0, 0, 0, 0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | ['clean', [0, 0, 0, 0]] | Passed |
| control [[0, 0, 0, 0, 0, 0, 1, 1]] | ['double', None] | ['double', None] | Passed |
| control [[0, 1, 1, 0, 1, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | ['clean', [0, 0, 0, 1]] | Passed |
| control [[0, 1, 0, 1, 1, 0, 0, 1]] | ['double', None] | ['double', None] | Passed |
SHA-256 / ca6cd9e352b2f88d7e56b52dbdf55f4a6f60b238bb5054d5a50598314ddfbb58
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.534326+00:00.
Case digest / 194c543de41f19282c9a15ca5aa19b547f068a75e526f03e0e88f3f9de917d6a