Community tool library across a packaged SDK upgrade

The same populated PocketIC canister ran V1 → V2 → V3 → V2. V2 added loan renewal and batch slips under the installed 0.1.0 lock. V3 kept V2's seven Rust files byte-for-byte and moved 24 SDK packages and their tools to a local 0.1.1 release. The raw release trapped. With twelve exact provisional aliases, the qualifier passed its native pair gate and all eight installed checks. A clean server repeated the sequence with the original clients.

Installed circulation

A private versioned Nyxus owner holds the Minima root, a SlotArena<(u32,u64,u32)> for asset, card and due day, and a BitmapSet for availability. The typed root pins that child version. The service releases its sole provider at teardown and reopens the retained root on restore. The controller operates the desk. Anyone can page availability. A checkout token names a slot and generation within this library.

V1 started with 256 tools. The original client checked out assets 1–144, returned every third asset, then checked out 145–176. This left 128 active loans across two slot nodes, 128 available assets, 48 stale tickets and 16 slots on the free list. A host model predicted every allocation's slot and generation. At each hop it compared every active loan, every stale ticket, the slot high-water mark and the complete paged availability list. It also checked card mismatch, duplicate checkout, generation zero, maximum-width out-of-range tokens, malformed Wire and controller refusal.

Installed image Generated clients exercised Observed result after fresh writes
V1, SDK 0.1.0 V1 circulated stock. A separate fresh install accepted a V2 checkout and V3 inspection through their shared methods. Four full availability pages of 32. Calling V2's loan_slips on V1 returned CanisterMethodNotFound.
V2, SDK 0.1.0 V1 and V2 checked out and returned tools. V2 renewed loans and returned 32 populated slips. 129 active, 127 available, 50 stale. V1 read the new due days.
V3, provisional SDK 0.1.1 V1, V2 and V3 each checked out a tool. The two newer clients renewed and read slips. 131 active, 125 available, 51 stale. All three clients agreed.
V2 after reverse KEEP All three read V3 writes. V1 and V3 issued fresh checkouts and V2 renewed one. 131 active, 125 available, 53 stale. The high-water mark stayed at 144 throughout.

Fresh V1, V2 and V3 installs each started with 256 available tools and no loans. The layout, meaning and restore-trap siblings also worked on fresh install. Application endpoints used IC Wire 0.34.0 defaults in both directions, with 409,600 bytes, 67,108,864 bytes of allocation accounting, 9,437,184 nodes and depth 64. On installed V2 and V3, a request with 32 maximum-width tokens used 642 bytes. Both clients decoded a 579-byte reply containing 32 present loans with near-maximum cards and dates. A 33rd token returned at most 32 slips. A raw 409,601-byte update trapped with raw request exceeds endpoint byte allowance and the loans survived. Constructors for 0 and 257 tools trapped with stock must be 1..256.

Package pair and qualification

The release came from unified commit 8e8778de9083c956287a334220342d7968064dc8 at /tmp/rsx-wave8.aIiXnd/release. The builder used each release's tools, a private Cargo home and target, physical copies of the staged vendor, and --compatibility-package-archives for every image, including the qualifier rebuild. The app Cargo identity stayed community-tool-desk@0.1.0 across the three releases to isolate the SDK change. Both bundles used nightly-2026-10-15, rustc 7df81381d027710708209f36b98d11b1c88f8d2e, and wasm64. The app ran on pinned local PocketIC 16.1.0. Shared release inputs

Pinned Cargo packaged and independently verified each of the 24 selected 0.1.1 crates. An archive comparison checked all 365 member files per side, including 221 Rust files. Only Cargo manifests and locks differed. Parsing each normalized manifest showed that just its own version and exact internal SDK pins changed. All 48 compressed archives matched the corresponding app locks. All 47 other lock records matched, including IC Wire. Cargo resolved the facade and both Minima crates under registry+https://github.com/rust-lang/crates.io-index through the private directory source.

V1 and V2 used the same real build paths. V1 was populated before V2 was authored. V2's retained reads and fresh writes passed before its freeze. The bundled loader checked the live and frozen sources against their original manifests and completions (2,027 files for each, 2,028 for V3). The V3 app and tools had separate real paths so the qualifier could verify both locks and source closures simultaneously. All V3 siblings used those successor paths.

Populated control Observed admission and recovery
Same-release V2 → V2 Original hash, all 128 loans and availability survived. Fresh checkout, renewal, return and reuse passed.
Raw 0.1.1 ↔ V2 Preflight exited 1 with compiler-policy-mismatch. Actual KEEP trapped in both directions with root catalog rejected (CanisterCalledTrap).
Package-only isolation Rebuilt raw 0.1.1 dependencies using V2's original app, SDK tools, compiler, Cargo home and target paths. All 18 Rust flags matched V2 exactly. Preflight still exited 1 and populated KEEP trapped in both directions.
Wrong eligible scope ↔ V2 Moved only the Nyxus derive mapping to recipe/package/cdk-rsx-store-derive, preserving its context, raw fingerprint and proposed identity. Both directions trapped at the catalog.
Changed app layout or meaning Adding a retained u64 field, or toggling the stored high bit in the due-day codec at identical width, produced separate catalog refusals under the full provisional SDK aliases.
Restore failed after mutation The candidate checked out asset 256 and then trapped with circulation restore fault after checkout 256. V2 still served its original Wasm hash and every modeled loan. Its first fresh checkout of asset 256 got slot 47, generation 2, exactly as predicted before the trap.

Each failed upgrade had its own populated canister. The host checked the running module hash. The original client verified every loan and available asset, then checked out, renewed, returned and reused a slot.

The actual qualify-compat.py plan compared 50 emitted policies. The twelve changes were the wasm64 compiler, source-policy producer, four package recipes (Hylix derive, Nyxus derive, Store derive and Wire), and six manifest-bearing source leaves (Hylix, Nyxus, two Platform leaves, Store and facade Wire). The SlotArena, BitmapSet and Minima engine leaves retained their raw fingerprints. The suite bound six distinct Wasms. run --plan plan/plan.json --suite suite.json --output qual-run rebuilt the exact V3 Wasm, ran the native invariant test against both locks and completed all eight installed checks. verify --qualification qual-run/qualification.json reported two verified gates. A second full run in a fresh output directory passed and reproduced all six Wasm hashes. This covers the tested package pair, compiler and loan invariant. The approval registry retained its empty index. Qualification contract

First failures and packaged guidance

  • Host setup. scripts/build.sh v1 initially stopped at build-app: SDK package manifest is not canonical: /srv/shared/code/newstack/playground/xx5-wave8/vendor/cdk-rsx-0.1.0/Cargo.toml. The local vendor overlay used symlinked package directories. Replacing them with physical copies admitted the exact same archives.
  • Host runner. The first V1 → V2 rehearsal reached the correct new module hash, then node host/replay.mjs live logs/live-sequence failed with TypeError: Cannot read properties of undefined (reading 'methodName'). The workflow example had an app-specific dispatch_paused query. The generated desk client supplies the controller update set_dispatch_paused. The corrected runner started again from frozen V1, checked both callback counts and manually resumed after refusals.
  • Expected builder refusal. scripts/build.sh wrong --compatibility-candidate "$lane/wrong-aliases.json" first returned build-app: ineligible compatibility scope: recipe/package/cdk-rsx-takt-derive. The eligible Store derive scope produced the installed negative above.
  • Discovery. The copied creation and evolution skills led to the consumer guide, versioned owner rules, client loader and compiler preflight. Packaged Quickstart, mixed-provider source and the Minima crate tests supplied the pieces for a direct SlotArena owner. For the package bump, the compatibility guide linked to the commit-specific Wave 7 harness report, which I consulted locally. The bundled qualifier's module docstring supplied the six-role suite schema. One packaged suite example showing how to retain both live source closures would have saved that detour. All installed outcomes matched the documented contracts. Wave 7 archive rehearsal

Build identities

Each entry is SHA-256. App tree and used-archive map digests hash compact, key-sorted JSON plus LF, mapping relative filenames or package names to their file SHA-256. A source archive is the builder's original compressed source closure.

Input V1 V2 V3 provisional
Frozen app tree 8eec3168810092c99c1192c8ea982d0b52919e7f51a7869ad152c21b34cba133 5f968de1224ef9c626603e1aa2d96be9b17db53e1ca405cb363a0343e7bc723c 38c53b678c009e305f9ecab8aef45265deec062bbe7f0197c11cf2b9d5b5e9e5
App lock 049c7e537c67b2798d1d477c1339c9ba341af093ce3e8b34637bde1df0206c67 Same as V1 ab5f6cb5a2533a91956c4ca23ba8659c3927593e4c657ed54b2886c7aa9f0155
Source archive c5f6e57e4ed74b6619ea8a44e13f4ca232abed42f205d0d35baa576ec559c15b 52f9f62ccce7482297c148ac5dd78c9cfac489e0dfa0e0c8d9ba591bd0b6d5b2 273491bc30bc9f3f62dd0b9cae4676f45f89677257a6887ffa64e48d3328ed22
Prepared Wasm 1660084b0a62cf97a0a817fa681ff5dd34e1a6655ccf4e048a05303ef6c589dc b92b62b60dfe4f6d77a137823a499d04fda95a5655e899508ec99d6260bb8a22 26954e5bcd77e511eeb3310e1e4fcd4aa61c947805f91d0afcb89edd3a34ffb9
Generated client bc4b41ad0723fa56ad22ac3fad494574d5245f0618069de4608d2554c8c28e72 5f1a142e4a94ad1e0e7e72d52ca7345c1e434e0012312390cdb1819cd395e85d Same as V2
Original manifest a6c65195fee402086820bedf2132d19d33410ffebaa3ffbe5740d4a2ffa122bb 9e9fa1c2c27ef02e44d33f3d7faee3f850e1115d9b4cdc7829a34f6fe8513039 b7b20a59125a57d5f468951fa264de689aa6f531ad1af166085efd37f9bfb7c4
Shared or paired input SHA-256
0.1.0 tools archive / SDK-SOURCE.json 9a6819d17cd5ba3e4ef05b264b29da369fc589fb0f974d5531dd3f0385cc2214 / bdd435010c2d5cd618b6bed4b2e5cca6c3c7c3bbc2268ba5eea35f705f7a4aee
Release input receipt 8e171c3c54e60b1cd2edbf636c88261b0e957c23901531af7363b83b40211828
Facade .crate, 0.1.0 / 0.1.1 885eb14052ff6a333e6934685a05fd1f31ed1713780c1aa8e7f2b13e3052c6a0 / 2b6193a511fcdcdc1100ac857ae68cf3bd9b7ddfd9f6f03dffeea0b9460448f7
Used archive map, 0.1.0 / 0.1.1 a512b4458313c000c1d0ef181cf7202718e154e9a8712cefa7d224f335013534 / 99fdda4eddeac9128eecce53922aa7840a44de09d976d6857d6adae3a825be06
Tools workspace lock, 0.1.0 / 0.1.1 3b8d11487739220cc48566e8c3f1ec4026acc6fd5672afe2f132bfb5507ca791 / 32e30558e7d1f8d8c1fecebcdc4b651740746a2d4282ee1b72a072d399dc8e65
Generated runtime / codec, all three 17efb5249f84c06e2c3559dcb2975cdb863a639068905beb8a4bf3db3e684085 / a2b46dfb80c97347f131c25634f449ed215224c11b033622ce15baf379bb490a
Raw-policy 0.1.1 / raw with matched paths a916df87b092aead9e3e30c84857faef5d2ac240157d967be51103266112a11d / 4ef2894c2f26721fc6455f07d56f65338e5c46a63375aec4754fcb2b4f0b2d13
Wrong-scope Wasm / post-mutation trap Wasm a657cd64a89e92624b5c8c959c8a6f10e9109c6954daf531e96f4d9b86002d75 / 65a8bf31e0ff3d2c713f425fec7824af327e8cc91a07a5b7277302b816120ccc
Changed layout / changed meaning Wasm 7a0683f8b497cdbbb0a5ebc9290554d4c7b321daed2d4488e96a5b4949da1c66 / 4326f721f69e0832d14cbadc12d9f2d064fe0c5266b53ca05be9899bf9081272
Provisional aliases / verified qualification 71f2d43b0a3a9f17d4143dbffff02c1ce22127878b67e06db9ca103556ab9b09 / 3ecf7b2d59945476e398e3533598be9338842f397f447b46c6607542d71fc6d7
PocketIC executable b44e1eccd66e02328146b3e209e3403e3a3428a25d25555aca2f67500e5ae9db

Local replay from the unified repository root is bash playground/xx5-wave8/scripts/replay.sh. It uses the original prepared artifacts. The ignored project's README also gives the full qualifier rebuild command.