Shared Minima and Hylix lifecycle probe
This small fixture qualifies actual composition under one exclusive stable
provider. Root code only attaches modules and constructs/rebinds services.
payloads owns a Nyxus record containing the Minima Root, a FixedVec<u64>,
a generational SlotArena<u64> and saved slot identities. records owns a
Hylix record containing Map<u64,Row> and Blob; each row owns nested and obsolete Blob fields. One physical StableMemory
capability feeds Minima; Hylix receives only arena.hylix_memory().
The generated root lifecycle drops the complete transient App graph before
KEEP. Restoration reads the owner-private saved Minima Root through its owner,
reopens that sole provider, opens the saved Hylix virtual image and rebuilds
bindings. The default artifact reopens V1. The v2 artifact declares V1 as its exact predecessor and delegates owner-local root/child conversion. Minima carriers move unchanged; Hylix rows retain keys, scalar values and nested Blob identities, retire obsolete Blob fields and add value + 5000. The fail-migration companion returns an error after conversion, app save and a completed mixed-engine dirty frame.
The runner seeds 256 values in an earlier completed update, checks every
value and exact encoded carrier/slot identity, exercises vector/block and
slot reuse, retires/repopulates the Map and changes Blob size class. It checks
full shared stable-image equality across queries, a combined update trap,
populated same-artifact KEEP, rejected owner-contract upgrade and another KEEP
followed by fresh writes. trap-upgrade additionally mutates both owners after
app save during admitted restoration and traps, testing late rollback.
Rehearse a packaged SDK upgrade
Use two extracted SDK tools bundles with their matching package sets. Choose the same probe source in both bundles. The example keeps populated Minima and Hylix owners while testing the proposed SDK identities through the real qualifier. The resulting evidence is provisional.
Set baseline_sdk and candidate_sdk to the absolute bundle paths. Prepare
private copies of the app and fetch both locked input sets into one Cargo
home. Set POCKET_IC_BIN to a
compatible local executable.
The qualification records the exact executable's SHA-256. Keep the executable
and the prepared app, SDK, archive, and host directories available through
the replay and evidence verification.
baseline_sdk=/absolute/path/to/baseline-sdk
candidate_sdk=/absolute/path/to/candidate-sdk
work=$(mktemp -d)
mkdir "$work/tmp"
export CARGO_HOME="$work/cargo-home" CARGO_TARGET_DIR="$work/prep-target" TMPDIR="$work/tmp"
prepare_probe() {
local sdk="$1" app="$2"
cp -R "$sdk/examples/engine-composition-probe" "$app"
bash "$sdk/tools/wasm-retain/setup.sh"
(
source "$sdk/tools/env.sh"
cargo generate-lockfile --manifest-path "$app/Cargo.toml"
cargo fetch --manifest-path "$app/Cargo.toml" --locked
cargo fetch --manifest-path "$sdk/Cargo.toml" --locked
)
}
prepare_probe "$baseline_sdk" "$work/baseline-app"
prepare_probe "$candidate_sdk" "$work/candidate-app"
host="$work/host"
cp -R "$candidate_sdk/tools/pocketic-quickstart" "$host"
npm ci --ignore-scripts --prefix "$host"
python3 "$host/compatibility-suite.py" \
--baseline-sdk "$baseline_sdk" --candidate-sdk "$candidate_sdk" \
--baseline-app "$work/baseline-app" --candidate-app "$work/candidate-app" \
--pocket-ic "$POCKET_IC_BIN" --output "$work/qualification"
For local release stages, point the Cargo directory source replacement at a
physical vendor tree containing both package sets, then resolve and fetch
from it. Add --baseline-archives and --candidate-archives with the original
.crate directories for the respective stages. The builder verifies each
selected package tree against its locked archive. The example takes staged
inputs from the release producer and uses the same commands for a locally
staged version-only pair.
The script builds both unqualified images in separate app roots. It saves the
qualifier plan, then builds layout, meaning, and restore controls at the
candidate's original build path while preserving separate exact source copies.
It restores the ordinary candidate source before run rebuilds the candidate
with the proposed aliases. The native gates test both recorded source trees.
The installed gate exercises populated forward and reverse KEEP, fresh writes,
and all four refusals. Each refused image works on fresh install. The layout
control grows the retained record. The meaning control keeps its size and
changes how the revision is stored and interpreted. suite.json records the
commands and inputs, and
qualification/qualification.json contains the verified evidence inside the
chosen output directory. See the qualification guide
for adapting the suite to an app and reviewing the evidence.
Run the checkout lifecycle probes
Build all companions from the same frozen source, target, debug mode and pinned
environment using the canonical SDK builder and the fixture workspace's
committed lockfile. From the factory root, with an exclusive CARGO_TARGET_DIR
and a fresh artifact destination:
source tools/env.sh
python3 cdk-rsx/tools/build-app.py \
--manifest-path tests/Cargo.toml --package engine-composition-probe-canister \
--name composition --out-dir tests/tmp/engine-composition/normal --offline --locked
python3 cdk-rsx/tools/build-app.py \
--manifest-path tests/Cargo.toml --package engine-composition-probe-canister \
--features reject-contract --name composition \
--out-dir tests/tmp/engine-composition/reject --offline --locked
python3 cdk-rsx/tools/build-app.py \
--manifest-path tests/Cargo.toml --package engine-composition-probe-canister \
--features trap-upgrade --name composition \
--out-dir tests/tmp/engine-composition/trap --offline --locked
node tests/pocketic/engine-composition-lifecycle.mjs \
--source-root="$PWD" --pocket-ic="$POCKET_IC_BIN" \
--normal="$PWD/tests/tmp/engine-composition/normal/composition" \
--reject-contract="$PWD/tests/tmp/engine-composition/reject/composition" \
--trap-upgrade="$PWD/tests/tmp/engine-composition/trap/composition" \
--output="$PWD/tests/tmp/engine-composition/results"
Repeat with separate fresh artifact/result directories and
--wasm-target wasm32-unknown-unknown to qualify memory32. The default is
wasm64; KEEP never crosses target profiles. The optional restore-trap check is
explicitly recorded as NOT_RUN when its artifact is omitted. The runner checks
canonical receipts and exact Wire schema, preserves failure records and shuts
down only its own PocketIC instance/session. Passing this gate does not qualify
500-GiB capacity, other collection families or performance.
The migration-specific host runner
uses canonical v1, v2 and fail-migration artifacts, seeds all 256 rows in
prior completed updates, checks two late failures restore the complete old stable
image and executable, then checks successful conversion, downgrade rejection,
populated V2 KEEP and fresh writes. Its verification runner
builds and seals that cohort. This finite wasm64 case does not establish arbitrary
converter correctness, resource exhaustion, memory32 or a total upgrade budget.