FA-40116 / Heap invariants / Open access
Fibonacci cascade never marks a root · case 01
The bounded fibonacci cascade certificate reports an incorrect new mark.
ROOT CAUSE
Fibonacci cascade never marks a root.
VERIFIED REPAIR
Derive new mark using marked under the stated bounded certificate contract.
Unsuccessful approach: The local patch uses next((x[0] for x in path if not x[2]),None) 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': path[0][0] if path else None,
'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': 1, 'potential_delta': 0, 'promoted_count': 0, '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': 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': 1, 'potential_delta': 1, 'promoted_count': 1, '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': 1, '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} | 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': 100, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | {'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2} | Failed |
SHA-256 / 4e45dfd36f4ef36acd9f08843b08954b9a9907a942b360268369369a3587f240
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': next((x[0] for x in path if not x[2]),None),
'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': 1, 'potential_delta': 0, 'promoted_count': 0, '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': 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 / 7a388ad24a8844040a39638d8847e1b80b73c2a56bc7568843fe88bf43e53611
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:27.953936+00:00.
Case digest / 60baffb7883a8e26ad98b2a4a16bffc2c547366a67f5d2dea05e814166de3ad5