Local history archive
The archive trial passed with two canonically built wasm64 artifacts installed in sequence on one PocketIC 16.1.0 canister. The original generated V1 client read and updated the V2 service after KEEP. V2 added an optional status tuple slot. The underlying Hylix record survived the upgrade with one 64 KiB chunk of a 256 KiB replacement committed.
Implementation and checks
The ignored app lives under playground/xx6/. An editor begins a replacement,
appends at the required offset, and publishes or cancels it. Public readers
page through the current publication in chunks up to 64 KiB. The editor is
set at install. A single Hylix child owns the published Blob, draft and
chunk map. Its root attaches one child and opens the sole stable provider.
A current Hylix Blob is immutable. The draft uses a Map<u32, Blob> keyed
by offset so each accepted chunk commits on its own. At publish, the owner
uses Blob::from_reader and one chunk of scratch to assemble the final
immutable blob. It replaces the old owner with hylix::replace, then clears
the map to retire the chunk owners. Cancel clears the draft and map. Normal
refusals return before mutation. The archive exercises real publication and
cleanup, but it is a one-attachment trial with one active editor and a 256
KiB application cap. Hylix collections
- V1 published 55 bytes and began the replacement. The first 64 KiB was committed. The same offset, an oversized chunk within the Wire envelope, and premature publish were refused. An anonymous caller could not start an upload. The old attachment stayed readable.
- Before upgrade, the V2 client decoded the missing fourth slot as
null. After upgrade, the V1 client returned the identical three known values even when the V2 reply carried a present extension. The V2 client saw 196,608 bytes remaining. The full 196,608-byte stable image was identical before KEEP and after the post-upgrade reads. - The original V1 client appended the final three chunks and published the replacement once. V2 read back the exact 262,144 bytes in bounded pages. The canceled ID could not resume a later draft, and four repetitions of the same draft size did not increase stable capacity above the initial cancel cohort's 1,114,112 bytes. This is a bounded reuse check.
- The Rust V1
UploadStatus(u32, u32, u32)derives upstream Wire withevolve_reply. The V2 feature adds#[wire(id = 4)] Option<u32>at the end. The initial declarations in both root and archive remain V1. The test imports each build's own generated.wire.ts, which in turn loads that build's runtime and codec. It uses V1 and V2 codecs over the actual PocketIC transport. Wire evolution
Friction and tested fixes
| What was tried | Observed result and change |
|---|---|
Generate the app lockfile with the warm cache and --offline. |
Cargo reported failed to select a version for the requirement ic-wire = "=0.34.0". Online cargo generate-lockfile and cargo fetch --locked downloaded that release and its derive. |
| Run the canonical builder with only the app's dependencies fetched. | The second metadata command, for the SDK workspace, failed on failed to download cipher v0.5.2. Fetching the locked SDK workspace into the same private cache resolved it. Current cache setup should explicitly cover both manifests. |
| Look for the historical retained Blob builder. | The current collection source exports immutable Blob::from_reader and read_range. The application changed to a stable chunk map and bounded publish buffer. A focused compiled upload recipe would make this transition discoverable. |
| Keep mutable experiment notes inside the Cargo package. | The builder snapshots all local package files. Code and Cargo inputs moved into playground/xx6/canister/ so the runner and notes can remain beside the package. Both final artifacts were freshly built after the move. |
Compare a generated read_published result to an ordinary object literal. |
Node printed [Object: null prototype] in the nested DTO and strict equality rejected it even though the bytes matched. Compare .ok.bytes explicitly. Both versions continued to use the generated bindings. |
The facade and the source-policy crate are marked publish = false, and
the facade uses path-only SDK dependencies. The pinned SDK workspace
declares rust-version = "1.99". The app's lockfile generation reported
ic-wire and ic-wire-derive 0.34.0 requiring Rust 1.100. The tested
nightly reports 1.101.0. This is a minimum-version metadata mismatch to
resolve before proposing a registry workflow. A local
cargo package --list --manifest-path cdk-rsx/Cargo.toml --package cdk-rsx-source-policy --offline --locked
listed src/lib.rs and omitted the SDK-level compatibility/resolve.rs that
the source references. The memory ABI build script also references this
shared file. A registry readiness check should compile extracted packages
in isolation, with no checkout providing those relative paths.
Facade manifest ·
Policy source ·
Memory ABI build script
Skill inputs and reproduction
- Keep application DTO evolution independent from persistent field evolution.
Start planned reply tuples with the upstream derive and
evolve_replyin V1. Preserve published positions and the method signature. Add the optional slot at its one-based position and test it while populated. - When editing a publication across requests, start with a durable upload ID, fixed cap, exact offsets and an owned chunk carrier. Validate request length and identity before mutation. Assemble with fixed scratch inside the owner frame, then explicitly retire displaced stable owners.
- Preserve independent output stems and each artifact's own generated TypeScript module and companion runtime. Install V1, commit real work, invoke V2's client before upgrade to check absence, invoke both after KEEP, and resume through the old client with V2 installed. Compare exact bytes, refusals and durable progress in addition to method availability.
- Use a Cargo package directory that contains only frozen build inputs. Keep logs, reports and the runner one level above it. Seed both dependency graphs before the offline builds. Canonical receipts assume that captured paths stay in the same location when the harness verifies them.
With the ignored app code available, run these commands from the harness root. The example starts with separate empty output destinations. The PocketIC harness dependencies were already installed in the checkout.
archive_run="$PWD/tmp/ai-app-trials-wave1/xx6"
archive_manifest=playground/xx6/canister/Cargo.toml
export CARGO_HOME="$archive_run/cargo-home" CARGO_TARGET_DIR="$archive_run/target"
export TMPDIR="$archive_run/temp" CARGO_BUILD_JOBS=3
source tools/env.sh
cargo fetch --manifest-path "$archive_manifest" --locked
cargo fetch --manifest-path cdk-rsx/Cargo.toml --locked
python3 cdk-rsx/tools/build-app.py --manifest-path "$archive_manifest" \
--out-dir "$archive_run/replay-v1" --name archive --offline --locked
python3 cdk-rsx/tools/build-app.py --manifest-path "$archive_manifest" --features wire-v2 \
--out-dir "$archive_run/replay-v2" --name archive --offline --locked
env -u RRT_PIC_SERVER_URL -u RRT_PIC_STATE_DIR node playground/xx6/acceptance.mjs \
"$archive_run/replay-v1/archive" "$archive_run/replay-v2/archive" "$archive_run/replay-result.json"
Run identity
- Unified commit
1d8ed59866a47dcd54c332e4790356524873f15a, SDK treec699daad6688a2bb1338634be5f223e58736ea58, compilernightly-2026-10-15(7df81381d027710708209f36b98d11b1c88f8d2e), targetwasm64-unknown-unknown, Node24.22.3, PocketIC SHA-2566a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6. - Both verified manifests captured 1,604 SDK-relative source rows including the
canonical host-tool workspace. SHA-256 of the sorted UTF-8
path<TAB>sha256<LF>rows was5319f6e0a27f20764f13d1d529d687367f51f1e6b0264b6b1933a3bfe33eadb2. The app lockfile hash wasfa6fff53761b799541bca1afddfe225e77b6aeb08006767637e8b21865a15af6. Both builds selected the same local dependencies. V2 enabled onlywire-v2. The repository's receipt verifier checked 1,633 inputs and outputs per version before installation. - V1 Wasm SHA-256
4bee26078518dc625a0b32914c821235acef1173abbb665b262f54b0176867f2, Wire descriptorf4c1e5e0a997d45ea908e846c48b45a5f74f2afe4d12dd13cca492cb58dff8f9, and generated bindingbbf9d9055d8d244a96d3b6dbad28543f6ea071f90caf16f2526479827eb738e1. - V2 Wasm SHA-256
5d5d0c987c574901f26b3a8947fbcb9e637f07e4df633339ffefe84ed053ef6c, Wire descriptored2df889a8277d7f719e32fd66733064c4c9dd8e57b81984dba0e99d93ad8fcc, and generated binding9a38d44be87cda8ebecb2be52f66544d61b30a981c4769d333e9332900ad9a52. - The final V1 and V2 build receipts recorded 30.4 and 15.3 seconds on
the warmed lane target. Artifact verification and the accepted PocketIC
run took 9.8 seconds of host wall time. The 262,144-byte publication matched
SHA-256
6d82beb054e54681771ea9ac6ddd475cb20de6a935a54d087913dac4ff081c50. These are reproduction checkpoints from one host.