Check the assumptions behind a proof

Checking the page proof’s backing assumptions found a native provider that accepted partial pages. RSX now rejects them before changing the retained image.

Follow the whole-page assumption to the provider

The page pool relies on a provider that reports committed memory in whole pages and exposes newly grown pages as zeroed. While checking the native backing for those properties, reviewers found a gap in VecMemory, which can wrap a byte buffer and initialize a retained store on it. The provider counted complete pages, so a partial page at the end of the original buffer could survive into memory later treated as freshly grown. That violated the zeroed-page guarantee used by the pool.

Reject the image before changing it

The fix checks alignment before retained initialization writes metadata or changes the mode. Empty and whole-page buffers can proceed to the normal format checks. Plain byte buffers can still have arbitrary lengths, and reopening a retained image already required alignment. This keeps the guard at the boundary where a native buffer assumes retained-page semantics.

Check the rejected and accepted cases

The regression tests cover four partial-image lengths and confirm that rejection leaves the original bytes and mode intact. An aligned-image test checks that initialization preserves the root data and that growth exposes a fully zeroed page. All 44 platform tests passed on the pinned fix. The provider check is a concrete outcome of auditing a proof assumption where production code has to establish it.

Code, tests, and related material