Stable storage and RRts

Work started from fc8ea8ef, the promoted native runtime. All five worktree lanes are now integrated: the new stable arena/codecs, offset-backed collections, same-tree Store adapter and separate RRts port. Native behavior tests and actual IC upgrade/rollback/workload gates pass. The first stable Heavy16 baseline is 21.03 times the retained control's instructions and needs substantial optimization. Correctness qualification is separate from performance acceptance.

Start with matched Heavy16 results, IC stable-memory costs, Store integration, collections and the RRts placement inventory. The canonical design remains in the whitepaper.

Lane Work
IC costs Verify stable API metering, source/destination page charges and repeated reads/writes against the pinned replica; review measurements throughout.
Allocation One exclusive stable arena, compact metadata, reusable allocations, bounded record codecs and explicit retirement.
Collections Offset-based maps, queues, vectors and payload carriers required by the actual workload.
Store integration Stable records in the existing opaque module tree, scoped services and owner-local upgrades.
RRts Separate rrts/ libraries and canister, preserving RRT behavior and JSON generation while storing durable domain state in stable memory.

Each lane works in a sparse Git worktree. Native RRT remains the control. Do not restore the removed encoded-object engine, introduce local rollback journals or make Store depend on concrete collections.

Initial integration boundary

The implemented first integration uses the existing Store identities and attachments. A stable module's native cell contains a small stable-record descriptor; its domain scalars and collection handles are encoded in stable memory. Collection payloads and nodes also live in stable memory. Transient services, decoded snapshots and copy buffers remain ordinary heap values.

Directory and attachment bookkeeping initially remain retained kernel metadata. The placement inventory must disclose their bytes. This is a stable-domain-state benchmark within the mixed Store, not a heap-independent stable root or an upgrade claim that can discard preserved memory. Moving those kernel anchors requires a separate implementation and qualification decision.

Stable reads cannot lend Rust references directly into their source. Read snapshots and writeback guards must distinguish borrowed descriptors from owning transfers. Decoding or dropping a read snapshot must never reclaim persistent children or write during a query. Replacement, removal and module retirement need explicit, tested ownership semantics.

Measurement

Use the matched Heavy16 workload and limits, with a small smoke run first. Report completed work, complete replicated instructions, latency, stable capacity, heap capacity, stable calls/bytes and page charges where independently observable. Do not equate capacity with live allocation, cycles with instructions, or heap page traces with the complete stable source cost.

The final matched native control is Wasm d24e60873685546bf669165c34d567afa893906ae665f03591532a7646719ac3: 105,190,233,309 instructions and 49 rounds for 19,200 workflows. Stable RRts 3080b0ed4e757855b663193088d3af3232a187310f132937a1e1746bff92dce1 uses 2,211,971,170,483 instructions and 349 rounds for the same completed work. The original promotion control c3346bd1… used 107,757,066,864 / 49; it is historical, not the denominator for the final stable comparison. Keep artifact identity and matched settings explicit rather than silently transferring results.

Keep source receipts and raw measurements compact. Current implementation status, limitations and accepted changes belong in the lane reports and canonical design documents as the work lands.