FA-40131 / Heap invariants / Open access
Fibonacci cascade promotes marked nonroots only · case 01
The bounded fibonacci cascade certificate reports an incorrect promoted count.
ROOT CAUSE
Fibonacci cascade promotes marked nonroots only.
VERIFIED REPAIR
Derive promoted count using len(cut) under the stated bounded certificate contract.
Unsuccessful approach: The local patch uses max(0,len(cut)-1) and still violates the stated relation.
Case contract
A cascading-cut path runs from the parent of an initially cut node upward as [id,is_root,marked]. Stop at a root or first unmarked nonroot; mark that first unmarked node. Previously marked nonroots are cut and unmarked. Report cut ids, marked stop, cleared ids, visited count, promoted count, and potential change roots+2*marks.
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):
path=d['path']; cut=[]; marked=None; visited=0
for ident,root,mark in path:
visited+=1
if root: break
if not mark:
marked=ident; break
cut.append(ident)
return {'cuts': cut,
'new_mark': marked,
'cleared': cut,
'visits': visited,
'promoted_count': visited,
'potential_delta': -len(cut)+(2 if marked is not None else 0)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100], 'new_mark': 1, 'cleared': [100], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101], 'new_mark': 1, 'cleared': [100, 101], 'visits': 3, 'promoted_count': 2, 'potential_delta': 0})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102], 'new_mark': 1, 'cleared': [100, 101, 102], 'visits': 4, 'promoted_count': 3, 'potential_delta': -1})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [103, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102, 103], 'new_mark': 1, 'cleared': [100, 101, 102, 103], 'visits': 5, 'promoted_count': 4, 'potential_delta': -2})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [103, False, True], [104, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102, 103, 104], 'new_mark': 1, 'cleared': [100, 101, 102, 103, 104], 'visits': 6, 'promoted_count': 5, 'potential_delta': -3})]][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 | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 0} | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 0} | Passed |
| regression certificate 2 | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 1, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 1} | Failed |
| regression certificate 3 | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 1, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | Failed |
| regression certificate 4 | {'cleared': [1], 'cuts': [1], 'new_mark': 2, 'potential_delta': 1, 'promoted_count': 2, 'visits': 2} | {'cleared': [1], 'cuts': [1], 'new_mark': 2, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | Failed |
| regression certificate 5 | {'cleared': [1, 2], 'cuts': [1, 2], 'new_mark': None, 'potential_delta': -2, 'promoted_count': 3, 'visits': 3} | {'cleared': [1, 2], 'cuts': [1, 2], 'new_mark': None, 'potential_delta': -2, 'promoted_count': 2, 'visits': 3} | Failed |
| regression certificate 6 | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 1, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | Failed |
| variant-dependent certificate | {'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 2, 'visits': 2} | {'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | Failed |
SHA-256 / e3fef2a220b9c51435b353b3bc798b02fd239a6f7b851c97f3b61f13f2a1cc79
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
path=d['path']; cut=[]; marked=None; visited=0
for ident,root,mark in path:
visited+=1
if root: break
if not mark:
marked=ident; break
cut.append(ident)
return {'cuts': cut,
'new_mark': marked,
'cleared': cut,
'visits': visited,
'promoted_count': max(0,len(cut)-1),
'potential_delta': -len(cut)+(2 if marked is not None else 0)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100], 'new_mark': 1, 'cleared': [100], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101], 'new_mark': 1, 'cleared': [100, 101], 'visits': 3, 'promoted_count': 2, 'potential_delta': 0})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102], 'new_mark': 1, 'cleared': [100, 101, 102], 'visits': 4, 'promoted_count': 3, 'potential_delta': -1})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [103, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102, 103], 'new_mark': 1, 'cleared': [100, 101, 102, 103], 'visits': 5, 'promoted_count': 4, 'potential_delta': -2})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [103, False, True], [104, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102, 103, 104], 'new_mark': 1, 'cleared': [100, 101, 102, 103, 104], 'visits': 6, 'promoted_count': 5, 'potential_delta': -3})]][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 | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 0} | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 0} | Passed |
| regression certificate 2 | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 1} | Passed |
| regression certificate 3 | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | Passed |
| regression certificate 4 | {'cleared': [1], 'cuts': [1], 'new_mark': 2, 'potential_delta': 1, 'promoted_count': 0, 'visits': 2} | {'cleared': [1], 'cuts': [1], 'new_mark': 2, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | Failed |
| regression certificate 5 | {'cleared': [1, 2], 'cuts': [1, 2], 'new_mark': None, 'potential_delta': -2, 'promoted_count': 1, 'visits': 3} | {'cleared': [1, 2], 'cuts': [1, 2], 'new_mark': None, 'potential_delta': -2, 'promoted_count': 2, 'visits': 3} | Failed |
| regression certificate 6 | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | Passed |
| variant-dependent certificate | {'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 0, 'visits': 2} | {'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | Failed |
SHA-256 / f553fa49d3f18711303fddcb4694d36bbb1d74e4bcb674e0020002617b24d12f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
path=d['path']; cut=[]; marked=None; visited=0
for ident,root,mark in path:
visited+=1
if root: break
if not mark:
marked=ident; break
cut.append(ident)
return {'cuts': cut,
'new_mark': marked,
'cleared': cut,
'visits': visited,
'promoted_count': len(cut),
'potential_delta': -len(cut)+(2 if marked is not None else 0)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100], 'new_mark': 1, 'cleared': [100], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101], 'new_mark': 1, 'cleared': [100, 101], 'visits': 3, 'promoted_count': 2, 'potential_delta': 0})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102], 'new_mark': 1, 'cleared': [100, 101, 102], 'visits': 4, 'promoted_count': 3, 'potential_delta': -1})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [103, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102, 103], 'new_mark': 1, 'cleared': [100, 101, 102, 103], 'visits': 5, 'promoted_count': 4, 'potential_delta': -2})], [({'path': []}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 0, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, True, False]]}, {'cuts': [], 'new_mark': None, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 0}), ({'path': [[1, False, False], [2, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[1, False, True], [2, False, False], [3, True, False]]}, {'cuts': [1], 'new_mark': 2, 'cleared': [1], 'visits': 2, 'promoted_count': 1, 'potential_delta': 1}), ({'path': [[1, False, True], [2, False, True], [3, True, True]]}, {'cuts': [1, 2], 'new_mark': None, 'cleared': [1, 2], 'visits': 3, 'promoted_count': 2, 'potential_delta': -2}), ({'path': [[1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [], 'new_mark': 1, 'cleared': [], 'visits': 1, 'promoted_count': 0, 'potential_delta': 2}), ({'path': [[100, False, True], [101, False, True], [102, False, True], [103, False, True], [104, False, True], [1, False, False], [2, False, True], [3, True, False]]}, {'cuts': [100, 101, 102, 103, 104], 'new_mark': 1, 'cleared': [100, 101, 102, 103, 104], 'visits': 6, 'promoted_count': 5, 'potential_delta': -3})]][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 | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 0} | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 0} | Passed |
| regression certificate 2 | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': None, 'potential_delta': 0, 'promoted_count': 0, 'visits': 1} | Passed |
| regression certificate 3 | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | Passed |
| regression certificate 4 | {'cleared': [1], 'cuts': [1], 'new_mark': 2, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | {'cleared': [1], 'cuts': [1], 'new_mark': 2, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | Passed |
| regression certificate 5 | {'cleared': [1, 2], 'cuts': [1, 2], 'new_mark': None, 'potential_delta': -2, 'promoted_count': 2, 'visits': 3} | {'cleared': [1, 2], 'cuts': [1, 2], 'new_mark': None, 'potential_delta': -2, 'promoted_count': 2, 'visits': 3} | Passed |
| regression certificate 6 | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | {'cleared': [], 'cuts': [], 'new_mark': 1, 'potential_delta': 2, 'promoted_count': 0, 'visits': 1} | Passed |
| variant-dependent certificate | {'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | {'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | Passed |
SHA-256 / 15183309fd430843642addc1c99f2c27d3d08ab56e3199c77099b6e7258ca008
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:28.030984+00:00.
Case digest / 8339738b12e9f7b6d856846d40f456470deede353fdd67eb73bea6cd54a51319