FAILURE MAP
← Case archive

FA-72251 / Error-correcting codes / Open access

RS erasure recovery counts duplicate shares toward k · case 01

Too few distinct shares are accepted and interpolation uses fewer points than needed.

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

ROOT CAUSE

The sufficiency test counts raw shares, including duplicates.

VERIFIED REPAIR

Require k distinct x coordinates.

Unsuccessful approach: Requiring more than k distinct points rejects exactly-sufficient inputs.

Case contract

Systematic Reed-Solomon erasure code over GF(257): the k data symbols are the values of a degree < k polynomial at x = 1..k, and any symbol is its value at another x. Given surviving shares [x, y] (duplicates allowed if they agree; conflicting duplicates return None; y is reduced mod 257), recover the k data symbols by Lagrange interpolation over the k shares with the smallest x. Fewer than k distinct x values returns None.

Why this case matters

Distributed storage rebuilds lost data fragments from any k surviving fragments.

1 / The failure

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

N = 1
observations = []
def solve(shares, k):
    p = 257
    pts = {}
    for x, y in shares:
        if x in pts and pts[x] != y % p:
            return None
        pts[x] = y % p
    if len(shares) < k:
        return None
    use = sorted(pts.items())[:k]
    out = []
    for t in range(1, k + 1):
        total = 0
        for i, (xi, yi) in enumerate(use):
            num, den = 1, 1
            for j, (xj, _) in enumerate(use):
                if j != i:
                    num = num * (t - xj) % p
                    den = den * (xi - xj) % p
            total = (total + yi * num * pow(den, p - 2, p)) % p
        out.append(total)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[1, 195], [1, 195]], 2]', [[[1, 195], [1, 195]], 2], None], ['regression [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['partial-repair [[[1, 195], [2, 163]], 2]', [[[1, 195], [2, 163]], 2], [195, 163]], ['partial-repair [[[1, 452], [2, 420]], 2]', [[[1, 452], [2, 420]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None], ['control [[[1, 191], [5, 97], [3, 23], [4, 94]], 3]', [[[1, 191], [5, 97], [3, 23], [4, 94]], 3], [191, 141, 23]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None]], [['regression [[[8, 25], [4, 191], [3, 238], [8, 25]], 4]', [[[8, 25], [4, 191], [3, 238], [8, 25]], 4], None], ['regression [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None], ['partial-repair [[[1, 448], [5, 354], [3, 280]], 3]', [[[1, 448], [5, 354], [3, 280]], 3], [191, 141, 23]], ['partial-repair [[[1, 224], [5, 68], [4, 8]], 3]', [[[1, 224], [5, 68], [4, 8]], 3], [224, 86, 14]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4], None], ['control [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4], [215, 35, 99, 14]]], [['regression [[[4, 127], [4, 127]], 2]', [[[4, 127], [4, 127]], 2], None], ['regression [[[1, 88], [7, 101], [1, 88]], 3]', [[[1, 88], [7, 101], [1, 88]], 3], None], ['partial-repair [[[8, 25], [4, 191], [3, 238], [1, 28]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28]], 4], [28, 103, 238, 191]], ['partial-repair [[[8, 282], [4, 448], [3, 495], [1, 285]], 4]', [[[8, 282], [4, 448], [3, 495], [1, 285]], 4], [28, 103, 238, 191]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [8, 226]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [8, 226]], 5], [54, 149, 70, 122, 153]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5], None], ['control [[[4, 127], [5, 207], [1, 144]], 2]', [[[4, 127], [5, 207], [1, 144]], 2], [144, 224]], ['control [[[4, 127], [5, 207], [4, 128]], 2]', [[[4, 127], [5, 207], [4, 128]], 2], None]], [['regression [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['regression [[[1, 224], [5, 68], [1, 224]], 3]', [[[1, 224], [5, 68], [1, 224]], 3], None], ['partial-repair [[[4, 271], [5, 415], [7, 332], [8, 347]], 4]', [[[4, 271], [5, 415], [7, 332], [8, 347]], 4], [215, 35, 99, 14]], ['partial-repair [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70]], 5], [54, 149, 70, 122, 153]], ['control [[[1, 88], [7, 101], [3, 242], [1, 89]], 3]', [[[1, 88], [7, 101], [3, 242], [1, 89]], 3], None], ['control [[[3, 5]], 2]', [[[3, 5]], 2], None], ['control [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None]], [['regression [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None], ['regression [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5], None], ['partial-repair [[[4, 127], [5, 207]], 2]', [[[4, 127], [5, 207]], 2], [144, 224]], ['partial-repair [[[4, 384], [5, 464]], 2]', [[[4, 384], [5, 464]], 2], [144, 224]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None], ['control [[[1, 224], [5, 68], [4, 8], [6, 194]], 3]', [[[1, 224], [5, 68], [4, 8], [6, 194]], 3], [224, 86, 14]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]]]]
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, 195], [1, 195]], 2][195, 195]NoneFailed
regression [[[1, 191], [5, 97], [1, 191]], 3][191, 39, 144]NoneFailed
partial-repair [[[1, 195], [2, 163]], 2][195, 163][195, 163]Passed
partial-repair [[[1, 452], [2, 420]], 2][195, 163][195, 163]Passed
control [[[1, 195], [2, 163], [6, 35]], 2][195, 163][195, 163]Passed
control [[[1, 195], [2, 163], [1, 196]], 2]NoneNonePassed
control [[[1, 191], [5, 97], [3, 23], [4, 94]], 3][191, 141, 23][191, 141, 23]Passed
control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]NoneNonePassed

SHA-256 / b7d1b97115d14d75a91444224408b54e94634ff81e97ae67a1914badb79f90ad

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(shares, k):
    p = 257
    pts = {}
    for x, y in shares:
        if x in pts and pts[x] != y % p:
            return None
        pts[x] = y % p
    if len(pts) <= k:
        return None
    use = sorted(pts.items())[:k]
    out = []
    for t in range(1, k + 1):
        total = 0
        for i, (xi, yi) in enumerate(use):
            num, den = 1, 1
            for j, (xj, _) in enumerate(use):
                if j != i:
                    num = num * (t - xj) % p
                    den = den * (xi - xj) % p
            total = (total + yi * num * pow(den, p - 2, p)) % p
        out.append(total)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[1, 195], [1, 195]], 2]', [[[1, 195], [1, 195]], 2], None], ['regression [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['partial-repair [[[1, 195], [2, 163]], 2]', [[[1, 195], [2, 163]], 2], [195, 163]], ['partial-repair [[[1, 452], [2, 420]], 2]', [[[1, 452], [2, 420]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None], ['control [[[1, 191], [5, 97], [3, 23], [4, 94]], 3]', [[[1, 191], [5, 97], [3, 23], [4, 94]], 3], [191, 141, 23]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None]], [['regression [[[8, 25], [4, 191], [3, 238], [8, 25]], 4]', [[[8, 25], [4, 191], [3, 238], [8, 25]], 4], None], ['regression [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None], ['partial-repair [[[1, 448], [5, 354], [3, 280]], 3]', [[[1, 448], [5, 354], [3, 280]], 3], [191, 141, 23]], ['partial-repair [[[1, 224], [5, 68], [4, 8]], 3]', [[[1, 224], [5, 68], [4, 8]], 3], [224, 86, 14]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4], None], ['control [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4], [215, 35, 99, 14]]], [['regression [[[4, 127], [4, 127]], 2]', [[[4, 127], [4, 127]], 2], None], ['regression [[[1, 88], [7, 101], [1, 88]], 3]', [[[1, 88], [7, 101], [1, 88]], 3], None], ['partial-repair [[[8, 25], [4, 191], [3, 238], [1, 28]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28]], 4], [28, 103, 238, 191]], ['partial-repair [[[8, 282], [4, 448], [3, 495], [1, 285]], 4]', [[[8, 282], [4, 448], [3, 495], [1, 285]], 4], [28, 103, 238, 191]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [8, 226]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [8, 226]], 5], [54, 149, 70, 122, 153]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5], None], ['control [[[4, 127], [5, 207], [1, 144]], 2]', [[[4, 127], [5, 207], [1, 144]], 2], [144, 224]], ['control [[[4, 127], [5, 207], [4, 128]], 2]', [[[4, 127], [5, 207], [4, 128]], 2], None]], [['regression [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['regression [[[1, 224], [5, 68], [1, 224]], 3]', [[[1, 224], [5, 68], [1, 224]], 3], None], ['partial-repair [[[4, 271], [5, 415], [7, 332], [8, 347]], 4]', [[[4, 271], [5, 415], [7, 332], [8, 347]], 4], [215, 35, 99, 14]], ['partial-repair [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70]], 5], [54, 149, 70, 122, 153]], ['control [[[1, 88], [7, 101], [3, 242], [1, 89]], 3]', [[[1, 88], [7, 101], [3, 242], [1, 89]], 3], None], ['control [[[3, 5]], 2]', [[[3, 5]], 2], None], ['control [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None]], [['regression [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None], ['regression [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5], None], ['partial-repair [[[4, 127], [5, 207]], 2]', [[[4, 127], [5, 207]], 2], [144, 224]], ['partial-repair [[[4, 384], [5, 464]], 2]', [[[4, 384], [5, 464]], 2], [144, 224]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None], ['control [[[1, 224], [5, 68], [4, 8], [6, 194]], 3]', [[[1, 224], [5, 68], [4, 8], [6, 194]], 3], [224, 86, 14]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]]]]
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, 195], [1, 195]], 2]NoneNonePassed
regression [[[1, 191], [5, 97], [1, 191]], 3]NoneNonePassed
partial-repair [[[1, 195], [2, 163]], 2]None[195, 163]Failed
partial-repair [[[1, 452], [2, 420]], 2]None[195, 163]Failed
control [[[1, 195], [2, 163], [6, 35]], 2][195, 163][195, 163]Passed
control [[[1, 195], [2, 163], [1, 196]], 2]NoneNonePassed
control [[[1, 191], [5, 97], [3, 23], [4, 94]], 3][191, 141, 23][191, 141, 23]Passed
control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]NoneNonePassed

SHA-256 / b05894e2179d1f87b2502d85a585756ea95d0fa2b92b3ecc88c7996c23cf0ca9

3 / The verified repair

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

N = 1
observations = []
def solve(shares, k):
    p = 257
    pts = {}
    for x, y in shares:
        if x in pts and pts[x] != y % p:
            return None
        pts[x] = y % p
    if len(pts) < k:
        return None
    use = sorted(pts.items())[:k]
    out = []
    for t in range(1, k + 1):
        total = 0
        for i, (xi, yi) in enumerate(use):
            num, den = 1, 1
            for j, (xj, _) in enumerate(use):
                if j != i:
                    num = num * (t - xj) % p
                    den = den * (xi - xj) % p
            total = (total + yi * num * pow(den, p - 2, p)) % p
        out.append(total)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[1, 195], [1, 195]], 2]', [[[1, 195], [1, 195]], 2], None], ['regression [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['partial-repair [[[1, 195], [2, 163]], 2]', [[[1, 195], [2, 163]], 2], [195, 163]], ['partial-repair [[[1, 452], [2, 420]], 2]', [[[1, 452], [2, 420]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None], ['control [[[1, 191], [5, 97], [3, 23], [4, 94]], 3]', [[[1, 191], [5, 97], [3, 23], [4, 94]], 3], [191, 141, 23]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None]], [['regression [[[8, 25], [4, 191], [3, 238], [8, 25]], 4]', [[[8, 25], [4, 191], [3, 238], [8, 25]], 4], None], ['regression [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None], ['partial-repair [[[1, 448], [5, 354], [3, 280]], 3]', [[[1, 448], [5, 354], [3, 280]], 3], [191, 141, 23]], ['partial-repair [[[1, 224], [5, 68], [4, 8]], 3]', [[[1, 224], [5, 68], [4, 8]], 3], [224, 86, 14]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4], None], ['control [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4], [215, 35, 99, 14]]], [['regression [[[4, 127], [4, 127]], 2]', [[[4, 127], [4, 127]], 2], None], ['regression [[[1, 88], [7, 101], [1, 88]], 3]', [[[1, 88], [7, 101], [1, 88]], 3], None], ['partial-repair [[[8, 25], [4, 191], [3, 238], [1, 28]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28]], 4], [28, 103, 238, 191]], ['partial-repair [[[8, 282], [4, 448], [3, 495], [1, 285]], 4]', [[[8, 282], [4, 448], [3, 495], [1, 285]], 4], [28, 103, 238, 191]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [8, 226]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [8, 226]], 5], [54, 149, 70, 122, 153]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5], None], ['control [[[4, 127], [5, 207], [1, 144]], 2]', [[[4, 127], [5, 207], [1, 144]], 2], [144, 224]], ['control [[[4, 127], [5, 207], [4, 128]], 2]', [[[4, 127], [5, 207], [4, 128]], 2], None]], [['regression [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['regression [[[1, 224], [5, 68], [1, 224]], 3]', [[[1, 224], [5, 68], [1, 224]], 3], None], ['partial-repair [[[4, 271], [5, 415], [7, 332], [8, 347]], 4]', [[[4, 271], [5, 415], [7, 332], [8, 347]], 4], [215, 35, 99, 14]], ['partial-repair [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70]], 5], [54, 149, 70, 122, 153]], ['control [[[1, 88], [7, 101], [3, 242], [1, 89]], 3]', [[[1, 88], [7, 101], [3, 242], [1, 89]], 3], None], ['control [[[3, 5]], 2]', [[[3, 5]], 2], None], ['control [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None]], [['regression [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None], ['regression [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5], None], ['partial-repair [[[4, 127], [5, 207]], 2]', [[[4, 127], [5, 207]], 2], [144, 224]], ['partial-repair [[[4, 384], [5, 464]], 2]', [[[4, 384], [5, 464]], 2], [144, 224]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None], ['control [[[1, 224], [5, 68], [4, 8], [6, 194]], 3]', [[[1, 224], [5, 68], [4, 8], [6, 194]], 3], [224, 86, 14]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]]]]
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, 195], [1, 195]], 2]NoneNonePassed
regression [[[1, 191], [5, 97], [1, 191]], 3]NoneNonePassed
partial-repair [[[1, 195], [2, 163]], 2][195, 163][195, 163]Passed
partial-repair [[[1, 452], [2, 420]], 2][195, 163][195, 163]Passed
control [[[1, 195], [2, 163], [6, 35]], 2][195, 163][195, 163]Passed
control [[[1, 195], [2, 163], [1, 196]], 2]NoneNonePassed
control [[[1, 191], [5, 97], [3, 23], [4, 94]], 3][191, 141, 23][191, 141, 23]Passed
control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]NoneNonePassed

SHA-256 / 55e9b179d302203bd94a96bb0c70433850abc62956dcfc8f06eaf964c7e93c5c

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

Case digest / 5f8916289419ce81ee006b7a3d65093ce3ffbad67cf9a85362136a1caf4d3b2f