You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(mempool): stop choosing test subjects out of a HashMap
`Mempool::by_txid` is a `HashMap`, so its iteration order is randomized per
process. Two of the tests added with the incremental metadata refresh picked
their subject out of it — `victims.get(3)` and `by_txid.keys().next()` — and so
removed or bumped a different transaction on every run.
That made the mutation audit unsound rather than merely noisy. Rebuilding the
"a removal takes its closure after the removal" mutant and running the test
binary 60 times put the removal equivalence test at 36 red out of 60: the row
recorded as a kill was a coin flip that had landed the right way.
Every subject is now addressed by entry id, which is the slab index and so
follows insertion order, and the removal test removes each of the six fixture
entries in turn instead of one. Re-audited at 40 executions per mutant, every
removal-side row is 40/40 red and the baseline 0/40.
The exhaustive sweep also reaches a shape no single chosen victim could: removing
`leaf` takes the fan-in `joined` with it while `sibling` — `joined`s other parent
— survives and has to drop it from its descendant totals.
Adds `eviction_during_insertion_leaves_metadata_a_rebuild_agrees_with` for the
other gap the pass found. `enforce_size_limit` is a `remove_entries` caller
reached from inside `insert_entry`, removing packages the caller never named, and
nothing drove the refresh through it. It now kills both the forgets-ancestors and
the skips-the-reindex mutations.
No production code changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments