Rehearse an upgrade with saved data
A PocketIC fixture checks that V1 survives a late upgrade failure with its original data, then checks a successful conversion and a new write on V2.
Begin with a running V1
The root authoring fixture writes records 7 and 8 with values 91 and 92, then upgrades to the exact same V1 Wasm with memory kept. The runner checks both values, an absent key and the reported generation. This gives the rehearsal a baseline before any conversion runs. Use fixtures that make lost records, wrong values and unexpected defaults easy to distinguish.
Exercise both points of failure
Two incompatible builds, one with a changed root policy and one without the declared source, are refused before the app restores. A third build deliberately fails after saving the converted app during the upgrade. In each case the runner checks that V1 still reports generation 1 and returns the original data. After the late failure it also exercises a write through the old child module.
Prove the new release can take writes
A build with the declared owner conversion then upgrades successfully. The values survive and the generation becomes 2. The runner expects an attempt to install V1 over the new state to be refused. It upgrades to the same V2 build again, reads the original records, then writes and reads a fresh record.
Make those outcomes part of the release brief. A useful rehearsal covers populated data, refusal before conversion, recovery from a fault late in the upgrade and working endpoints on the new release. This fixture checks two records in PocketIC. Test your app’s largest plausible state and its own conversion rules separately.