FA-40809 / Heap invariants / Member archive
Indexed erase invalidates the selected handle instead of the moved tail handle · case 04
The bounded indexed erase routing certificate reports an incorrect removed.
Case contract
An indexed heap erasure certificate gives slots [id,key], selected slot i, and a valid min-heap prefix before deletion. Fill the hole with the last record unless erasing the tail. Decide upward repair if replacement is smaller than its parent, otherwise downward; return shortened slots, removed id, direction, replacement handle location, retained identities, and logical size.
Why this case matters
This isolates an internal heap representation or priority-structure invariant using deterministic finite records.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression certificate 2 | {"direction": "up", "removed": "g", "replacement_location": ["g", 4], "retained": ["a", "b", "c", "d", "f", "g"], "size": 6, "slots": [["a", 1], ["b", 5], ["c", 2], ["d", 7], ["g", 4], ["f", 3]]} | {"direction": "up", "removed": "e", "replacement_location": ["g", 4], "retained": ["a", "b", "c", "d", "f", "g"], "size": 6, "slots": [["a", 1], ["b", 5], ["c", 2], ["d", 7], ["g", 4], ["f", 3]]} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗