Cold workflow definition migration probe

Two images use the existing generated root catalog admission and owner-local Upgrade::convert. The first has Workflow<u64,u32> and graph version one; the revision2 image declares its exact root predecessor, converts that child with Takt's typed memory::evolve, then binds Workflow<u128,u32> and graph two.

The old image opts into only its own frozen local-work contract through the existing suspend_local_work boundary. The new image calls check_local_upgrade after rebinding and before starting Reactor's controller. Both images keep the SDK callback/executor gate, the original Reactor shutdown checks and the root's declared catalog policy. There is no custom admission export, SDK edit, pending-task exception or direct owner-memory access.

The graph contains only an absolute timed wait followed by success. Conversion adds seven to its stored data, while the entered wait retains its original absolute deadline. The target success doubles that data, making target execution observable. Terminal results convert separately and retain their original finish and expiry times.

Each frozen root owns only its version's definition interpretation through a memory dependencies contract. Graph one pins its complete source, input mapping and frozen configuration. The runtime actually reads that configuration, including namespace, payload bounds, reader version and scheduler limits. Root V2 pins graph two; its declared predecessor remains the exact Root V1 and graph-one contracts. Shared root policies contain only the SDK's automatic runtime/Collections/Wire policies. V1 does not compile graph two, root V2 or the converter, and its catalog hashes none of their sources. The target does not need to be known by the old image.

The contracts query exposes current and frozen-source module, definition and complete catalog digests. The runner compares the actual old image's catalog with the new image's compiled predecessor and checks that the target digests differ.

Build with the canonical SDK builder from the repository root, using one leased Cargo target and fresh output directories. Use the committed fixture workspace lockfile and prepare its dependency cache before the locked offline build.

source tools/env.sh
python3 cdk-rsx/tools/build-app.py \
  --manifest-path tests/canisters/rrt-cold-migration-probe/Cargo.toml \
  --out-dir tests/tmp/cold-migration-v1 --name probe --offline --locked
python3 cdk-rsx/tools/build-app.py \
  --manifest-path tests/canisters/rrt-cold-migration-probe/Cargo.toml --features revision2 \
  --out-dir tests/tmp/cold-migration-v2 --name probe --offline --locked
node tests/pocketic/cold-migration-lifecycle.mjs \
  --runtime-root="$PWD" --pocket-ic="$POCKET_IC_BIN" \
  --v1="$PWD/tests/tmp/cold-migration-v1/probe" \
  --v2="$PWD/tests/tmp/cold-migration-v2/probe" \
  --output="$PWD/tests/tmp/cold-migration-lifecycle"

The runner checks a twenty-day wait upgraded after five days, changed carrier and graph identity, exact frozen predecessor digests, preserved node/visit identity, terminal conversion/expiry, a second same-target KEEP, undeclared downgrade rejection/rollback, original timer resume and fresh target admission. It records exact verified artifacts and its owned IC instance. Passing this fixture would qualify this cold local boundary only; attempted tasks, unresolved addresses and Hylix conversion remain outside it.

Run V1 and V2 side by side

side-by-side builds an alternative successor of Root V1. It reattaches the unchanged V1 workflow owner under namespace 41 and creates the V2 owner under namespace 42. Both definitions register on one shared Takt runtime and Reactor scheduler. The original workflow query reads V1 IDs, while launch_v2 and workflow_v2 start and read work in the new namespace.

Build the original V1 artifact as shown above, then build and exercise the alternative successor.

python3 cdk-rsx/tools/build-app.py \
  --manifest-path tests/canisters/rrt-cold-migration-probe/Cargo.toml \
  --features side-by-side --out-dir tests/tmp/takt-side-by-side --name probe --offline --locked
node tests/pocketic/takt-side-by-side-lifecycle.mjs \
  tests/tmp/cold-migration-v1/probe tests/tmp/takt-side-by-side/probe \
  "$POCKET_IC_BIN" tests/tmp/takt-side-by-side-result

The runner calls management KEEP while the canister is Running. It verifies the exact predecessor, the original generated client, two pending workflows with independent namespaces, a refused downgrade and both original deadlines. The source and successor use the same local-work and physical quiescence gates. See the workflow upgrade boundaries.