Tool library with Minima storage
The first slice is a one-branch lending desk with a fixed twelve-tool inventory,
controller-only checkout and return, and public bounded shelf browsing.
Implementation and local work log are under ignored playground/xx5/.
The public receipt is a monotonically increasing application ID. The lending
owner maps active receipts to private generational SlotId values. A Minima
SlotArena<LoanRow> holds checked-out tools, and a BitmapSet holds currently
available tool IDs.
What we tried
The Store root attaches the lending module and owns provider construction. Its child owns a Nyxus descriptor record containing the Minima Root, both Minima collections, the active receipt index and the next receipt number. Fresh install formats one physical stable arena. KEEP opens the same descriptor after catalog admission and binds a new transient provider. The V2 app adds a revision query and keeps the full saved memory declaration unchanged. The test drives V1's actual generated Wire client against the installed V2 for unchanged endpoints.
Controller authorization uses the SDK guard. An expired receipt or duplicate
checkout returns a typed business refusal before mutation. A provider or
invariant error after mutation uses the generated root's trap path for IC
rollback. Each endpoint lends a single synchronous node buffer. Public browsing
bounds both output count and bitmap nodes read, and its continuation comes from
RangePage::next. The test's one-slot high-water mark through return and reissue
makes reuse observable without publishing raw slot handles.
Storage foundation ·
Minima collection guide ·
Mixed-engine reference fixture
Result
The pinned PocketIC run passed all four groups of assertions. Public shelf queries paginated the whole inventory, staff authorization held, and invalid inputs produced typed refusals. A loan returned and reissued in the same slot kept the slot high-water mark at one. A delayed return for the first receipt left the second loan and the shelf unchanged. Upgrading with two committed loans produced a byte-identical 196,608-byte stable image, and the V1 generated client still read both loans against V2. Returns and a fresh checkout continued the receipt sequence and reused retained slot capacity after the upgrade.
The first native source check passed at 16:41 UTC, the first generated-client queries reached the installed V1 at 16:45 UTC, and the final run passed at 16:47 UTC on 28 November 2026. The first complete canonical V1 build took 83.2 seconds with a cold lane target. The final warm V1 and V2 builds took 15.7 and 15.8 seconds. These are development elapsed times from this parallel session. The scope is a single branch, unchanged memory contracts, one installed wasm64 profile and one controlled local subnet.
What we learned and changed
| Observation in this checkout | What got the build moving |
|---|---|
After sourcing the SDK environment, cargo +nightly-2026-10-15 generate-lockfile … failed with error: no such command: +nightly-2026-10-15. The environment had placed the pinned real Cargo ahead of the Rustup proxy. |
Used plain cargo after sourcing and checked the executable path. |
The preseeded private Cargo cache could only find much earlier IC Wire versions for ic-wire = "=0.34.0". |
Seeded the exact 0.34.0 index entries and package archives in the private cache. The two Wire crates declared Rust 1.100.0, so we also adjusted the standalone app manifest from the fixture's 1.99 to 1.100. |
Even after the app could check offline, canonical build preflight failed on failed to download cipher v0.5.2 while reading the SDK workspace's full locked metadata. |
Ran cargo fetch --locked --manifest-path cdk-rsx/Cargo.toml in the same private Cargo home. The next canonical build passed this preflight. |
The standalone #[derive(NyxusData)] failed with cannot find cdk_rsx_engine_nyxus in the list of imported crates even though the derive was imported through Collections. fixed_record! separately reported that LoanRow: Clone was unsatisfied. |
Added the direct Nyxus engine dependency and put #[derive(Clone)] inside the fixed record declaration. The standalone native checks then passed. |
The first installed Wire run reached the page-limit refusal and the test expected a string for the Rust enum's unit variant. The generated client returned {err: {tag: "InvalidPage", value: null}}. |
Checked the exact emitted TypeScript type, corrected the test oracle and rebuilt to preserve the receipt. |
| The first stable-image check expected 131,072 bytes for two collection blocks. PocketIC returned 196,608 bytes. | Counted the isolated format marker in block zero, then asserted two pages at install and one more after allocating loan slots. This was an app test assumption. |
The explicit derives and extra dependency are concrete authoring friction. The
short example in the memory conventions imports NyxusData through Collections
while the runnable fixture has a separate engine dependency. A standalone
recipe can name the dependency and the Fixed: Clone obligation up front. The
offline metadata failure reflects the canonical builder's broader source capture.
The build guide could show how to prepare both workspace closures and explain
which manifest lacked a package when reporting a preflight error.
Memory conventions ·
Build guide
Future skill inputs
- Start from application authority and lifetime. A public business ID and an internal storage generation serve different purposes. Keep the latter in the memory owner and add a replay test before considering the return endpoint done.
- Use Minima for collections with bounded fixed encodings. Place the arena Root
and collection descriptors under a normal Store owner. Pair
Arena::formaton install withArena::openafter successful KEEP admission. Keep provider and workspace transient and available only for synchronous work. - Before compiling a new standalone app, read a similar fixture's full
Cargo.toml, including dependencies required by macro expansion. Set up the app and full locked SDK dependency caches, verify toolchain selection and keep output out of the package source directory. - A solid completion gate includes an installed prepared Wasm, the generated client actually making calls, an active loan across a populated KEEP, and a fresh update after the upgrade. Use the emitted TypeScript types to write assertions for returned enums, results and options. A native check is an earlier checkpoint.
Packaging observation
A local archive rehearsal with
cargo package --manifest-path cdk-rsx/Cargo.toml --package cdk-rsx-collections-minima --offline --locked --no-verify --allow-dirty
exited 101. Cargo reported all dependencies must have a version requirement specified when packaging
and named cdk-rsx-engine-minima. The current facade's manifest also declares
publish = false. A packaging rehearsal should cover the versioned transitive
dependencies, any build input expected outside its package, and the canonical
build from a fresh consumer app. This app run uses a pinned source checkout.
Facade manifest ·
Minima collection manifest
Reproduction
From the repository root with the pinned toolchain, Node 24, prepared PocketIC JS host dependencies and the qualified PocketIC 16.1.0 binary:
lane="$PWD/tmp/ai-app-trials-wave1/xx5"
export CARGO_HOME="$lane/cargo-home" CARGO_TARGET_DIR="$lane/target" TMPDIR="$lane/temp"
export CARGO_BUILD_JOBS=3
source tools/env.sh
cargo fetch --locked --manifest-path cdk-rsx/Cargo.toml
cargo fetch --locked --manifest-path playground/xx5/Cargo.toml
cargo check --locked --offline --manifest-path playground/xx5/Cargo.toml --features v2
bash playground/xx5/run.sh
The runner creates fresh per-run output in the lane, builds both artifacts sequentially, verifies receipt hashes and closes only its own PocketIC server. Host test tooling · SDK upgrade rules
Run identity
- Unified commit
1d8ed59866a47dcd54c332e4790356524873f15aand SDK treec699daad6688a2bb1338634be5f223e58736ea58. - Both canonical inventories captured 1,617 files, with
source-before.jsonSHA-2564c55107c3eaffe8ebe6bff4117908404d4c2f5ee937b85281d40834e27e5d861. The application metadata selected 25 local SDK packages. Filtering the inventory to those package directories plus SDK workspace manifest, lock, toolchain and Cargo config gives 343 files and digestb92c196ec5fc21a96d3c881cb8b0d1a1cb29ef8174b02f01371939462f1d90e0. The full SDK and builder subtree has 1,604 files and digesta02e8e19bfbf43ea0f279bfc9d7681de7ecf08d8384e9fb21e936262bf51eb7f. These filtered digests hash one line per recorded file in manifest order, with SHA-256, two spaces, repository-relative path and newline. The standaloneCargo.lockdigest wasde6fc71e542b788171d23e13edde91fee522665345f07f1c854f8d140f10c435. - Pinned nightly
nightly-2026-10-15, rustc7df81381d027710708209f36b98d11b1c88f8d2e, Node v24.22.3 and PocketIC 16.1.0 SHA-2566a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6. - Raw logs, manifests and report are local ignored output under
tmp/ai-app-trials-wave1/xx5/run.qhtA74/. The runner checked 1,637 recorded input and output hashes for each prepared artifact.
| Release | Prepared Wasm SHA-256 | Wire metadata SHA-256 |
|---|---|---|
| V1 | e63d05b4875e82ce929b24a613b8a346b97852ddb9033e71043959217fadfb68 |
3f4847353c1292a2312e13e18878f321df5320ec5dfb199ad215c0ac8e460ffe |
| V2 | f48f460726089856c3e73e65a7a41d517ce7913b3237f26383dcd1b9786d3a9a |
3ebaa1c76fd3d07bda9b13acf33f47593c8a170a546bd279798c6a04d9380753 |