Physical providers and page authority after batch 7
Source review on 5 November 2026 at factory
4e8875c746b7126da51d3e0eb508dddbe4704463, SDK
16bbcc1f2f4a312631cad3ce74c6b2f044d09cd3. This review reads implementation,
proofs, runners and authored qualifications. It runs no compiler, prover, test
or target, installs nothing and makes no implementation change. Earlier raw
outputs were deliberately removed; this is not fresh result reconsumption.
The next useful work is to make existing metadata proofs consumable by actual
provider clients. Start with a chainable committed claim and the read-only
VecBounds adapter. Growing native and Wasm providers need different resource
contracts; neither follows from the existing pinned borrowed-image model.
Current status
| Boundary | What is established at its recorded source | Remaining connection |
|---|---|---|
| Pool metadata | Twenty-five actual methods have source-erased contracts. The historical complete core closes 180 reports /657 goals at f4c23a0a; the extra committed-fit scope closes 19 reports /114 goals at 46fd62c4. |
These are conditional native64 contracts, not production-provider or target admission. Counts overlap and must not be added. |
| Physical origin | The real-image constructor splits root [0,512), metadata [512,65536) and payload permissions, initializes and rejoins them. |
Its BorrowedBacking holds one quiescent payload slice and cannot expand. It is not VecBacking, VecBounds, WasmBacking or arbitrary live application admission. |
| Committed claim | The specialized actual-body view proves success for an admitted aligned free committed interval, unchanged page count and physical identity/readiness frames. | It omits saved-valid post-state, exact run and owner/boundary frames, so it cannot alone support a second claim or release. |
| Native callbacks | Corrected-profile dense checks cover three positive harnesses, 21 semantic assertions/seven covers and two exact negatives at 6594b158; native execution/four compile rejections complement them. |
Sparse windows have native examples, not a checked ownership bridge. The general region frontend still rejects dyn RetainedBounds. |
| Growth/targets | Scalar wrappers and configurations have separate native and target compilation/execution checkpoints. | No general physical memory.grow, relocating-Vec admission or native-to-Wasm refinement theorem. The later raw wasm64 compilation failure remains distinct from older successful source-built-core qualification. |
These scopes follow the batch record, authority map, resource report, callback report and target report. The reviewed backend and dense-client repairs are already integrated; they are not new open issues.
1. Export a chainable committed-claim contract
Priority: first; a directly useful downstream producer. Actual
Pool::claim
is at lines 302–351. Its checked
claim_committed_proof
has success/count/page/key postconditions at lines 75–91. The general
claim_proof, lines 307–394,
already exports saved validity, exact run and exact owner/head/end effects;
its successful tail uses checked claim_effects and marked_valid.
Strengthen the committed view with the metadata guarantees needed by its next caller: reserved/start bounds, original freeness, exact returned run, saved-valid post-state and preservation of other free intervals/exact runs. Keep the existing current/ultimate resource identity frames. Saved-valid plus exact-run alone is insufficient: without an owner frame, a caller cannot derive that a different candidate remains free for its second allocation.
The simplest attempt reuses the existing checked mark/effect lemmas at the
specialized body's mark_proof tail. It should not conjoin independent whole-body
proofs by assertion. Avoid rebuilding the previous large all-effects VC with
growth, Store byte-zeroing and event histories. If the ordinary budget still
fails, first qualify a Runtime-only committed view: that branch eliminates the
Store zeroing quantifiers and directly serves the runtime page source.
Acceptance requires a real initialized owning image, two checked committed claims, derivation of the second fit from the first call's effects, nonoverlap, release of an exact returned run and rejoining the original root/metadata/payload loans. Add independent false second-fit and lost-first-run controls, plus a wrong-body erasure control. A fixed constructor is a nonvacuity witness; the exported generic contract must retain its actual preconditions and scope.
2. Admit the actual read-only VecBounds queries
Priority: first, parallel with item 1. In
memory.rs,
VecMemory::bounds is at lines 258–263, the VecBounds backing at 318–336,
pool at 338–342 and RetainedBounds::contains at 346–365. They have small
field-based observations and no successful growth. The existing
contains_proof, lines 15–53,
already establishes the exact packed ownership predicate.
Construct the query binding from a real owning image and its separate metadata
permission. Check actual base/count observations and the pool adapter, then
derive VecBounds::contains from the checked Pool query. Export the exact byte
predicate, not an approximate same-page test: ordered/in-extent range, Store root
or wholly Store-owned rounded pages, with the original empty-range behavior.
Derive multiplication/count bounds from the actual image admission. A passing
root-window check is not a saved-format validation theorem.
The metadata query loan must end before the payload callback; it must not become
a retained reference to controls that a disjoint runtime operation may update.
This is query-only admission. Current query shadows are placed under the larger
proof-side ResourceBacking bound even when they consume only metadata/base
observations. Do not manufacture a payload model or claim that VecBounds's
unreachable zero method implements the complete mutating provider contract.
If necessary, separate those proof-only query requirements from the growth and
payload laws; keep the production Backing API unchanged.
Acceptance: construct root/Store/Runtime/free windows in one real initialized image, check endpoints and crossing windows, preserve metadata and unrelated payload loans, and reject exact false ownership/count predicates. The bounded fallback is an honest query-only admitted-image theorem, not whole VecMemory initialization or arbitrary sparse callback safety.
3. Transport sparse loans through the simpler byte callbacks
Priority: next consumer of item 2. In the same SDK source,
check_range at 264–270 performs conversion, addition, extent and sparse-ownership
checks; with_retained_bytes and with_retained_bytes_mut at 513–530 then lend
only that exact slice. These actual APIs offer a smaller first consumer than the
whole RetainedRegion route.
Prove their source-erased range/error behavior and one concrete owning mutable
callback: exact admitted window, safe inside-capability subloans, a middle-byte
write, unchanged neighbors and successful rejoin on both normal Ok and Err
returns. Err here does not undo closure writes. Preserve native compiler
escape/overlap controls and add a false window-origin/frame control. The entry
requires a genuine validated sparse image; do not assume ownership from the
sparse boolean alone. Connect a constructor, or label construction/native
nonvacuity separately until that connection is checked.
The existing complete-module
frontend probe, lines 38–54,
fails on the actual region's Option<&dyn RetainedBounds> type. A narrowly
selected byte-callback context may avoid that type, but that feasibility is
unexecuted here. Preserve exact receiver fields/callee bodies and use strict
erasure plus a reverse extraction audit. If closure support also blocks it,
export the checked check_range producer first and keep callback transport open.
The later whole-region task still targets actual with_retained_region(_mut)
and RetainedRegion::get/get_mut (source unavailable)
at lines 100–114 and 226–244. A monomorphic toy bounds type is not automatically
a proof of its dynamic dispatch. No trusted whole-callback axiom or production
representation change should bypass that boundary.
4. Check quiescent native growth before rebinding authority
Priority: independent leaf; later integration with items 1–3. Actual
VecBacking::grow_to at memory.rs:301–315 computes the target byte length,
reserves and zero-extends the Vec; the production
Backing contract
at lines 59–74 explicitly permits native relocation between loans. The current
physical proof instead preserves a pinned control key.
Start with the actual method over one exclusively owned whole-page Vec and no live old pointer/slice permission. Export exact final length/page count, unchanged old bytes and zero newly exposed bytes on success; false preserves length and contents. Capacity/address stability on failure must not be invented. State the narrow standard-library allocation/reserve/resize laws that remain trusted. Reacquire the actual new pointer and reconstruct separated permissions after growth rather than preserving an old address by assumption.
Acceptance includes empty-to-first-page and one-to-two-page real native cases, nonzero old bytes, target overflow/refusal, a wrong zero-suffix assertion and erasure rejection of an altered resize range. A controlled moving-backing fixture can exercise rebind discipline but does not prove std Vec relocation. Do not repeat large Kani byte-array unrolls unchanged. An abstract-Vec Creusot method proof with named std leaves is the useful bounded first result. Full Pool growth composition remains separate until its resource/key contract can represent relocation.
5. Give the Wasm provider one explicit world authority
Priority: foundational design/prototype alongside the preceding tasks.
WasmBacking (source unavailable)
at lines 34–54 is a unit type; pages observes mutable VM state and grow_to
calls ensure_memory. A pure logical page count of the receiver value cannot
describe those changing observations. RuntimePages at 473–505 and retained
Store use the same actual Pool, so separate assumed owners would be wrong.
Use one nonduplicable proof-only world/VM capability acquired at startup and
thread it through checked observation/growth shadows. Name only the actual
System API/Wasm primitive laws as trust leaves: observed size, failed-grow
effect, pinned old offsets/bytes and initialized new pages. Keep Control,
bootstrap, Store and runtime extents disjoint. Ghost capability plumbing must
erase completely; it is not a production registry or runtime ownership scan.
Derive the admitted profile/address-width and minimum-memory preconditions from
startup before checking pages's cast/subtraction; arbitrary VM sizes are not an
admitted source state.
The first acceptance milestone is deliberately small: exact actual
pages/grow_to wrapper semantics against that same resource, one checked
consumer, token-duplication rejection and a false old-byte/count frame control.
Keep any small actual Wasm execution witness distinct from the native proof.
Then connect RuntimePages's returned address/alignment and exact release token;
metadata counts alone do not grant payload ownership. A conditional primitive
adapter is a useful fallback, provided startup/world admission is still marked
open rather than supplied by a trusted high-level constructor.
Guardrails and deferred work
The dependency split is practical: items 1, 2 and the growth leaf can begin independently; item 3 consumes item 2; production growing clients need a new authority rebind; Wasm is its own physical/target branch. All five can preserve the runtime algorithm, layout, instruction path and Wasm footprint.
Whole-function termination is still separate from checked local variants.
For example, the committed body has a MAX_PAGES - cursor variant, while
standard min/Try/closure termination support remains an imported boundary.
General growth-success completeness and exhaustion need actual provider
admission/refusal premises: Exhausted must never be equated with absence of
every logical free interval. Extend those properties after the chainable
no-growth contract, not by merging the previous large VC unchanged.
Native64 source contracts, source-built target compilation and particular PocketIC executions remain different scopes. This review confirms no additional runtime defect. It adds no new proof or performance result and changes no upgrade policy: migration remains one synchronous upgrade, potentially spanning many DTS rounds, without continuation messages or migration-denial machinery.