Store and upgrade risk priorities after batch 12

Read-only source research, 7 November 2026. Factory 9303c47e54c4b4e9f0e90d57cd9b23cad938e1dc; SDK 16bbcc1f2f4a312631cad3ce74c6b2f044d09cd3. No compiler, prover, tests or installation ran; no runtime defect is asserted. Counter stays 2. Ranks combine exposure, consequence and proof tractability. Likelihood is judgment; proof absence alone does not establish a defect.

Source abbreviations: store/ = SDK ver1/crates/cdk-rsx-store/src/; hylix/ = ver1/crates/cdk-rsx-engine-hylix/src/; executor/ = ver1/crates/cdk-rsx-executor/src/; sdk/ = ver1/crates/cdk-rsx/src/. Line numbers name the SDK pin above. Read source bodies/current callers: B11 record/child/retirement, B12 completion/ nested-conversion/generated-owner and B9/B10 admission/commit scopes.

1. Dirty owning records finish against the actual provider

Source: store/hylix.rs:77/:140 (FrameRecords::get/finish), :184/:207/:223 (Record::new/into_value/Drop), :284/:324 (write guards); store/scope.rs:186/:535 (Context::finish/execute_write); store/backend.rs:212 (hylix_write); hylix/context.rs:177 (using).

New guarantee: actual module borrowing supplies the cache pin; an uncached record decodes and becomes one stable-address boxed snapshot; after guards end, retired entries disappear before reuse, only surviving dirty entries publish, snapshots die before Store TLS ends, and provider finish follows those actions. This also applies to ordinary returned Err; fatal retirement/publication failures must not return success.

Already checked: B11 separately proves decoded publication/take, supplied exclusive-provider flush, transfer and owning retirement; B12 proves natural nonempty Context cleanup and complete clean read-frame control with a supplied decoded row/opaque key. Neither derives the public Record/cache pin or this dirty owning write/provider history. B12's actual public query remains open.

Trigger/test weakness: ordinary edit followed by owner conversion/removal and subsequent allocation reuse in one synchronous frame. Small endpoints often check final scalars while missing stale snapshots, nested-owner lifetime and relative flush order; randomized workloads need a relational storage oracle. Impact high: durable-data/ownership loss. Likelihood medium; exposure very high; confidence medium.

Smallest next cut: first check actual public guard formation/drop and the get-miss branch for one real typed record plus a live neighbor, against the existing lawful byte image. Keep that separate from natural frame completion. Then prove the actual finish loop compositionally over a sequence partitioned into live clean/dirty/removed entries, using explicit checked flush/take/drop contracts; Creusot is a candidate for the loop, Kani for concrete pointer/guard cuts. Do not replace actual provider/erased dispatch with an unchecked finalizer. Premises: lawful inert-snapshot Codec/HylixValue, unique descriptor, actual module loans, Storage generation/reuse and frame laws; physical Arena/Wasm refinement stays separate. B12 public composition hits missing dynamic Box<dyn BufferedValue> drop glue; even clean full write SAT capped at 90s. Resolve a narrow dispatch/refinement cut before another whole-frame attempt. Control: omit dirty flush or retain a removed entry and require a semantic endpoint/owner assertion to fail. Difficulty high.

2. Populated ChildMap mutations preserve three agreeing ownership views

Source: store/children.rs:195/:207/:224/:251/:268 (attach/take/take_first/clear/Drop), store/scope.rs:117/:155/:350 (attach/detach/retiring).

New guarantee: map entries, directory parents and pending owners remain an exact partition during replacement and ordered removal, including partial clear(limit) and owning-key destruction. Every removed child becomes pending once, every retained child keeps one parent, and unrelated subtrees survive. In particular, take_first/clear pop the map before directory detachment; their success requires deriving the detach premises from the valid map forest.

Already checked: B11 checks actual ChildSlot transitions over supplied four-cell forests, not ChildMap. B12 checks only ChildMap adoption's swap tail after validation, with one owning key; its phase/retirement maps are empty. These populated mutation/Drop source paths have no current admitted caller.

Trigger/test weakness: replace one indexed child, remove a bounded prefix, move the replacement, then finish or migrate its parent. Returned map contents can look right while a directory/pending edge differs; ordinary fuzzing rarely tracks all three representations plus owning keys and future stale handles. Impact high; likelihood medium, confidence medium. This is a fresher and smaller entry point than immediately retrying complete nested conversion.

Smallest cut: source-linked take_first and one clear iteration with an abstract arbitrary map suffix and a linear child-forest partition; then loop induction for exact min(limit,len) removal and untouched suffix. Creusot can check the original control flow under named std BTreeMap ordering/pop laws; Kani can separately check actual RefCell/owning-key movement on two entries. Require directory/detach and typed release contracts; IDs never grant physical ownership. Native/std/Nyxus map and allocator refinement remain lower leaves. Control: omit detach/pending enrollment after pop; the partition claim must fail. Difficulty medium, rising to high for populated physical Drop composition.

3. Fixed root backing initializes, borrows and destroys its exact type

Source: executor/root_control.rs:131/:145/:158/:172/:187 (Storage::cell/backing/install/with/clear); :61 (HotRoot::storage).

New guarantee: selected inline or boxed storage is initialized before its first typed read, fits/aligned for exactly its representation, retains the RefCell loan through callbacks, and detaches before invoking an owning App's destructor. Repeated reads, clear/rebind and destructor recreation cannot reinterpret or double-destroy the previous App. Include small, oversized, over-aligned and zero-size App instantiations.

Already checked: B9 actual admission decision and emitted wrappers, B10 emitted restore/publication ordering, and finite installed KEEP witnesses. Those formal root callers supply App/RootKey/catalog leaves; B12's real Store cleanup does not check this fixed typed root backing. Source search found no current verification caller for HotRoot/root_control; SDK native tests exist.

Trigger/test weakness: app composition changes size/alignment and crosses the inline/Box threshold; normal startup/teardown succeeds in most layouts. Native production roots use reclaimable TLS, so testing only them misses the Wasm backing path. Impact high (typed memory/root lifetime); likelihood low-to-medium, confidence medium. Native tests already cover several key cases.

Smallest cut: Kani actual unchanged Storage bodies on a genuinely aligned, pinned native object, separate inline/boxed/over-aligned/ZST cases, one owning payload and reentrant shared callback/destructor. Prove initialization-before- publication and exact-once old payload Drop. Std RefCell/Box and object origin are premises. This local native theorem does not establish Wasm fixed-address origin, startup zeroing, unique generated key/type, or bootstrap partition; those need a separate physical/control-resource handoff. No new runtime flags. Control: publish initialized without initialization, or drop before detach; the actual memory/lifetime assertion must fail. Difficulty medium for the local proof, high for fixed-address/world refinement.

4. Populated conversion and recursive retirement share one conserved forest

Source: store/scope.rs:215 (convert, especially :261–301), :320 (release), :186 (pending drain); store/children.rs:235/:268.

New guarantee: a single arbitrary valid subtree partitions into adopted, converted and intentionally omitted owners; target publication/epoch and pending destructor updates agree, then recursive draining retires omitted descendants once while preserving adopted physical owners and exterior neighbors.

Already checked: B10 unit-child conversion; B11 parent-enqueue and separate leaf drain; B12 separate populated index-swap tail, empty-map conversion suffix and independent typed retirement. No checked common phase-to-retirement trace or arbitrary indirect-call refinement exists; separate counts are not that join.

Trigger/test weakness: nested heterogeneous migration simultaneously keeps, changes and removes child memories. Loss/duplicate ownership can become visible only after a later retirement, while final values immediately after upgrade pass. Impact very high; likelihood medium, confidence medium.

Smallest cut: derive a reusable linear forest invariant from candidate 2, then an inductive one-owner actual release/enqueue transition decreasing the remaining owned-cell count, and separately a conversion handoff preserving it. Use Creusot ghost resources plus source-selected typed Drop leaves; retain exact callback/type provenance, not merely matching function addresses or identities. Physical allocation origin, pure owner-local converters and exact child-group Drop remain explicit dependencies. B11/B12 complete joins already hit normal SAT caps; guarded static dispatch only proved its own selected case. Do not rerun them larger. Control: leave an old pending destructor or omit descendant enrollment; conservation/type postconditions must fail. Difficulty very high.

5. Real teardown registries justify the final KEEP clean marker

Source: sdk/transient.rs:24/:38/:63/:79; executor/lifecycle.rs:36/:47/:60 (register/clear_providers/assert_providers_drained); sdk/lib.rs:123–128.

New guarantee: clearing callbacks run without held registry/root loans, all declared roots/providers are inspected after destructive callbacks, late recreation/registration prevents the final clean marker, and successful shutdown publishes it only after app, timer, executor and provider teardown. Registration deduplication preserves an acyclic registry and exact reachability.

Already checked: actual wrapper sequencing/controlled startup-marker execution and finite installed upgrades; SDK native tests exercise recreation and late registration. There is no current formal caller of these real linked provider/root loops or their join with the marker write.

Trigger/test weakness: destructor callbacks recreate an earlier cache, or register a previously unused provider during ordinary shutdown. This is ordering across multiple callback owners, usually absent from generated app test cases. Impact high at KEEP/rebinding; likelihood low-to-medium, confidence medium.

Smallest cut: source-preserving loop induction over the old-code registry with callback effect contracts, plus a Kani two-provider actual TLS witness where a later clear recreates the first root. Assert final inspection traps before marker publication. Premises: pure allocation-free inspections, lawful registered statics, no concurrent Wasm threads and platform marker authority. Undeclared statics/cycles and arbitrary application quiescence remain authoring obligations. Join typed root backing only after candidate 3; do not relabel the already-checked wrapper ordering as new. Control: omit final reinspection and require recreated-root/marker exclusion to fail. Difficulty medium/high.

All migration targets retain one synchronous upgrade with DTS and explicit IC rollback; no journals, continuation messages, denial modes or native panic-as- restoration. A useful first wave is 2 + local 3

  • 5, while 1/4 develop the new compositional method rather than repeating the capped whole-object callers.