Hylix encoded Map/Set removal

Isolated candidate based on encoded insertion commit b5b4cf05429f1b37ae68bd365d70934df2b8582a. Only Map/Set mutation and its tests change. No public API, node layout, capacity, ownership contract, allocator, Store boundary, application behavior or Nyxus implementation changes. This is selected source, with exact-artifact IC workload/lifecycle and actual MAIN integration qualification complete.

Complete Heavy16 metric Encoded-insert control Encoded removal
Instructions 461,760,732,091 391,405,250,500
Complete rounds 78 66
Admission p50 / p95 / max, seconds 27.0 / 37.2 / 40.8 20.4 / 28.8 / 31.8
Receipt p50 / p95 / max, seconds 28.2 / 37.8 / 42.0 22.2 / 29.4 / 33.0
Physical calls 2,415 2,069
Fleet-grown stable capacity, bytes 292,880,384 279,511,040

Frozen source 6f459a30, Wasm 5378df0323beca63…, saves 15.2364% and improves every latency quantile. Heap capacity remains 269,484,032 bytes. All exact work, retry bytes and per-canister quiescence vectors pass, with zero traps/reoffers. Independent review checks 43,639 raw rows, 18 outputs, 606 source/archive rows, matched server/configuration and unchanged-source guards. All five lifecycle gates pass on this exact artifact. Grown capacity is not live allocation, and these results do not imply a per-record layout change: geometry is unchanged. Finished replicated instructions include ordinary maintenance; heap fees are included and their residual is not pure computation. The screen receipt and independent review retain exact evidence. No standalone gains are added.

The recorded control turn attributes 33,738,615 instructions to Map decode_node functions and 4,167,580 to write_node functions. Its trace is truncated and has no dynamic caller attribution, so those totals include other operations and do not estimate a removal-only saving. The source still decoded every live key/value for removal and rewrote unchanged codecs, then decoded the root again to check collapse. That makes removing whole-node materialization a worthwhile candidate to measure; it does not establish an IC improvement.

Removal, predecessor/successor extraction, sibling borrowing and merging now operate on initialized encoded node prefixes. Growth moves children, values, then keys; shrinking moves keys, values, then children. Branch identities are validated as in the previous decoded removal before a node can move. Unchanged key/value/child encodings transfer exactly, including padding, without ownership hooks. Comparisons decode only probed keys; the actual returned row decodes once. An internal leaf visitor moves replacement separators without materializing another owner. Root collapse uses the updated root workspace. Siblings checked for borrowing are reused for a merge instead of reread.

The B-tree keeps the same predecessor, successor, left/right borrowing and left/right merge preference, including restructuring on an unsuccessful remove. Workspace remains bounded by the tree spine and participating sibling nodes, independent of map length. Each scoped provider loan ends before comparisons that read stable key payloads, structural writes or retirement. Normal observing provider methods remain in use; no fast path bypasses wrapper hooks. Public mutation errors trap, including a provider error after partial writes. The IC supplies rollback; native tests restore the complete provider and dependent carrier/ownership ledger. There is no local undo journal or decoded mutation fallback. Retirement still decodes consumed owners; typed bulk construction still encodes converted rows.

Focused native evidence:

  • Three uneven codec geometries (19/37, 53/9 and 17/1537 bytes) run 24,000 modeled mixed operations with reopen, root-key deletion, replacement and first/last/interior removal. The largest geometry has a three-key minimum and crosses segments. A removal decodes only its returned value, encodes no values and performs no structural retain/retire events.
  • Eleven adversarial trees force both leaf and branch rotations, both merge directions, predecessor/successor replacement and absent-key root collapse.
  • 1,024 variable String-key rows own shared Blob payloads of 0..8192 bytes. Deletion verifies exact allocation identity, remaining shared counts and final complete reclamation. A Set model runs another 10,000 mixed operations, exercising its zero-size value plane.
  • Injected errors after the first, second and third structural writes trap; complete image rollback restores every row, count and allocation. Stale generations, short allocations, invalid live children and malformed returned values retain their checked failure paths.
  • A five-row leaf removal uses one 88-byte transient allocation, one scoped provider visit, one value decode, zero value encodes and a 72-byte publication. This is operation-count evidence, not an instruction or latency benchmark.

Native builds source ver1/tools/env.sh (rustc 7df81381d), enable checksum and content freshness, and use MAIN's native target under the native-b lease. SDK Hylix/Collections/Store with working-set-profile: 201 tests pass, including 30 doctests, no failures or ignored tests (build 11.93 seconds). The frozen worktree note originally undercounted docs; raw logs independently confirm 171 native +30 documentation checks. RRts Common/Reactor/Rechain/Takt: 139 tests pass, including five doctests, no failures or ignored tests (build 28.06 seconds). Full locked offline SDK and RRts metadata resolution passed without --no-deps. Logs and metadata are outside the checkout under rrt/tmp/hylix-round2-20261021/encoded-removal/.

This candidate still copies and publishes live node prefixes, so byte movement, workspace allocation and dirty-page charges remain. The full linked workload above determines the measured benefit of eliminating codecs and redundant root/sibling reads. No single collection probe qualifies or rejects Heavy16.

Actual MAIN qualification

Runtime 3e3215de builds Hylix 98597273d34dccd9… and Nyxus 9e826bdce47e1b45… using the original canonical builder and pinned compiler. The MAIN Hylix full run reproduces all instruction, latency, heap-fee, work and grown-memory vectors in the table above. Complete cycle charges differ by −11; exact cycle equality is not claimed. Both actual MAIN artifacts pass all five lifecycle gates. Fresh native checks pass 340 total: SDK 171 native +30 docs, RRts 134 native +5 docs, with all 606 resolved source files unchanged and matching the Git index. Native results are fresh rather than reused candidate results.

Nyxus remains 105,264,785,076 instructions /49 rounds. All 14 audit and 67 workload vectors, all 25,091 complete replicated trace rows (except sequence numbers), and seven supplemental lifecycle vectors match the protected renamed control. This does not claim query-row equality. Hylix admission is 20.4/28.8/31.8s; receipt is 22.2/29.4/33.0s; Nyxus remains 4.8/11.4/18.6s and 4.8/12.6/19.2s, respectively. Capacity remains logical grown bytes, and included heap fees cannot be subtracted to isolate pure computation.

See the current receipt and proof hashes, populated-map mutation tables, and the current experiment assessment. The mutation screen preserves all earlier access/insert measurements exactly at both sizes while improving every new deletion sequence. Its protocol, artifact, server and explicit instruction scopes remain separate from Heavy16.