Root authoring probe
The ordinary root-authoring-lifecycle.mjs fixture covers compiled admission,
declared owner conversion, KEEP and rollback after a restore callback error.
Its root module is private, so the canonical builder links the generated
native descriptor symbol. The unused (u64,) constructor has a two-byte
encoded budget, including the sparse Wire root. The two-byte encoding of
[0n] succeeds. The valid three-byte encoding of [128n] rejects before
copying or decoding. A malformed varint produces the constructor's generic
decode trap. Native metadata reports the same tuple and limits. The same
canister accepts [0n] after those rejected installations.
The typed put_text update caps the complete IC Wire frame at 132 bytes and
keeps the default allocation, node, and depth allowances. On PocketIC, the
largest key and 120 UTF-8 text bytes fit exactly. An overlong string with a
short key still fits the frame cap and returns a domain error. The runner
also sends a valid 133-byte frame using the same schema with a larger
test-only encoder allowance. The canister rejects it before copying or
decoding. Both refusals preserve the score and last recorded key. The runner
also sends one legal in-cap request to three otherwise identical endpoints
with narrow allocation, node, or depth allowances. Each traps with the
corresponding Wire reason. A truncated frame still gets a generic decode
trap, and none of those calls changes the stored state.
The scores owner uses an explicitly tagged Nyxus enum for the last recorded
key. The fixture declares both the engine and memory ABI crates as direct
dependencies and enables arbitrary_self_types_pointers at the crate root.
The generated Wire client sees Option<u64>. The lifecycle runner checks
the unset case at install, a recorded payload across KEEP and root conversion,
and a new payload after upgrade. Versioned memory ·
Owner projection · Manifest
Build the fixture on wasm64 from the repository root after preparing the
toolchain and dependency seed.
Point CARGO_HOME at your prepared private cache.
probe=$(mktemp -d "$PWD/tmp/root-authoring.XXXXXX")
export CARGO_TARGET_DIR="$probe/target" TMPDIR="$probe/temp"
source tools/env.sh
python3 cdk-rsx/tools/build-app.py \
--manifest-path tests/Cargo.toml --package root-authoring-probe-canister \
--name root-authoring --out-dir "$probe/artifacts" --offline --locked
tests/pocketic/transient-recovery.mjs adds a separate quiescent Runtime-recovery
check. Build the normal artifact and the trap-after-save feature with the
canonical builder, then pass their stems as --normal=... and
--trap-after-save=..., together with explicit --source-root, --pocket-ic
and a fresh --output below tests/tmp.
The fixture deliberately forgets one ordinary byte Vec and one byte Box.
Its nonowning old-instance TLS witness checks their actual Runtime ownership
and every byte after a rejected or rolled-back upgrade. Successful KEEP must
clear that witness, return Runtime page ownership to its prior baseline,
preserve all retained values and reuse capacity over repeated cycles. A late
restore failure must restore the old executable, ownership and payload before
a later KEEP succeeds. Skipping old teardown must still reject.
This tests byte-only transient leaks. It does not recover retained reference counts, synthesize destructors, or permit callbacks, tasks, loans or unpublished Hylix state to cross the handoff. The existing callback/timer and Hylix lifecycle fixtures qualify those independent fences on the exact candidate binary.