FAILURE MAP
← Case archive

FA-40126 / Heap invariants / Open access

Fibonacci cascade counts the stopping ancestor without scanning above it · case 01

The bounded fibonacci cascade certificate reports an incorrect visits.

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

ROOT CAUSE

Fibonacci cascade counts the stopping ancestor without scanning above it.

VERIFIED REPAIR

Derive visits using visited under the stated bounded certificate contract.

Unsuccessful approach: The local patch uses len(cut) 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': len(path),
    '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 fixtureActualExpectedOutcome
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': 2}{'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': 1, 'visits': 3}{'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': 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': 3}{'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': 1, 'visits': 4}{'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2}Failed

SHA-256 / b26b1dcd09e520a135f2ad79b02e3c3a820d4e8423037fceb44d39d2cf46c926

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': len(cut),
    '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 fixtureActualExpectedOutcome
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': 0}{'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': 0}{'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': 1, 'visits': 1}{'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': 2, 'visits': 2}{'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': 0}{'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': 1, 'visits': 1}{'cleared': [100], 'cuts': [100], 'new_mark': 1, 'potential_delta': 1, 'promoted_count': 1, 'visits': 2}Failed

SHA-256 / 2f4f0fead3be4c7ba6430c6f2252095c0b343e51e2983161eefec8513d96a088

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

Case digest / 0e9d1fea106b5dc20ffe372c6bd9d98c2151c86c722e09c2b0749d6a1efb720b