FA-40816 / Heap invariants / Open access
Indexed erase remaps the tail handle to its new hole · case 01
The bounded indexed erase routing certificate reports an incorrect replacement location.
ROOT CAUSE
Indexed erase remaps the tail handle to its new hole.
THE FAILURE
Indexed erase remaps the tail handle to its new hole.
Unsuccessful approach: The local patch uses None if i==last else [a[i][0],i] and still violates the stated relation.
Case contract
An indexed heap erasure certificate gives slots [id,key], selected slot i, and a valid min-heap prefix before deletion. Fill the hole with the last record unless erasing the tail. Decide upward repair if replacement is smaller than its parent, otherwise downward; return shortened slots, removed id, direction, replacement handle location, retained identities, and logical size.
Why this case matters
This isolates an internal heap representation or priority-structure invariant using deterministic finite records.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['slots']; i=d['index']; last=len(a)-1; out=[list(x) for x in a[:-1]]
if i<last: out[i]=list(a[-1])
direction='none' if i==last else ('up' if i>0 and out[i][1]<out[(i-1)//2][1] else 'down')
return {'slots': out,
'removed': a[i][0],
'direction': direction,
'replacement_location': None if i==last else [a[-1][0],last],
'retained': sorted(x[0] for x in out),
'size': len(a)-1}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 2}, {'slots': [['a', 1], ['b', 2], ['g', 3], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'c', 'direction': 'down', 'replacement_location': ['g', 2], 'retained': ['a', 'b', 'd', 'e', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 2], ['g', 3], ['e', 5], ['f', 2]], 'removed': 'd', 'direction': 'down', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 4}, {'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['g', 3], ['f', 2]], 'removed': 'e', 'direction': 'down', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 5}, {'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['g', 3]], 'removed': 'f', 'direction': 'down', 'replacement_location': ['g', 5], 'retained': ['a', 'b', 'c', 'd', 'e', 'g'], 'size': 6})]][N-1]
check('regression certificate 1', solve(cases[0][0]), cases[0][1])
check('regression certificate 2', solve(cases[1][0]), cases[1][1])
check('regression certificate 3', solve(cases[2][0]), cases[2][1])
check('regression certificate 4', solve(cases[3][0]), cases[3][1])
check('regression certificate 5', solve(cases[4][0]), cases[4][1])
check('regression certificate 6', solve(cases[5][0]), cases[5][1])
check('variant-dependent certificate', solve(cases[6][0]), cases[6][1])
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 certificate 1 | {'direction': 'none', 'removed': 'a', 'replacement_location': None, 'retained': [], 'size': 0, 'slots': []} | {'direction': 'none', 'removed': 'a', 'replacement_location': None, 'retained': [], 'size': 0, 'slots': []} | Passed |
| regression certificate 2 | {'direction': 'up', 'removed': 'e', 'replacement_location': ['g', 6], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]]} | {'direction': 'up', 'removed': 'e', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]]} | Failed |
| regression certificate 3 | {'direction': 'down', 'removed': 'a', 'replacement_location': ['c', 2], 'retained': ['b', 'c'], 'size': 2, 'slots': [['c', 3], ['b', 2]]} | {'direction': 'down', 'removed': 'a', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2, 'slots': [['c', 3], ['b', 2]]} | Failed |
| regression certificate 4 | {'direction': 'none', 'removed': 'd', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3, 'slots': [['a', 1], ['b', 2], ['c', 3]]} | {'direction': 'none', 'removed': 'd', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3, 'slots': [['a', 1], ['b', 2], ['c', 3]]} | Passed |
| regression certificate 5 | {'direction': 'up', 'removed': 'd', 'replacement_location': ['g', 6], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]]} | {'direction': 'up', 'removed': 'd', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]]} | Failed |
| regression certificate 6 | {'direction': 'down', 'removed': 'b', 'replacement_location': ['g', 6], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | {'direction': 'down', 'removed': 'b', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | Failed |
| variant-dependent certificate | {'direction': 'down', 'removed': 'b', 'replacement_location': ['g', 6], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | {'direction': 'down', 'removed': 'b', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | Failed |
SHA-256 / 2718b0753ef4daf59ccc339b121b3acfe18d32d80f24eda70aa0e64cdd282e11
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['slots']; i=d['index']; last=len(a)-1; out=[list(x) for x in a[:-1]]
if i<last: out[i]=list(a[-1])
direction='none' if i==last else ('up' if i>0 and out[i][1]<out[(i-1)//2][1] else 'down')
return {'slots': out,
'removed': a[i][0],
'direction': direction,
'replacement_location': None if i==last else [a[i][0],i],
'retained': sorted(x[0] for x in out),
'size': len(a)-1}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 2}, {'slots': [['a', 1], ['b', 2], ['g', 3], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'c', 'direction': 'down', 'replacement_location': ['g', 2], 'retained': ['a', 'b', 'd', 'e', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 2], ['g', 3], ['e', 5], ['f', 2]], 'removed': 'd', 'direction': 'down', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 4}, {'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['g', 3], ['f', 2]], 'removed': 'e', 'direction': 'down', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6})], [({'slots': [['a', 1]], 'index': 0}, {'slots': [], 'removed': 'a', 'direction': 'none', 'replacement_location': None, 'retained': [], 'size': 0}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 4}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]], 'removed': 'e', 'direction': 'up', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 3]], 'index': 0}, {'slots': [['c', 3], ['b', 2]], 'removed': 'a', 'direction': 'down', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2}), ({'slots': [['a', 1], ['b', 2], ['c', 3], ['d', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 2], ['c', 3]], 'removed': 'd', 'direction': 'none', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3}), ({'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['e', 8], ['f', 3], ['g', 4]], 'index': 3}, {'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]], 'removed': 'd', 'direction': 'up', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 1}, {'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]], 'removed': 'b', 'direction': 'down', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6}), ({'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['f', 2], ['g', 3]], 'index': 5}, {'slots': [['a', 1], ['b', 2], ['c', 2], ['d', 4], ['e', 5], ['g', 3]], 'removed': 'f', 'direction': 'down', 'replacement_location': ['g', 5], 'retained': ['a', 'b', 'c', 'd', 'e', 'g'], 'size': 6})]][N-1]
check('regression certificate 1', solve(cases[0][0]), cases[0][1])
check('regression certificate 2', solve(cases[1][0]), cases[1][1])
check('regression certificate 3', solve(cases[2][0]), cases[2][1])
check('regression certificate 4', solve(cases[3][0]), cases[3][1])
check('regression certificate 5', solve(cases[4][0]), cases[4][1])
check('regression certificate 6', solve(cases[5][0]), cases[5][1])
check('variant-dependent certificate', solve(cases[6][0]), cases[6][1])
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 certificate 1 | {'direction': 'none', 'removed': 'a', 'replacement_location': None, 'retained': [], 'size': 0, 'slots': []} | {'direction': 'none', 'removed': 'a', 'replacement_location': None, 'retained': [], 'size': 0, 'slots': []} | Passed |
| regression certificate 2 | {'direction': 'up', 'removed': 'e', 'replacement_location': ['e', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]]} | {'direction': 'up', 'removed': 'e', 'replacement_location': ['g', 4], 'retained': ['a', 'b', 'c', 'd', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['d', 7], ['g', 4], ['f', 3]]} | Failed |
| regression certificate 3 | {'direction': 'down', 'removed': 'a', 'replacement_location': ['a', 0], 'retained': ['b', 'c'], 'size': 2, 'slots': [['c', 3], ['b', 2]]} | {'direction': 'down', 'removed': 'a', 'replacement_location': ['c', 0], 'retained': ['b', 'c'], 'size': 2, 'slots': [['c', 3], ['b', 2]]} | Failed |
| regression certificate 4 | {'direction': 'none', 'removed': 'd', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3, 'slots': [['a', 1], ['b', 2], ['c', 3]]} | {'direction': 'none', 'removed': 'd', 'replacement_location': None, 'retained': ['a', 'b', 'c'], 'size': 3, 'slots': [['a', 1], ['b', 2], ['c', 3]]} | Passed |
| regression certificate 5 | {'direction': 'up', 'removed': 'd', 'replacement_location': ['d', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]]} | {'direction': 'up', 'removed': 'd', 'replacement_location': ['g', 3], 'retained': ['a', 'b', 'c', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['b', 5], ['c', 2], ['g', 4], ['e', 8], ['f', 3]]} | Failed |
| regression certificate 6 | {'direction': 'down', 'removed': 'b', 'replacement_location': ['b', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | {'direction': 'down', 'removed': 'b', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | Failed |
| variant-dependent certificate | {'direction': 'down', 'removed': 'b', 'replacement_location': ['b', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | {'direction': 'down', 'removed': 'b', 'replacement_location': ['g', 1], 'retained': ['a', 'c', 'd', 'e', 'f', 'g'], 'size': 6, 'slots': [['a', 1], ['g', 3], ['c', 2], ['d', 4], ['e', 5], ['f', 2]]} | Failed |
SHA-256 / ccb53d48995209d0b6c32679b5383bac3680b0cd76a8172082e3527bc24a9645
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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 stipulated offline diagnostic model; it does not implement a production allocator, concurrency protocol, or complete heap library. 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:43:34.827521+00:00.
Case digest / ee15bd27b08e1cd0c0d7a844d3a0be64a5dd0cbf7a97a304b41e325860aea909