roadmap BUILT

659. A region retypes a frame run

Status BUILT 2026-09-27: built on PR #1373, recorded as DECISIONS §233. (Title and slug are drafts.)

Raised by the lane for milestone 23 (a capability-routed component OS with live replacement) while starting the handoff page count the line_editor swap needs. Its state with history is a little over one page (notes/interactive-stack-swap.md).

It changes the meaning of an argument of an existing method, MemoryRegion::RETYPE, which is the system call surface and so an architect's call under §10 (process model: capability-based, microkernel).

The finding

§102 (a Frame names a run of pages) made a PageFrame capability able to name a run, and MAP and MAP_INTO map a whole run in one call. Only the kernel can mint one. MemoryRegion::RETYPE takes no arguments and always makes a one-page frame (kernel/src/system_call.rs, memory_region_retype). So a supervisor that wants a two-page handoff page for a component has no one-capability way to make it, although the pages it would get are already contiguous: a region hands pages out from a watermark (crates/memory_regions/src/table.rs, retype_page).

Options

Ruled

calef, 2026-09-26: option A. Built on PR #1373 (branch milestone/23-retype-run), with the arithmetic proved in crates/memory_regions and a guest test through the real handler; the decision is recorded as DECISIONS §233 (MemoryRegion::RETYPE takes a page count).

What it unblocks

The handoff page count (component_plan::Handoff grows pages), then the line_editor swap, then redoxfs_server's eventual handoff, which will not fit in one page either.

Follow-on

Index row

MemoryRegion::RETYPE always makes a one-page frame, so a supervisor cannot make a two-page handoff page in one capability. Proposed: let it retype a run, which changes an argument of an existing system call and is an architect's call.