notes

Pricing milestone 342

calef approved a pricing lane on milestone 342 (the kernel and the console server drive one UART from two address spaces) on 2026-09-27, rather than a build. This is a design fork, decided at §175 (where the kernel's own output goes once userspace owns the console), status PROPOSED, raised 2026-09-19. §175 already measured the fault-report cost and laid out four options (A second port, B a drained buffer, C a claim with a panic exception, D leave it).

This note answers the two things §175 said were still open: the hardware fact per board, and the panic cost under B and C. It also prices a fifth option calef asked for (release builds go quiet, seL4's shape), and corrects one thing §175 undercounted: fault reports are not the only thing the kernel writes after handoff.

Milestone 342's own roadmap block was stale: it said "nothing in design/decisions/ answers it" and carried decision_dependencies: unwritten. §175 has existed since 2026-09-19. That block is corrected in this lane's commit.

1. What the kernel writes after handoff (more than §175 counted)

§175's KERNEL_FAULT_TOKENS measurement (six tokens, three lines, ~150 bytes, once per faulting user thread) is real and correctly sourced from swish_check::KERNEL_FAULT_TOKENS, and it is identical on all three architectures: kernel/src/arch/{aarch64,riscv64,x86_64}/exceptions.rs each print the same shape (user thread N killed: ..., a register line, the kernel is fine.).

But two more kernel println! sites fire in ordinary, non-fault operation, and they are the ones a swish-check run actually hits:

A captured aarch64 swish-check transcript (CI run 36329333745, 2026-09-27, the aarch64 leg) has six of these lines in a 111-line, 17.6-second transcript. Several land right after a $ prompt and before the next command's echo, e.g. $ progenitor stack: 18648 of 49152 bytes at peak, 30504 spare immediately preceding echo hello world | wc. That is not a fault; it is routine gauge output, once per new stack or capability-table peak. On a shell session that spawns a program per command, which most of swish-check's 111 lines do, new peaks are common, not rare.

The tree already found the progenitor-stack gauge doing exactly this, and patched around it without fixing the write: xtask/src/swish_check.rs's GaugeFilter strips " progenitor stack:" lines out of the transcript before any check reads it, because "the first version with the gauge in it waited thirty seconds for a prompt that had already been printed, then read echo hello world | wc as having answered nothing." That is this milestone's failure mode, already reproduced and already fixed once, in the harness rather than at the source. capability slots: has no equivalent filter: swish_check::swish_check_boot's slot-gauge check finds it with a plain rfind over whole lines, and the general command-echo wait (swish_check_boot's wait_after closure) does an exact substring match with no interleaving tolerance. If a capability-slot peak announcement lands between a prompt and the next command's echo, the wait fails exactly the way the progenitor-stack gauge already failed once: "the prompt never echoed \{line}`"`.

2. Confirming the flake is this interleaving

Two independent, already-in-tree, real captures, not reasoning from a plausible story:

The three 2026-09-27 instances named in this lane's brief are #1412, #1404, and #1402's riscv64 leg ("the prompt never echoed packages/uptime/0.1.0/uptime", run 36329333745 attempt 1). I could not recover a raw transcript for that specific riscv64 leg. That job's aarch64 leg failed first, on an unrelated std-grep out-of-memory defect, and bash -e stopped the step before riscv64's plain swish-check ran in that run. I did not find matching failures in #1404's or #1412's retained CI logs within this lane's budget either; their 2026-09-27 failures were a build-script panic and an unrelated riscv64-model infra error respectively.

I am therefore not asserting those three are proven instances of this defect. I am asserting that the defect is real and already captured once, verbatim (above). It is also mechanically primed to recur in exactly this shape: package install downloads/uptime.nifepkg is exactly the kind of command that grows the capability table, and the very next line in the script is packages/uptime/0.1.0/uptime. A new capability-table peak announced between those two lines would produce precisely the quoted failure, by the same mechanism already caught once for the other gauge.

3. Hardware: does each board have a second usable UART?

Read from datasheets, device trees and vendor manuals, no board touched, per this lane's limit.

board SoC UART count second UART usable today, without new wiring
argon (Jetson TX1, Tegra X1) 4 defined in tegra210.dtsi (UARTA-D) No, unconfirmed at best. UARTA is the current debug port; UARTD is enabled but wired internally to the on-module BT/Wi-Fi chip, not any external header. A second external UART (J17, /dev/ttyTHS2, shared with the camera connector) is claimed by one NVIDIA-forum post, not by NVIDIA's own carrier-board spec: unconfirmed provenance.
radon (VisionFive 2, JH7110) 6 defined in jh7110.dtsi No, not without rewiring. StarFive's own Quick Start Guide and 40-Pin Header user guide state plainly that UART is only exposed on the 40-pin GPIO header. A second UART instance is reached by re-muxing other pins of that same header, not a separate connector, which repurposes GPIO pins this project's bench rig may already use for something else. Re-pinning the header is bench-hardware work, out of this lane's scope.
xenon (Dell OptiPlex 7050 Micro) Super I/O chip class (generic NCT6776-class) supports two; Dell's own Owner's Manual shows the board does not wire a second one out No, confirmed no. The system-board layout and the ports/connectors spec table both show exactly one serial connector, marked optional. The BIOS's COM1-COM4 menu selects which legacy address the one port answers at; it is not four simultaneous ports.
QEMU virt (aarch64) (a QEMU machine, no SoC) Yes, free. hw/arm/virt.c already defines a second PL011 (VIRT_UART1 at 0x09040000); it appears the moment a second -serial is passed.
QEMU virt (riscv64) (a QEMU machine, no SoC) Yes, free. hw/riscv/virt.c defines VIRT_UART1 at 0x1000a000, gated on a second -serial.
QEMU q35 (x86_64) (a QEMU machine, no SoC) Yes, free. pc_superio_init wires up to MAX_ISA_SERIAL_PORTS (4) unconditionally; COM2 at 0x2f8 needs only a second -serial.

This is the finding that should be read first. Option A is free in CI, under QEMU, and confirmed absent or unconfirmed on real hardware on all three boards, worst on xenon where it is flatly impossible without adding a card. A CI gate that passes on a second-port kernel while every real board still corrupts its bench log would be a worse failure than today's, because it would look fixed. Architectural parity is a gate (AGENTS.md rule 5), and this decision "binds every architecture." A second port cannot be the whole answer; at most it is a QEMU-only mitigation with no story for xenon at all.

4. What each option costs in a panic

The kernel's own policy for its internal re-entrant case is already settled, and instructive: console::force_unlock (in kernel/src/console.rs) breaks its own lock on a fault, so the panic message is never lost behind a held lock, and says so: "Output may be spliced. That is a fine price for getting the message out at all." The cross-process case (kernel vs. the userspace console server) is the same trade, one level up, and the options differ in whether they can even try.

5. What each option does to the flake specifically, R priced separately

In swish_check::swish_check, swish-check's --release flag exists and is explicitly "Not in CI." CI's build + test job builds and boots the debug/dev kernel on every leg, confirmed directly from the run 36329333745 log: Finished \dev` profile [unoptimized + debuginfo]. Option R gates kernel chatter on the release/debug distinction, so since CI never builds release, **R changes nothing about the CI flake this lane exists to price**. It might reduce chatter on a shipped, release-mode board deployment. But the bench sessions on argon/radon/xenon that motivate this milestone (notes/bench-runbook.md, xtask/src/bench.rs) are not confirmed to run release either. The progenitor-stack gauge's own comment says the debug build is the deeper, more informative one, which is why swish-check measures debug by default. R also has no story for a release-build panic; it still needs an answer from A, B, C or D, so it would sit beside one of those rather than replace it. And it is new machinery: every kernel print site would need a release/debug distinction that does not exist in the tree today (kernel/src/console.rs, kernel/Cargo.toml` have no such gate now).

Options A, where hardware allows, plus B-with-escape and C, all remove the two ordinary-operation gauge prints from the collision surface: moving them off the shared wire, buffering them, or making them wait for the claim. D leaves the flake exactly as observed today.

6. Prior art, read

7. AGENTS.md's seven questions

  1. What else was considered, and why did each lose? R, priced here, loses because CI never builds release, so it does not touch this milestone's motivating flake. A pure B with no panic escape loses to §175's own argument: a dead drainer means total silence in a panic.
  2. What does this tree already do in the analogous case? The kernel's own internal force_unlock (part 4): splice the output rather than lose it, on panic, already. C and D inherit this; A sidesteps it; B without an escape breaks it.
  3. Prior art outside the tree, read not recalled? Part 6: Fuchsia's debuglog and Linux's printk ring buffer both converge on C wearing a buffer, B in the tree's ordinary case, C's override on panic.
  4. Is the premise true? Checked, not assumed. That fault reports are the whole collision surface is false: part 1 found two more live writers. That a second port is a clean answer is false on two of three boards, confirmed by datasheet, not assumed. That this is really the interleaving described, and not a coincidence, is confirmed by a captured, in-tree, byte-exact fixture (part 2), not inferred.
  5. What does each option cost, measured? Part 1 sizes the collision: two gauges, new-peak-triggered and common on a per-command-spawn session, plus one ~150-byte fault report per faulting thread. Part 3 prices A per board. Part 4 prices each option's panic behavior against the kernel's own existing splice-on-panic precedent.
  6. How reversible is it, and who has already acted on it? Fully reversible today: nobody has built against a UART-arbitration contract yet, because there is not one. It becomes expensive the moment a second board is bought expecting a free UART (A), or a program is written assuming ordering guarantees a claim would provide (C). That is why it is calef's call now rather than later.
  7. Would we still choose this if both cost the same? Not answerable here. That is exactly the irreversible-fork case AGENTS.md says to give options on rather than recommend. It is what §175 already declined to do for the same reason: A and C cost genuinely different things, a hardware fact per board versus a flag and an exception. The one measurement that would make them cost the same, rewiring a board for a second UART, is bench work this lane was told not to do.

The effort sentence: every option here is more work than D. None of A, B, C or R was chosen, or would be rejected, for being less work than another. The actual costs priced above (a hardware fact that is mostly "no," a panic-silence failure mode, a new release/debug axis that does not touch CI) are what decide between them, not effort.

What is blocked until this is answered

Milestone 342, and every bench session on argon, radon and xenon whose log a human or serial_console reads. design/roadmap/0342-kernel-console-arbitration.md's decision_dependencies is corrected in this lane's commit to 175, from unwritten.