FA-40881 / Heap invariants / Open access
Cyclic priority cursor advance handles physical wrap and distinguishes no candidate · case 01
The bounded dial window certificate reports an incorrect advance.
ROOT CAUSE
Cyclic priority cursor advance handles physical wrap and distinguishes no candidate.
THE FAILURE
Cyclic priority cursor advance handles physical wrap and distinguishes no candidate.
Unsuccessful approach: The local patch uses 0 if nxt is None else nxt-cursor and still violates the stated relation.
Case contract
A cyclic integer bucket queue with ring size C stores entries [id,absolute_key]. Cursor is last extracted absolute key. Only keys in [cursor,cursor+C) are in the active window. Report physical bucket indices, expired ids, future-window ids, next active key, rotation distance, and active ids in absolute-key order. Same-slot values from later revolutions must not be delivered.
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):
a=d['entries']; c=d['capacity']; cursor=d['cursor']; active=[x for x in a if cursor<=x[1]<cursor+c]; nxt=min((x[1] for x in active),default=None)
return {'buckets': [[x[0],x[1]%c] for x in a],
'expired': [x[0] for x in a if x[1]<cursor],
'future': [x[0] for x in a if x[1]>=cursor+c],
'next': nxt,
'advance': None if nxt is None else (nxt%c)-(cursor%c),
'active_order': [x[0] for x in sorted(active,key=lambda x:x[1])]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 8, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['c'], 'future': [], 'next': 8, 'advance': 0, 'active_order': ['b', 'a', 'd']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 9, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['b', 'c'], 'future': [], 'next': 9, 'advance': 0, 'active_order': ['a', 'd']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 10, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['a', 'b', 'c'], 'future': [], 'next': 14, 'advance': 4, 'active_order': ['d']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 11, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['a', 'b', 'c'], 'future': [], 'next': 14, 'advance': 3, 'active_order': ['d']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 12, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['a', 'b', 'c'], 'future': [], 'next': 14, 'advance': 2, 'active_order': ['d']})]][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 | {'active_order': [], 'advance': None, 'buckets': [], 'expired': [], 'future': [], 'next': None} | {'active_order': [], 'advance': None, 'buckets': [], 'expired': [], 'future': [], 'next': None} | Passed |
| regression certificate 2 | {'active_order': ['a', 'b'], 'advance': -3, 'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4} | {'active_order': ['a', 'b'], 'advance': 1, 'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4} | Failed |
| regression certificate 3 | {'active_order': ['b', 'a'], 'advance': 1, 'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9} | {'active_order': ['b', 'a'], 'advance': 1, 'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9} | Passed |
| regression certificate 4 | {'active_order': ['c', 'b', 'a'], 'advance': 0, 'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4} | {'active_order': ['c', 'b', 'a'], 'advance': 0, 'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4} | Passed |
| regression certificate 5 | {'active_order': [], 'advance': None, 'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None} | {'active_order': [], 'advance': None, 'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None} | Passed |
| regression certificate 6 | {'active_order': ['c', 'b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7} | {'active_order': ['c', 'b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7} | Passed |
| variant-dependent certificate | {'active_order': ['b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['c'], 'future': [], 'next': 8} | {'active_order': ['b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['c'], 'future': [], 'next': 8} | Passed |
SHA-256 / 8e0bfa1de5167cb2c571f584df9ea6ca730a283d6ca6c1776669f67e56bccf19
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['entries']; c=d['capacity']; cursor=d['cursor']; active=[x for x in a if cursor<=x[1]<cursor+c]; nxt=min((x[1] for x in active),default=None)
return {'buckets': [[x[0],x[1]%c] for x in a],
'expired': [x[0] for x in a if x[1]<cursor],
'future': [x[0] for x in a if x[1]>=cursor+c],
'next': nxt,
'advance': 0 if nxt is None else nxt-cursor,
'active_order': [x[0] for x in sorted(active,key=lambda x:x[1])]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 8, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['c'], 'future': [], 'next': 8, 'advance': 0, 'active_order': ['b', 'a', 'd']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 9, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['b', 'c'], 'future': [], 'next': 9, 'advance': 0, 'active_order': ['a', 'd']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 10, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['a', 'b', 'c'], 'future': [], 'next': 14, 'advance': 4, 'active_order': ['d']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 11, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['a', 'b', 'c'], 'future': [], 'next': 14, 'advance': 3, 'active_order': ['d']})], [({'capacity': 4, 'cursor': 0, 'entries': []}, {'buckets': [], 'expired': [], 'future': [], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 4, 'cursor': 3, 'entries': [['a', 4], ['b', 5], ['c', 7]]}, {'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4, 'advance': 1, 'active_order': ['a', 'b']}), ({'capacity': 5, 'cursor': 8, 'entries': [['a', 12], ['b', 9], ['c', 7], ['d', 13]]}, {'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9, 'advance': 1, 'active_order': ['b', 'a']}), ({'capacity': 3, 'cursor': 4, 'entries': [['a', 6], ['b', 5], ['c', 4]]}, {'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4, 'advance': 0, 'active_order': ['c', 'b', 'a']}), ({'capacity': 4, 'cursor': 6, 'entries': [['a', 10], ['b', 2]]}, {'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None, 'advance': None, 'active_order': []}), ({'capacity': 8, 'cursor': 7, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7, 'advance': 0, 'active_order': ['c', 'b', 'a', 'd']}), ({'capacity': 8, 'cursor': 12, 'entries': [['a', 9], ['b', 8], ['c', 7], ['d', 14]]}, {'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['a', 'b', 'c'], 'future': [], 'next': 14, 'advance': 2, 'active_order': ['d']})]][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 | {'active_order': [], 'advance': 0, 'buckets': [], 'expired': [], 'future': [], 'next': None} | {'active_order': [], 'advance': None, 'buckets': [], 'expired': [], 'future': [], 'next': None} | Failed |
| regression certificate 2 | {'active_order': ['a', 'b'], 'advance': 1, 'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4} | {'active_order': ['a', 'b'], 'advance': 1, 'buckets': [['a', 0], ['b', 1], ['c', 3]], 'expired': [], 'future': ['c'], 'next': 4} | Passed |
| regression certificate 3 | {'active_order': ['b', 'a'], 'advance': 1, 'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9} | {'active_order': ['b', 'a'], 'advance': 1, 'buckets': [['a', 2], ['b', 4], ['c', 2], ['d', 3]], 'expired': ['c'], 'future': ['d'], 'next': 9} | Passed |
| regression certificate 4 | {'active_order': ['c', 'b', 'a'], 'advance': 0, 'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4} | {'active_order': ['c', 'b', 'a'], 'advance': 0, 'buckets': [['a', 0], ['b', 2], ['c', 1]], 'expired': [], 'future': [], 'next': 4} | Passed |
| regression certificate 5 | {'active_order': [], 'advance': 0, 'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None} | {'active_order': [], 'advance': None, 'buckets': [['a', 2], ['b', 2]], 'expired': ['b'], 'future': ['a'], 'next': None} | Failed |
| regression certificate 6 | {'active_order': ['c', 'b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7} | {'active_order': ['c', 'b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': [], 'future': [], 'next': 7} | Passed |
| variant-dependent certificate | {'active_order': ['b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['c'], 'future': [], 'next': 8} | {'active_order': ['b', 'a', 'd'], 'advance': 0, 'buckets': [['a', 1], ['b', 0], ['c', 7], ['d', 6]], 'expired': ['c'], 'future': [], 'next': 8} | Passed |
SHA-256 / 2f819ced1ab3cf88df2f03970e9d143196e4591d3a203bacdc08b9745797d05b
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:35.463761+00:00.
Case digest / d110e7a004612b11b777ff31f560b0dc702f681ab303249933e890ee7c2ae87a