Minima write-path optimization

This round covers every one of the 26 Minima collection families. The write fixture adds 156 complete lifecycles at 1, 32, 256 and 1,024 inputs: mutable updates, incremental progress, or frozen build/replacement, including caller preparation, verification and retirement. Each case has 32 independently awaited measured updates after a warm-up. These are not isolated insert costs.

Baseline production code is e1fae3b6, identical to qualified 53f7b15f apart from documentation. Frozen baseline fcad5cf1 adds the measurement fixture. Final selected source is 2512e70e, built again from Main with the canonical builder. Results contain all families; writes/functions.csv and writes/comparison.json retain every case and positive delta. existing426 separately checks the existing read/mutation/build scenarios and ordinary collection controls.

Selected changes

  • Shared storage borrows acquisition authority, reserves directory capacity once and grows the exact physical extent together. Initialized reuse, live generations, provider identity and rooted ownership remain checked. FixedVec and SlotArena avoid redundant capacity work; BitmapSet adds grouped mutations. Already-owned capacity validates the Root without dispatching another virtual growth call. This last shared fast path removes the intermediate version's repeated no-growth overhead across several sketch families.
  • HLL partitions batches by source page rather than sorting every register. Counting Bloom stages bounded small-batch block images with global preflight; Cuckoo insertion tries its narrow primary bucket first at low load.
  • Memento edits decode one quotient payload and relocate its displacement cluster. Compact metadata is still scanned globally. check_integrity owns explicit full-payload validation; normal edits no longer inspect unrelated payload corruption. Memento and Aeris batches stage input-order outcomes and publish once, retaining per-input admission and exact backing rules.
  • OmniSketch transfers active cell bytes and writes only its changed sample prefix or count. DDSketch coalesces adjacent counter writes and avoids redundant encoding during merge.
  • Ribbon and PHOBIC commit verified encoded blocks directly. Rateless imports append fixed slices. Graph ingestion avoids durably writing a suffix that is immediately consumed by a full-buffer flush. Range publishers omit only invariant-zero gaps; Breadcrumb skips an unchanged primary on overflow.

Frozen hash/sorted indexes, prefix sums, binary fuse, ZOR, Count-Min, SetSketch, QSketch and ExaLogLog also receive write coverage. Their algorithms are not all changed or improved by this round; shared-allocation effects and unchanged or slower complete endpoints remain visible. Native tests cover extra parameter and failure cases; measured variants do not qualify every configuration. The Breadcrumb overflow skip was not exercised by the measured fixture's low bucket occupancy and has no separate measured performance claim.

Rejected and deferred ideas

The initial combined candidate d524ceb0 made SetSketch, QSketch and ExaLogLog track narrower changed spans. Complete write pipelines regressed, so their original kernels remain. A fresh-Bloom read shortcut saved one initial read but made repeated insertion more expensive; it was excluded. These are selections from matched complete endpoints, not isolated causal attribution to each loop. See rejected spans and the explicitly partial 131-row screen. Initial C's separate 426-case comparison is historical and is not final Main qualification.

The complete intermediate f8c8d2fa round remains under intermediate/main-v2. Its 156 write cases had 127 reductions and 29 increases. Several untouched sketch kernels shared an input-count-proportional regression: moving every ensure_nodes call through virtual grow_collection added work even when capacity was already owned. The selected no-growth fast path was checked with an instrumented provider and fresh full IC cohorts; it reduces the write regressions to eight, at most 0.161%.

A one-write 64 KiB reused-block clear passed focused native tests but received no actual IC qualification and was not selected. It saves only 15 fixed write overheads at equal byte count and can acquire another heap source region. Existing sixteen-node clearing remains. This is a deferred experiment, not a compatibility path.

Accounting, safety and failed attempts

Pinned PocketIC is 16.1.0, SHA 2e1dae35a83d8169533630c06fb0a7cb4086f71fa10fa60a5fd4137ea5f3672f. The IC source review and peer review distinguish current replica source from that measured binary. Effective scheduler configuration is followed through the Hypervisor override; the standalone embedder default is insufficient. Repeated writes share page-admission bookkeeping within an execution while still paying API/copy work. Each fresh execution resets tracking.

The first baseline and C 144-case runs stopped after 131 rows: a large Aeris ingress had a discarded DTS attempt with unavailable memory ranges. Its complete instruction counter existed, but the original host demanded 32 physical executions and lost that row's replies when rejecting the retry trajectory. Those runs remain failed, not repaired into PASS. The recorder now saves replies before parsing and groups attempts by logical ingress. Complete instructions and known page counters include discarded work; committed ranges are mandatory, missing discarded ranges remain explicit. The corrected baseline 144 run is preserved separately. Expansion to 156 cases required fresh matched cohorts.

An initial final-Main build/native fixture compile caught an undefined local identifier in the new bitmap benchmark. The two-line correction is f8c8d2fa; the failed build produced no qualified guest. Its logs remain. Native library and existing-fixture suites passed 396 tests with one ignored test; the corrected write fixture separately passed three tests. Do not describe the initial command, which exited 101, as a successful full run. The final fast-path library screen passes 386 tests with one ignored test; unchanged existing fixture tests and the final Main write-fixture rerun make a 400-test union, with sources/runs separated in the native summary.

Mutation backend failures trap for IC rollback. Native tests compare exact payloads and per-input outcomes with scalar models, including Full followed by a later admissible compressed insertion, foreign roots, stale slots, overflow, allocation failure and late write failure. Actual fixture lifecycle checks cover stable-marker trap rollback, KEEP, contract rejection and continued writes. The new Bitmap/Memento/Aeris batch scenarios perform equivalent logical work but move positive probes before deletion; intermediate I/O order differs.

The runtime dependency proof reuses unchanged RRT/Nyxus/Hylix qualification by exact dependency trees and installed artifact pins; no Heavy workload is inferred from a Minima average. Host timings from concurrent suites do not establish application latency.

Evidence

Evidence owns compact raw captures, receipts, source patches, test logs, omissions and checksums. Old qualified controls are referenced by hash rather than repackaged. Current API documentation belongs in Minima and the collection crate. render.py regenerates the report and CSV from the saved matched comparison.

Status: selected 156-case write and 426-case existing comparisons, independent raw audits and lifecycle checks PASS. Compact evidence and its independent stored-member verification are complete.