FAILURE MAP
← Case archive

FA-72111 / Error-correcting codes / Open access

Bit flipping flips only the first most-suspect bit · case 01

Decoding needs more iterations or fails where parallel flipping succeeds.

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

ROOT CAUSE

Only the first bit with the maximum unsatisfied count is flipped.

THE FAILURE

Only the first bit with the maximum unsatisfied count is flipped.

Unsuccessful approach: Flipping every bit in any unsatisfied check overcorrects.

Case contract

Parallel Gallager bit-flipping decoder. H lists the variable indices of each parity check. In each iteration: if every check is satisfied stop with success; otherwise count, per bit, the unsatisfied checks it joins and flip all bits that reach the maximum count. At most max_iter flipping iterations are performed and the syndrome is checked after the last one. Return [bits, iterations performed, success].

Why this case matters

Hard-decision LDPC decoders in flash controllers use bit flipping as a low-power first pass.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(H, r, max_iter):
    c = list(r)
    for it in range(max_iter + 1):
        unsat = [chk for chk in H if sum(c[v] for v in chk) % 2]
        if not unsat:
            return [c, it, True]
        if it == max_iter:
            break
        cnt = [0] * len(c)
        for chk in unsat:
            for v in chk:
                cnt[v] += 1
        top = max(cnt)
        c = [b ^ 1 if k == cnt.index(top) else b for k, b in enumerate(c)]
    return [c, max_iter, False]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4], [[0, 0, 1, 1, 0, 0, 1], 2, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2], [[0, 1, 0, 0, 1, 0, 1], 2, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 1, 1], 2]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 1, 1], 2], [[0, 0, 1, 0, 1, 1], 1, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0], [[0, 1, 1, 0, 1, 1, 1], 0, False]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2], [[1, 1, 1, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4], [[0, 0, 1, 1, 0, 0, 1], 2, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [1, 1, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [1, 1, 0, 0, 0, 0], 4], [[1, 1, 1, 0, 0, 0], 1, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 1]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 1], [[0, 0, 0, 0, 0, 0], 1, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2], [[0, 1, 0, 0, 1, 0, 1], 2, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 2]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 2], [[0, 0, 0, 0, 0, 0], 1, True]], ['partial-repair [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 1]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 1], [[0, 1, 1, 0, 0, 1, 0], 1, False]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2], [[1, 1, 1, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4], [[0, 0, 1, 1, 0, 0, 1], 2, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0], [[0, 1, 1, 0, 1, 1, 1], 0, False]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2], [[1, 1, 1, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]]]]
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 [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3][[0, 0, 0, 0, 0, 0, 0], 1, True][[0, 0, 0, 0, 0, 0, 0], 2, True]Failed
regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4][[0, 0, 1, 1, 0, 0, 1], 1, True][[0, 0, 1, 1, 0, 0, 1], 2, True]Failed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2][[0, 0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0][[0, 0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3][[0, 0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1][[0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4][[0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3][[0, 1, 1, 0, 0, 1, 1], 0, True][[0, 1, 1, 0, 0, 1, 1], 0, True]Passed

SHA-256 / a9514862e724bd473cc4de0e46ae2ba7f9a636661931af79f0a327a4f8e8e7c4

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(H, r, max_iter):
    c = list(r)
    for it in range(max_iter + 1):
        unsat = [chk for chk in H if sum(c[v] for v in chk) % 2]
        if not unsat:
            return [c, it, True]
        if it == max_iter:
            break
        cnt = [0] * len(c)
        for chk in unsat:
            for v in chk:
                cnt[v] += 1
        top = max(cnt)
        c = [b ^ 1 if cnt[k] >= 1 else b for k, b in enumerate(c)]
    return [c, max_iter, False]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4], [[0, 0, 1, 1, 0, 0, 1], 2, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2], [[0, 1, 0, 0, 1, 0, 1], 2, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 1, 1], 2]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 1, 1], 2], [[0, 0, 1, 0, 1, 1], 1, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0], [[0, 1, 1, 0, 1, 1, 1], 0, False]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2], [[1, 1, 1, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4], [[0, 0, 1, 1, 0, 0, 1], 2, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [1, 1, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [1, 1, 0, 0, 0, 0], 4], [[1, 1, 1, 0, 0, 0], 1, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 1]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 1], [[0, 0, 0, 0, 0, 0], 1, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 0, 0, 0, 0, 1], 2], [[0, 1, 0, 0, 1, 0, 1], 2, True]], ['partial-repair [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 2]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 1, 0, 0], 2], [[0, 0, 0, 0, 0, 0], 1, True]], ['partial-repair [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 1]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 1], [[0, 1, 1, 0, 0, 1, 0], 1, False]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2], [[1, 1, 1, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 0, True]]], [['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3], [[0, 0, 0, 0, 0, 0, 0], 2, True]], ['regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4], [[0, 0, 1, 1, 0, 0, 1], 2, True]], ['control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4]', [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4], [[0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3], [[0, 1, 1, 0, 0, 1, 1], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 1, 1, 1], 0], [[0, 1, 1, 0, 1, 1, 1], 0, False]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [1, 1, 1, 0, 0, 0, 0], 2], [[1, 1, 1, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2], [[0, 0, 0, 0, 0, 0, 0], 0, True]], ['control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0]', [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0], [[0, 0, 0, 0, 0, 0, 0], 0, True]]]]
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 [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 1, 0], 3][[0, 1, 1, 1, 1, 0, 1], 3, False][[0, 0, 0, 0, 0, 0, 0], 2, True]Failed
regression [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 1, 0, 0, 1], 4][[0, 0, 0, 0, 0, 0, 1], 4, False][[0, 0, 1, 1, 0, 0, 1], 2, True]Failed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 2][[0, 0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 0][[0, 0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 0, 0, 0, 0, 0, 0], 3][[0, 0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 1][[0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 1, 3], [1, 2, 4], [0, 2, 5], [3, 4, 5]], [0, 0, 0, 0, 0, 0], 4][[0, 0, 0, 0, 0, 0], 0, True][[0, 0, 0, 0, 0, 0], 0, True]Passed
control [[[0, 2, 4, 6], [1, 2, 5, 6], [3, 4, 5, 6]], [0, 1, 1, 0, 0, 1, 1], 3][[0, 1, 1, 0, 0, 1, 1], 0, True][[0, 1, 1, 0, 0, 1, 1], 0, True]Passed

SHA-256 / a22b196101d81f765b1e68f5ce22852590c568bc097b4765efa71ab39644ffe4

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 1d30bfe7f0a4141daf6f2e02687b177b1e65fd79e3c521c0bc7d1c613d8c0f2d