FAILURE MAP
← Case archive

FA-41166 / Heap invariants / Open access

Persistent meld reuses the untouched terminal subtree across snapshots · case 01

The bounded persistent meld reuse certificate reports an incorrect terminal.

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

ROOT CAUSE

Persistent meld reuses the untouched terminal subtree across snapshots.

THE FAILURE

Persistent meld reuses the untouched terminal subtree across snapshots.

Unsuccessful approach: The local patch uses None and still violates the stated relation.

Case contract

A persistent meld recursion trace lists winner nodes visited and one terminal untouched subtree id (or None), with fresh generation g. Rebuild only visited winners during unwind in reverse visitation order and share the terminal subtree. Return allocation order, shared terminal reference, reconstructed links, new root, allocation count, and original snapshot ids unchanged. This is a path-copy trace, not a complete heap algorithm.

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):
    v=d['visited']; terminal=d['terminal']; g=d['generation']; order=list(reversed(v))
    return {'alloc_order': order,
    'terminal': None if terminal is None else [terminal,g],
    'links': [[v[i],v[i+1] if i+1<len(v) else terminal] for i in range(len(v))],
    'root': v[0] if v else terminal,
    'allocation_count': len(v),
    'old_snapshot': d["old_ids"]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100]}, {'alloc_order': [100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 10]], 'root': 2, 'allocation_count': 5, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101]}, {'alloc_order': [101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 10]], 'root': 2, 'allocation_count': 6, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101, 102], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101, 102]}, {'alloc_order': [102, 101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 102], [102, 10]], 'root': 2, 'allocation_count': 7, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101, 102]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101, 102, 103], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103]}, {'alloc_order': [103, 102, 101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 102], [102, 103], [103, 10]], 'root': 2, 'allocation_count': 8, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101, 102, 103, 104], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103, 104]}, {'alloc_order': [104, 103, 102, 101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 102], [102, 103], [103, 104], [104, 10]], 'root': 2, 'allocation_count': 9, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103, 104]})]][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 fixtureActualExpectedOutcome
regression certificate 1{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [], 'root': None, 'terminal': None}{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [], 'root': None, 'terminal': None}Passed
regression certificate 2{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [3, 4], 'root': 3, 'terminal': [3, 7]}{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [3, 4], 'root': 3, 'terminal': [3, 'shared']}Failed
regression certificate 3{'alloc_order': [1], 'allocation_count': 1, 'links': [[1, 2]], 'old_snapshot': [1, 2, 3], 'root': 1, 'terminal': [2, 7]}{'alloc_order': [1], 'allocation_count': 1, 'links': [[1, 2]], 'old_snapshot': [1, 2, 3], 'root': 1, 'terminal': [2, 'shared']}Failed
regression certificate 4{'alloc_order': [7, 4, 1], 'allocation_count': 3, 'links': [[1, 4], [4, 7], [7, 9]], 'old_snapshot': [1, 2, 4, 7, 9], 'root': 1, 'terminal': [9, 7]}{'alloc_order': [7, 4, 1], 'allocation_count': 3, 'links': [[1, 4], [4, 7], [7, 9]], 'old_snapshot': [1, 2, 4, 7, 9], 'root': 1, 'terminal': [9, 'shared']}Failed
regression certificate 5{'alloc_order': [3, 8], 'allocation_count': 2, 'links': [[8, 3], [3, None]], 'old_snapshot': [8, 3], 'root': 8, 'terminal': None}{'alloc_order': [3, 8], 'allocation_count': 2, 'links': [[8, 3], [3, None]], 'old_snapshot': [8, 3], 'root': 8, 'terminal': None}Passed
regression certificate 6{'alloc_order': [6, 9, 5, 2], 'allocation_count': 4, 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11], 'root': 2, 'terminal': [10, 7]}{'alloc_order': [6, 9, 5, 2], 'allocation_count': 4, 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11], 'root': 2, 'terminal': [10, 'shared']}Failed
variant-dependent certificate{'alloc_order': [100, 6, 9, 5, 2], 'allocation_count': 5, 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11, 100], 'root': 2, 'terminal': [10, 7]}{'alloc_order': [100, 6, 9, 5, 2], 'allocation_count': 5, 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11, 100], 'root': 2, 'terminal': [10, 'shared']}Failed

SHA-256 / 2a830b08be53f82531d64ac05eab8899384a38b297b9c290007096b5ffaa48b6

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    v=d['visited']; terminal=d['terminal']; g=d['generation']; order=list(reversed(v))
    return {'alloc_order': order,
    'terminal': None,
    'links': [[v[i],v[i+1] if i+1<len(v) else terminal] for i in range(len(v))],
    'root': v[0] if v else terminal,
    'allocation_count': len(v),
    'old_snapshot': d["old_ids"]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100]}, {'alloc_order': [100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 10]], 'root': 2, 'allocation_count': 5, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101]}, {'alloc_order': [101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 10]], 'root': 2, 'allocation_count': 6, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101, 102], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101, 102]}, {'alloc_order': [102, 101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 102], [102, 10]], 'root': 2, 'allocation_count': 7, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101, 102]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101, 102, 103], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103]}, {'alloc_order': [103, 102, 101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 102], [102, 103], [103, 10]], 'root': 2, 'allocation_count': 8, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103]})], [({'visited': [], 'terminal': None, 'generation': 7, 'old_ids': []}, {'alloc_order': [], 'terminal': None, 'links': [], 'root': None, 'allocation_count': 0, 'old_snapshot': []}), ({'visited': [], 'terminal': 3, 'generation': 7, 'old_ids': [3, 4]}, {'alloc_order': [], 'terminal': [3, 'shared'], 'links': [], 'root': 3, 'allocation_count': 0, 'old_snapshot': [3, 4]}), ({'visited': [1], 'terminal': 2, 'generation': 7, 'old_ids': [1, 2, 3]}, {'alloc_order': [1], 'terminal': [2, 'shared'], 'links': [[1, 2]], 'root': 1, 'allocation_count': 1, 'old_snapshot': [1, 2, 3]}), ({'visited': [1, 4, 7], 'terminal': 9, 'generation': 7, 'old_ids': [1, 2, 4, 7, 9]}, {'alloc_order': [7, 4, 1], 'terminal': [9, 'shared'], 'links': [[1, 4], [4, 7], [7, 9]], 'root': 1, 'allocation_count': 3, 'old_snapshot': [1, 2, 4, 7, 9]}), ({'visited': [8, 3], 'terminal': None, 'generation': 7, 'old_ids': [8, 3]}, {'alloc_order': [3, 8], 'terminal': None, 'links': [[8, 3], [3, None]], 'root': 8, 'allocation_count': 2, 'old_snapshot': [8, 3]}), ({'visited': [2, 5, 9, 6], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11]}, {'alloc_order': [6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'root': 2, 'allocation_count': 4, 'old_snapshot': [2, 5, 9, 6, 10, 11]}), ({'visited': [2, 5, 9, 6, 100, 101, 102, 103, 104], 'terminal': 10, 'generation': 7, 'old_ids': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103, 104]}, {'alloc_order': [104, 103, 102, 101, 100, 6, 9, 5, 2], 'terminal': [10, 'shared'], 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 101], [101, 102], [102, 103], [103, 104], [104, 10]], 'root': 2, 'allocation_count': 9, 'old_snapshot': [2, 5, 9, 6, 10, 11, 100, 101, 102, 103, 104]})]][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 fixtureActualExpectedOutcome
regression certificate 1{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [], 'root': None, 'terminal': None}{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [], 'root': None, 'terminal': None}Passed
regression certificate 2{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [3, 4], 'root': 3, 'terminal': None}{'alloc_order': [], 'allocation_count': 0, 'links': [], 'old_snapshot': [3, 4], 'root': 3, 'terminal': [3, 'shared']}Failed
regression certificate 3{'alloc_order': [1], 'allocation_count': 1, 'links': [[1, 2]], 'old_snapshot': [1, 2, 3], 'root': 1, 'terminal': None}{'alloc_order': [1], 'allocation_count': 1, 'links': [[1, 2]], 'old_snapshot': [1, 2, 3], 'root': 1, 'terminal': [2, 'shared']}Failed
regression certificate 4{'alloc_order': [7, 4, 1], 'allocation_count': 3, 'links': [[1, 4], [4, 7], [7, 9]], 'old_snapshot': [1, 2, 4, 7, 9], 'root': 1, 'terminal': None}{'alloc_order': [7, 4, 1], 'allocation_count': 3, 'links': [[1, 4], [4, 7], [7, 9]], 'old_snapshot': [1, 2, 4, 7, 9], 'root': 1, 'terminal': [9, 'shared']}Failed
regression certificate 5{'alloc_order': [3, 8], 'allocation_count': 2, 'links': [[8, 3], [3, None]], 'old_snapshot': [8, 3], 'root': 8, 'terminal': None}{'alloc_order': [3, 8], 'allocation_count': 2, 'links': [[8, 3], [3, None]], 'old_snapshot': [8, 3], 'root': 8, 'terminal': None}Passed
regression certificate 6{'alloc_order': [6, 9, 5, 2], 'allocation_count': 4, 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11], 'root': 2, 'terminal': None}{'alloc_order': [6, 9, 5, 2], 'allocation_count': 4, 'links': [[2, 5], [5, 9], [9, 6], [6, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11], 'root': 2, 'terminal': [10, 'shared']}Failed
variant-dependent certificate{'alloc_order': [100, 6, 9, 5, 2], 'allocation_count': 5, 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11, 100], 'root': 2, 'terminal': None}{'alloc_order': [100, 6, 9, 5, 2], 'allocation_count': 5, 'links': [[2, 5], [5, 9], [9, 6], [6, 100], [100, 10]], 'old_snapshot': [2, 5, 9, 6, 10, 11, 100], 'root': 2, 'terminal': [10, 'shared']}Failed

SHA-256 / b83faa53cfb6b167391a8801966af5c14aa944a54b34cf02187e0ffd4e3d98cb

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

Case digest / 21172bbd10be817b10b5eb41210105de8213615805c0ef3b8c8f967b40435d81