roadmap BUILT

268. Every architecture boots the same way: describe the machine, test yourself, hand over

Every rung is built on all three architectures, and the top rung is gated; see the third pass.

The ladder was decided (calef, 2026-09-09, in conversation), and nothing in it was a design fork.

This page is complete on its own. The working behind it is in four appendices, indexed in 0268-the-boot-ladder/README.md:

What calef decided, so a lane does not re-litigate it

The four findings this is built on

Each was measured on 2026-09-09; findings.md has the detail.

  1. machine.rs existed on x86_64 only. The other two printed the same device-tree facts scattered through main.rs and had no machine module at all.
  2. aarch64 had no exceptions::self_test; riscv64 and x86_64 did, plus an unnamed kernel mapping check. The concept and the name were already in the tree, uncollected.
  3. Stage::Tour could never fire on aarch64 or x86_64. Its one marker string lived in the RISC-V arm, so --until tour was unreachable there, and a missing marker looks exactly like a slow board.
  4. The tour's checks printed FAILED and continued, reaching the same end state either way. That is rung four of AGENTS.md's ladder, and it is why finding 3 hid for months.

The name self_test was the tree's before the question was asked: two architectures already ran arch::exceptions::self_test() at boot. It does not collide with test, which means the suite. POST is Dell's, on xenon's own firmware screen.

What to build

  1. machine on all three architectures, in the kernel, before userspace. The parity claim is the same questions answered, not the same lines printed, because one machine has ACPI and two have a device tree. The required set: processors, memory, console, interrupt controller, timer rate, initrd, PCIe window, IOMMU. Each architecture answers in its own vocabulary; each answers all of them or says plainly that it cannot.
  2. Collect the existing self-tests behind one self_test, give aarch64 the exceptions one it lacks, and run the set on all three.
  3. One verdict line, and it is a contract. Stable text, identical on all three architectures, because its audience includes board_console and CI. The tour's failure was never that a human missed a line. The only matchable string lived in one architecture's arm, so on the other two there was no signal on the channel at all.
  4. Nothing halts by default. The boot proceeds to userspace and to the swish prompt.
  5. board_console learns the new ladder: Handoff -> Banner -> machine -> self-test verdict -> prompt. A failed verdict is an outcome distinct from a clean boot, so a degraded board on the bench does not read as a good one.
  6. CI fails when a boot self-test reports a failure. With the boot no longer gating, this is the mechanism that keeps the verdict honest; without it this milestone recreates finding 4 with better prose.

The measurement builds keep parking before userspace, and that must not change. bench, icount, soak and jobmix all deliberately stop short of it. kernel/Cargo.toml's feature comments give the reason: a board has no command line, so these are compile-time or they are nothing. "Nothing halts" is about the default boot and only about it.

The proof: --until reaches the self-test verdict on all three architectures, and the same failure injected into any one of them turns the verdict red on all three and fails CI. Not a survey of what each arm prints, and not a marker that exists on one architecture, which is the defect being fixed.

BUGS (as planned)

What was built

First pass (2026-09-14): every rung below the prompt

first-pass.md has the transcripts. script/boot-check reached a green verdict on all three architectures and, with the failure injected as a default feature, a red one on all three with exit 1, which fails CI. cargo xtask board-console --until selftest gave the same answers, because the bench tool and the gate are the same recognizer.

  1. The machine description answers the eight questions on all three, each in its own vocabulary. print_machine_description stays in kernel/src/main.rs, where milestone 267's lint reads it.
  2. kernel/src/self_test.rs runs five checks on all three: exceptions, mapping, frames, timer, scheduler. The two that were already in the tree left the tour and gained two architectures.
  3. The verdict line is nife self-test: 5 of 5 passed / ..., 1 FAILED: <names>. Wording provisional.
  4. riscv64's default boot hands over to a swish prompt rather than halting, as aarch64 already did.
  5. board_console gained Machine -> SelfTest -> Prompt, and a failed verdict is Failure::SelfTestFailed, not a stage. Eight new host tests.
  6. CI fails on a red verdict through script/boot-check, a local row in script/ci-build's table (milestone 286 (one enumeration of the checks that gate a pull request)).

The rungs are strings two binaries agree on, so AGENTS.md rule 7 made them a crate, crates/boot_ladder (name provisional), read by the kernel, swish and board_console. A fifth finding had finding 3's shape: Stage::Banner was unreachable on aarch64, which printed no nife on line; it does now. Two smaller defects were fixed on the way: riscv64's mmu::print_summary was unimplemented!(), and x86_64's exceptions::self_test returned a cumulative count rather than a delta.

components/src/builder.rs is retired, its claim one of the collected self-tests (calef, 2026-09-14: "Retire builder"). Milestone 295 (retire components/src/builder.rs) performed it.

Second pass (2026-09-14): x86_64 stops halting

Built in one lane with milestone 182; second-pass.md has the transcripts. The x86_64 default boot hands the machine to the progenitor, which reaches ring 3 and builds the system. It could not yet offer a prompt, since its console server could not reach port I/O under §121 (port I/O as a capability), and it said so instead of going quiet. Three gates keyed on the old halt line now wait for boot_ladder::SELF_TEST. Two BUGS closed:

Third pass (2026-09-19): the top rung, gated

script/boot-check asserts the swish prompt on all three architectures; third-pass.md has the transcript. Each leg packs its archive first, because the packer writes the measurement manifest kernel/build.rs reads. --inject still comes back red and stops at the verdict.

The cost was measured before it was chosen: the whole gate went from 19.4 s to 25.6 s, all of it packing archives. The x86_64 leg boots the PVH -kernel image, not the UEFI one, which script/swish-check boots under OVMF in about six minutes. This gate reads and does not type, so it does not need that fidelity. At equal cost the customer's image would be the better thing to boot, so this is a decision made on cost and written down as one.

Two things were found and fixed. host::cargo leaked NIFE_DISK into the runners, turning two of three legs red; the leg now sets the child's environment explicitly. Stage::Prompt's doc still called the rung unreachable on x86_64.

Follow-on

BUGS (as built)

Index row

calef, 2026-09-09. Parity is the demonstrator's claim (§19) and three boot arms had quietly diverged: machine.rs on one architecture, self_test on two, a Stage::Tour marker reachable on one. Every architecture now describes its machine, runs the same five self-tests behind one verdict line, and hands over to a swish prompt rather than halting. script/boot-check reads the whole ladder with the same recognizer a bench run uses, and --inject proves it can come back red.