FA-41221 / Heap invariants / Open access
Pointer heap traversal follows breadth-first links rather than allocation order · case 01
The bounded complete tree certificate certificate reports an incorrect visits.
ROOT CAUSE
Pointer heap traversal follows breadth-first links rather than allocation order.
THE FAILURE
Pointer heap traversal follows breadth-first links rather than allocation order.
Unsuccessful approach: The local patch uses list(reversed(seen)) and still violates the stated relation.
Case contract
A bounded binary pointer-tree certificate gives node records [id,left_id,right_id], root id or None; references name existing nodes or None. Breadth-first traversal stops expanding previously seen ids. Assign conceptual heap indices root=0,left=2i+1,right=2i+2. Report visit ids, unreachable ids, shared/cyclic references encountered, completeness (unique indices 0..n-1 and all nodes reached without repeats), right-only parents, and parent multiplicities.
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):
nodes={x[0]:x[1:] for x in d['nodes']}; root=d['root']; todo=[] if root is None else [(root,0)]; seen=[]; indices=[]; repeated=[]
while todo:
v,k=todo.pop(0)
if v in seen:
repeated.append(v); continue
seen.append(v); indices.append(k)
for offset,child in enumerate(nodes[v],1):
if child is not None: todo.append((child,2*k+offset))
return {'visits': list(nodes),
'unreachable': sorted(set(nodes)-set(seen)),
'repeated': repeated,
'complete': not repeated and len(seen)==len(nodes) and sorted(indices)==list(range(len(nodes))),
'right_only': [v for v,(l,r) in nodes.items() if l is None and r is not None],
'incoming': {v:sum(v==c for pair in nodes.values() for c in pair) for v in nodes}}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None], ['102', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101', '102'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0, '102': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None], ['102', None, None], ['103', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101', '102', '103'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0, '102': 0, '103': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None], ['102', None, None], ['103', None, None], ['104', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101', '102', '103', '104'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0, '102': 0, '103': 0, '104': 0}})]][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 | {'complete': True, 'incoming': {}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': []} | {'complete': True, 'incoming': {}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': []} | Passed |
| regression certificate 2 | {'complete': True, 'incoming': {'a': 0}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['a']} | {'complete': True, 'incoming': {'a': 0}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['a']} | Passed |
| regression certificate 3 | {'complete': True, 'incoming': {'a': 0, 'b': 1, 'c': 1}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['c', 'a', 'b']} | {'complete': True, 'incoming': {'a': 0, 'b': 1, 'c': 1}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['a', 'b', 'c']} | Failed |
| regression certificate 4 | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 0}, 'repeated': [], 'right_only': ['a'], 'unreachable': ['c'], 'visits': ['a', 'b', 'c']} | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 0}, 'repeated': [], 'right_only': ['a'], 'unreachable': ['c'], 'visits': ['a', 'b']} | Failed |
| regression certificate 5 | {'complete': False, 'incoming': {'a': 2, 'b': 2}, 'repeated': ['b', 'a', 'a'], 'right_only': [], 'unreachable': [], 'visits': ['a', 'b']} | {'complete': False, 'incoming': {'a': 2, 'b': 2}, 'repeated': ['b', 'a', 'a'], 'right_only': [], 'unreachable': [], 'visits': ['a', 'b']} | Passed |
| regression certificate 6 | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': [], 'visits': ['a', 'b', 'c', 'd']} | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': [], 'visits': ['a', 'b', 'c', 'd']} | Passed |
| variant-dependent certificate | {'complete': False, 'incoming': {'100': 0, 'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': ['100'], 'visits': ['a', 'b', 'c', 'd', '100']} | {'complete': False, 'incoming': {'100': 0, 'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': ['100'], 'visits': ['a', 'b', 'c', 'd']} | Failed |
SHA-256 / 589dec4906774368867ba9672ed3a0c2c82428860a8eb4e888c8f5a691a38179
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
nodes={x[0]:x[1:] for x in d['nodes']}; root=d['root']; todo=[] if root is None else [(root,0)]; seen=[]; indices=[]; repeated=[]
while todo:
v,k=todo.pop(0)
if v in seen:
repeated.append(v); continue
seen.append(v); indices.append(k)
for offset,child in enumerate(nodes[v],1):
if child is not None: todo.append((child,2*k+offset))
return {'visits': list(reversed(seen)),
'unreachable': sorted(set(nodes)-set(seen)),
'repeated': repeated,
'complete': not repeated and len(seen)==len(nodes) and sorted(indices)==list(range(len(nodes))),
'right_only': [v for v,(l,r) in nodes.items() if l is None and r is not None],
'incoming': {v:sum(v==c for pair in nodes.values() for c in pair) for v in nodes}}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None], ['102', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101', '102'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0, '102': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None], ['102', None, None], ['103', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101', '102', '103'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0, '102': 0, '103': 0}})], [({'nodes': [], 'root': None}, {'visits': [], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {}}), ({'nodes': [['a', None, None]], 'root': 'a'}, {'visits': ['a'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'a': 0}}), ({'nodes': [['c', None, None], ['a', 'b', 'c'], ['b', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c'], 'unreachable': [], 'repeated': [], 'complete': True, 'right_only': [], 'incoming': {'c': 1, 'a': 0, 'b': 1}}), ({'nodes': [['a', None, 'b'], ['b', None, None], ['c', None, None]], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': ['c'], 'repeated': [], 'complete': False, 'right_only': ['a'], 'incoming': {'a': 0, 'b': 1, 'c': 0}}), ({'nodes': [['a', 'b', 'b'], ['b', 'a', 'a']], 'root': 'a'}, {'visits': ['a', 'b'], 'unreachable': [], 'repeated': ['b', 'a', 'a'], 'complete': False, 'right_only': [], 'incoming': {'a': 2, 'b': 2}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': [], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}}), ({'nodes': [['a', 'b', 'c'], ['b', None, 'd'], ['c', None, None], ['d', None, None], ['100', None, None], ['101', None, None], ['102', None, None], ['103', None, None], ['104', None, None]], 'root': 'a'}, {'visits': ['a', 'b', 'c', 'd'], 'unreachable': ['100', '101', '102', '103', '104'], 'repeated': [], 'complete': False, 'right_only': ['b'], 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1, '100': 0, '101': 0, '102': 0, '103': 0, '104': 0}})]][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 | {'complete': True, 'incoming': {}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': []} | {'complete': True, 'incoming': {}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': []} | Passed |
| regression certificate 2 | {'complete': True, 'incoming': {'a': 0}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['a']} | {'complete': True, 'incoming': {'a': 0}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['a']} | Passed |
| regression certificate 3 | {'complete': True, 'incoming': {'a': 0, 'b': 1, 'c': 1}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['c', 'b', 'a']} | {'complete': True, 'incoming': {'a': 0, 'b': 1, 'c': 1}, 'repeated': [], 'right_only': [], 'unreachable': [], 'visits': ['a', 'b', 'c']} | Failed |
| regression certificate 4 | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 0}, 'repeated': [], 'right_only': ['a'], 'unreachable': ['c'], 'visits': ['b', 'a']} | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 0}, 'repeated': [], 'right_only': ['a'], 'unreachable': ['c'], 'visits': ['a', 'b']} | Failed |
| regression certificate 5 | {'complete': False, 'incoming': {'a': 2, 'b': 2}, 'repeated': ['b', 'a', 'a'], 'right_only': [], 'unreachable': [], 'visits': ['b', 'a']} | {'complete': False, 'incoming': {'a': 2, 'b': 2}, 'repeated': ['b', 'a', 'a'], 'right_only': [], 'unreachable': [], 'visits': ['a', 'b']} | Failed |
| regression certificate 6 | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': [], 'visits': ['d', 'c', 'b', 'a']} | {'complete': False, 'incoming': {'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': [], 'visits': ['a', 'b', 'c', 'd']} | Failed |
| variant-dependent certificate | {'complete': False, 'incoming': {'100': 0, 'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': ['100'], 'visits': ['d', 'c', 'b', 'a']} | {'complete': False, 'incoming': {'100': 0, 'a': 0, 'b': 1, 'c': 1, 'd': 1}, 'repeated': [], 'right_only': ['b'], 'unreachable': ['100'], 'visits': ['a', 'b', 'c', 'd']} | Failed |
SHA-256 / 5a688e8252dd74fd4302a6b622bd0599a23806eba82035f63fae595c43a45d04
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:39.027161+00:00.
Case digest / 08e3e46e6fdae66ebd99a916d29a3a916cd44ab51e3010f099363383befdb357