1128. The Moho review's rulings: the order in which they land
The Moho design review, the draft
nifeos/record#36, ruled every one-way finding on
2026-11-25 (UTC), and the maintainer ruled findings 7, 8, 13, 14 and 15 provisionally the same
day. This block is the plan that lands those rulings in nifeos/moho_abi, nife and
basalt. It changes no code. The branch is milestone/1128-moho-rulings-implementation-plan, and
the number is provisional.
What drives it: the first publish of moho_abi, and the measurement block that the draft
nifeos/record#37 proposes, which starts once the P0
fixes land. What it saves: one version
change per ruling, and a queue that breaks on a half-moved interface.
Reuse: cargo xtask std-src (it copies moho_abi into the std overlay verbatim), the moho_abi
test that pins every number, script/bench --check, script/fastpath-footprint, the Kani prove
shards, basalt's pin-bump.yml, and the checklist in
design/naming/rename-what-moves.md. One new tool: the generator
of step 1.
Goal
Every ruling of the review is in force in moho_abi and in nife, and basalt pins a nife commit
that carries it. The interface's version moves once for the whole set, from 1 to the pair 2.0.
Each commit on each main builds and boots on all three architectures.
The rulings, grouped by what they touch
| group | rulings | touches |
|---|---|---|
| The method table | 13 (provisional), 14 (provisional) | moho_abi only; no number changes |
| The names | 16, except the order of the map arguments | every caller; no number changes |
| The table crate | the table-size ruling's storage, 9's right | partsfoundry/capability_table |
| The version pair | 5 | moho_abi, partsfoundry/interfaces_note, the start check |
| Numbers and refusals | 2, 3, 4, 11, 16's map argument order | the kernel's dispatch, every refusal a caller tests |
| The message | 1, 10, 6's receive slot, 11's reply-with-capability number | the trap's registers, the IPC fastpath, the std port |
| Slots and rights | 6, the table-size ruling, 9, 12, 4's retype defect | process creation, every capability-installing method |
| Additions after 2.0 | 7, 8, 15 (all provisional) | new numbers behind the unstable feature |
Findings 17 to 19 are two-way and unruled, and this plan does not schedule them.
The census
It was measured at nifeos/nife@6bed50566, nifeos/moho_abi@1e99eed and
partsfoundry/capability_table@968a16f. The full count, with the commands, is in
the census appendix. In short:
moho_abiis about 2,000 lines in 23 modules, with 125 public constants and a pinned list of 116 lines. No partsfoundry crate depends on it, and basalt names none of its symbols.- nife pins
moho_abiby commit in 16 manifests. 212 Rust files outsideuser_mode_runtimenameuser_mode_runtime: 86 in components, 85 in fixtures, 22 in crates. user_mode_runtime's three trap files hold 1,171 lines. Thestdoverlay'srt.rskeeps its own trap and its owninvokein 272 lines, and the overlay has 38 call sites and 29Error::references.- Direct
invoke(calls outsideuser_mode_runtime: 145 lines in 57 files, 37 of them insystem_tests. - The kernel names
moho_abi::373 times in 46 files and holds 27 Kani proofs.inter_process_communicationholds 16 andcapability_table12.
The order
Effort: S is under half a day for a lane, M a day or two, L more. Each moho_abi or partsfoundry
step lands in that repository first, and the nife step after it moves the pin to the landed
commit, cited as <org>/<repo>@<sha>. No pin names an unmerged branch.
Part one: no number changes
The version stays 1 through part one, and the pinned list does not move.
- The method table, in
moho_abi(finding 13). One file lists every system call and method: its object kind, its number, its argument words with their defined bits, its answer words, its refusals and its rights. A generator writes the constants, their doc comments, the typed wrappers and the pinned list from it. The lane commits the output as source, not asbuild.rsoutput, becausecargo xtask std-srccopies the crate intostdfile by file. A test regenerates and compares, so a hand edit fails. The table also emits each method's defined-bits masks, which step 9 needs. Effort: M. Lands alone, inmoho_abi. - What a program author needs, in
moho_abi(finding 14). The trap instruction, the clobbered registers and how a program starts, per architecture, in the crate's own documentation. The program-start section documents four start words, the fourth being the version pair. It may land any time. Effort: S. Lands alone. - nife adopts the generated wrappers. The pin moves to step 1.
user_mode_runtime's hand wrappers become the generated ones or call them, with their names kept, so no caller changes. Thestdoverlay takes the generated module throughcargo xtask std-src, and its own trap andinvokeinrt.rsgive way to the generated ones, so step 11 changes one trap. Size: the 1,171 lines of the three trap files and the 272 ofrt.rs. Effort: M. Lands alone. Its proof is thatscript/bench --checkmoves no row. - The naming pass, in
moho_abi(finding 16, names only). One pass under the four rules, in the table, then regenerated. The order of the map arguments waits for step 9, because it moves words. Every new name is provisional. Effort: M. Lands alone. - nife takes the new names. One pull request, as a rename, with the
sedline in its body for lanes in flight. The size depends on the list. The names the review named reach::WAITon 46 lines in 22 files,::BINDon 26 in 15,::MAPon 93 in 41 andMAP_on 399 in 79. Effort: M. Lands alone. - A table sized at creation, in
partsfoundry/capability_table. Today the size is a const parameter and the free slots are one 64-bit word, so no table can exceed 64 slots. The crate learns a size chosen at creation that never shrinks, a free-slot set wider than one word, and a sixth right,REVOKE(finding 9). The right exists in the crate from this step, and no program can hold or ask for it until step 12. Its 12 Kani proofs move to a bounded runtime size. Effort: M. Lands alone, in partsfoundry. - The kernel moves to that crate. The pin moves to step 6. Every process still gets 64 slots,
and no capability carries
REVOKE, so the interface does not change. Effort: S. Lands alone. Its gates are the kernel's Kani proofs andscript/bench --check, since a slot lookup sits on the fastpath.
Part two: the breaking set, which becomes 2.0
Each step is one moho_abi pull request, then one nife pull request that moves the pin, the
kernel, user_mode_runtime, the std overlay, system_tests and the fixtures together, since
the kernel and every program must agree. The
version moves once, in step 9, and the steps after it change 2.0 before any publish. The
maintainer ruled that acceptable (provisional, first open decision).
- The version pair, in
partsfoundry/interfaces_note. Each record in theINTERFACESnote carries oneu32version today. It learns the pair as oneu32of two 16-bit halves, breaking part high, in a new descriptor version, and keeps reading version 1. Effort: S. Lands alone, in partsfoundry. It may land any time in part one. - The version becomes 2.0 (finding 5).
moho_abireplacesABI_VERSIONwith the pair: a breaking part, which must be equal, and an additions part, which must be at most the kernel's. Both are the halves of oneu32, breaking part high. The kernel hands that word to the first program in a fourth start register, so start takes four words on every architecture. The start check insystem_initializer(serves_declared_abi) compares by the pair against the kernel's pair, not the crate's. The pinned list for version 1 retires, and the one for 2.0 stays open until step 13.ABI_VERSIONappears on 22 lines in 16 files. Effort: M. - Numbers and refusals (findings 2, 3, 4 and 11, with finding 16's map argument order).
- Methods take numbers unique across the interface, the object kind in the high bits. A call
on the wrong kind answers
WrongObject. The implementing lane assigns the numbers, keeps the six that finding 11 rules stable at their assigned values, and shows them in its diff. - An undefined argument word, flag or rights bit faults the caller, read from the table's masks.
writabletakes 0 or 1. An undefined method number faults the same way, andstddrops its probe on method0xffffand reads the version pair. - The fault is a new kind, the argument fault (name provisional), carrying the method number and which word was wrong, zero for an undefined method number.
- The four new codes arrive, each refusal moves to its code, the words after the status on a refusal are zero, and the four reboot codes move into word 1 of the reboot call's answer.
- Reboot goes behind the off-by-default
unstablefeature, whichuser_mode_runtimeenables. - Size: the constants
BADGE(39 lines, 19 files),SPLIT(77, 25),RETYPE_OBJECT(91, 33),SLICE(29, 13) andCAPABILITY_INSERT(30, 15) change value, not spelling, so callers recompile unchanged. The refusals callers test do change:Error::NotPermitted(144 lines, 43 files),Error::OutOfMemory(46, 21),Error::WrongObject(39, 21),Error::BadPointer(38, 15),Error::BadMethod(30, 13) andreboot::(13, 10). The probes that call method0xffffand expect-1break in four overlay files and inuser_mode_runtime, and so doesstd's file system, which assumes the kernel's codes run from -1 to -8. - Effort: L.
- Methods take numbers unique across the interface, the object kind in the high bits. A call
on the wrong kind answers
- One message shape (findings 1 and 10, finding 6's receive slot, and finding 11's
reply-with-capability number).
- Word 0 holds the kernel's status, and every data word moves down one register.
- A message is the kernel-written information word, the data words and an optional capability. Send, call and reply take that shape, and one receive accepts any of them into the slot it names. The kernel refuses an occupied slot with a step 10 code.
- This rewrites the trap's register use, the fastpath (
ipc_send,ipc_call_reply), the rendezvous state machine and its 16 proofs, thestdoverlay's own trap, and every rawinvoke. - Size: the receive family collapses into one call.
receive(126 lines, 51 files),receive_capability(37, 15),receive_request(36, 30),receive_message(25, 15),call_receiving(17, 10) andreceive_capability_message(2, 2) make 243 lines in at most 123 files.send,callandreplykeep their shape for a caller, so their 1,224 lines change only where a caller reads a raw word. The 145 directinvoke(lines all move by one word. - Effort: L.
- Slots and rights (finding 6, the table-size ruling, findings 9 and 12, and finding 4's
retype defect).
- Every capability-installing method takes its destination slot and refuses an occupied one
before it spends anything. That also fixes the retype defect, where
RETYPEandRETYPE_OBJECTspend pages before they find the table full. - The creator sets a table's size as an argument of process creation and pays for it from its
own region.
CAPABILITY_TABLE_SLOTSleaves the interface, and an out-of-range slot answersInvalidArgument. - The start call takes the supervisor's rendezvous slot and the supervised flag, and
FAULT_RENDEZVOUS_SLOTleaves. REVOKEbecomes the sixth right.GRANTno longer revokes,ALLincludesREVOKE, andSPEND_ONLYdoes not.- Size:
CAPABILITY_TABLE_SLOTS(40 lines, 23 files),FAULT_RENDEZVOUS_SLOT(33, 20),rights::GRANT(31, 10) andREVOKE(63, 28). The installing wrappers have 80 call lines:retype_into_page_frame26,retype_into_kernel_object22,thread_control_block_capability_insert9,split_memory_region6,retype_page_frame_run5,thread_control_block_configure6,thread_control_block_start4 andslice_page_frame2.capability_plan's five proofs assume a fixed slot bound. - Effort: L.
- Every capability-installing method takes its destination slot and refuses an occupied one
before it spends anything. That also fixes the retype defect, where
- 2.0 is whole, in
moho_abi. The generator writes the pinned list for 2.0 from the table. The test that refuses a reused number starts again from 2.0's numbers. The full list of new names goes to the release review. Effort: S. Lands alone. A tag is an outward step. - basalt follows. basalt names no
moho_abisymbol, and nife's queue already builds basalt's delivered programs from the candidate tree (milestone 1115 (the gate builds basalt's delivered programs from the candidate tree)), so basalt needs no source change. Itspin-bump.ymlpull request moves the nife pin to the commit of step 12, citing it asnifeos/nife@<sha>. Effort: S. Lands alone, in basalt.
Part three: additions
- The additions (findings 7, 8 and 15, provisional). Each takes a new number behind
unstable(finding 11), as onemoho_abipull request and one nife pull request. Each lands alone, in any order, at effort M.- Finding 7: a method that copies a capability in place under a rights mask, and a rights mask on any message that carries a capability, since step 11 leaves no separate reply call for one.
- Finding 8: a non-blocking send and a poll.
address_space::WAITgains an absolute deadline, which endsstd's spinning inCondvar::wait_timeoutandpark_timeout. Deadlines on message passing wait for the speed measurement. - Finding 15: a rights query.
Gates
Every step passes script/lint and the repository's CI. Beyond those:
| step | gates |
|---|---|
| 1, 4, 13 | the regenerate-and-compare test; the pinned-number test; the moho_abi template's naming checks |
| 2 | the moho_abi documentation build |
| 3, 5 | script/test on all three architectures; script/bench --check with no row moved |
| 6 | the crate's 12 Kani proofs; its loom and mutation selftests |
| 7 | the kernel's Kani proofs; script/bench --check; script/fastpath-footprint |
| 8 | the crate's tests, including a version 1 note still read |
| 9 to 12 | script/test on all three architectures; Kani prove shards for each changed harness; script/bench --check and script/fastpath-footprint, with a # why: line on each saved row; the falsification patches regenerated; cargo xtask std-src and std_exerciser |
| 14 | basalt's gate, which runs script/ci-build test on all three architectures |
| 15 | as 9 to 12, for the methods it adds |
Risks
- The fastpath. Step 10 puts a kind check and an undefined-bits check on every send and call,
step 11 writes the information word, and step 12 checks the receive slot.
ipc_sendandipc_call_replylive in.text.hot.*, andscript/fastpath-footprintkeeps their footprint inside a 5% band. x86_64 already runs near that band, so each step must measure it before pushing. A step that leaves the band owes a proposal, not a widened band. - The icount tripwire.
script/bench --checkholds each row within 0.5% and the sum within 2%. Steps 10 to 12 will likely movenull_system_call,ipc_rtt,ipc_rtt_el0,call_reply,relay_rttandbroker_rtt, and step 12spawn_reapandspawn_el0. Each save carries a# why:line that names the ruling it pays for. - Kani harnesses that pin layouts.
capability_table's 12 proofs assume one free-slot word,inter_process_communication's 16 assume today's message, andcapability_plan's five take their slot bound fromCAPABILITY_TABLE_SLOTS. A runtime table size makes a proof's bound an assumption the harness states; a bound too small proves less than the old one. - The
stdport. The overlay copiesmoho_abiverbatim, keeps its own trap andinvokeinrt.rs, probes with a method number that every step from 10 on gives a new meaning, and assumes the kernel's codes infs. Step 3 retires the overlay's own trap; if it cannot, step 11 changes two. - The falsification patches. 27 name
moho_abioruser_mode_runtimein their context, and three name the fastpath. A step that changes that context regenerates them in the same commit. - The measurement block's baselines (nifeos/record#37). Its items 1 and 4 may start against today's interface. Steps 10 to 12 move the very rows they measure, so each of its measurements names the nife commit it ran on.
- Lanes in flight. A nife lane that names a receive variant, a raw word or a slot constant
breaks on its merge of
mainafter steps 10 to 12; each pull request body gives the change.
Open decisions
The open-decisions appendix gives each question the rulings leave open its background, options and recommendation, with the prior art.
All seven are ruled (the first, sixth and seventh provisionally, by the maintainer). Each ruling sits in its step; the appendix keeps the rule in force.
The outward steps
Each needs its own go, as every publish and tag does.
- The 2.0 tag on
moho_abi, after step 13. - The release review of every name the set minted (finding 16).
- The publish of
moho_abito crates.io.
Done when
moho_abi'smaincarries the method table, the version pair at 2.0, and the pinned list for 2.0, and the version moved once for the set.- nife's
mainpins that commit, and its kernel, runtime,stdport, tests and fixtures speak 2.0. - basalt's
mainpins a nife commit that carries 2.0, and its gate is green. - Every saved bench row in the set names the ruling it pays for.
- The release review's list holds each provisional name.
BUGS
- The wrapper counts are upper bounds:
send,callandreplyalso match functions that are not the wrappers. - The census counts lines, not occurrences.
- Effort figures are estimates from the census, not measured lane times.
- The size of step 5 waits on the naming pass's list; the counts above cover only the names the review named.
Index row
The Moho review's rulings land in order. First come the method table, the names and a table sized
at creation, with no number changed. Then the version becomes 2.0 once, and numbers with refusals,
one message shape, and slots with rights land in turn, each as one moho_abi and one nife pull
request. Additions follow behind the unstable feature, and the tag and the publish each wait for
a separate go.