roadmap BUILT

342. The kernel and the console server drive one UART from two address spaces, and nothing arbitrates

Premise re-checked 2026-09-19 and it holds. §149 (may the kernel answer on an endpoint) decided how a program reaches a console server and was itself dissolved by §121 (what a device capability is when the device has no page)'s reopening, which is a different question. script/swish-check's own BUGS still describes the interleaving as a live defect in the system rather than in the script. Milestone 243 (a machine with no serial port has no way to say anything)'s BUGS still records that it "has its own home", which is this block.

The question's home is §175 (where the kernel's own output goes once userspace owns the console), which decision_dependencies names.

Priced, 2026-09-27 (PRICING lane, calef's approval)

notes/kernel-console-arbitration-pricing.md answers §175's two open items: the hardware fact per board, and what a panic costs under each option. It prices a fifth option calef asked for (release builds go quiet, seL4's shape), and confirms the interleaving with a captured, byte-exact CI transcript already in-tree (xtask/src/swish_check.rs's SHREDDED_CI_TRANSCRIPT), rather than assuming it.

Highlights: a second port is free under QEMU on all three architectures, and confirmed absent, unconfirmed, or flatly impossible on the three real boards respectively, worst on xenon where there is no second serial connector at all. The kernel's collision surface is larger than §175 measured. They are two routine gauges, not just fault reports. One of the two (capability slots:) has no equivalent filter to the one already built for the other gauge after it caused this exact failure once. The release-only option does not touch CI at all, since CI never builds release.

No option is recommended, per §175's own reasoning and AGENTS.md's rule to give options rather than a recommendation on an irreversible fork. Still no work on the fork itself: this remains NOT-STARTED pending calef's ruling on §175.

Where the kernel's own output goes once userspace owns the console is a design fork rather than a bug to fix, and it is an architect's. The options are genuinely different systems, not variations on one, and the choice binds every architecture and every future console consumer.

Decided, 2026-09-27

calef ruled §175: B, with a panic escape and a fallback, the same shape as pull request #1423's system log (design/decisions/0242-a-system-log.md). See §175's "The ruling" for the full record and why A, C, D and E lost.

The ruling names a customer for the kernel's ring: the log service is milestone 613 (a system log service: the in-memory half), which drains the ring and forwards whole lines to the console. 613 was built on 2026-10-02 (pull request #1494), and this milestone is claimed by lane milestone/342-kernel-console-arbitration (draft pull request #1498) from 2026-10-03 (UTC).

The drain is a system-call-surface fork, proposed 2026-10-03

§242 (a system log) left how the service reads the kernel's ring to the building lane: a read method on a new object, or a read-only frame plus a notification. Both change the surface §10 (the capability-based microkernel process model) governs, so the lane proposes and stops. notes/kernel-ring-drain.md answers the seven questions and recommends the frame, which needs no new object type and no new method, keeps the property that no user pointer crosses the system call boundary, and matches the machine statistics page's shape. Nothing past the proposal is built until it is ruled.

In brief. Once the console server owns the console, two address spaces are writing to the same UART with no arbitration between them. The kernel writes directly, for the reason §175 gives, and the server writes on behalf of userspace. The streams interleave at byte granularity. Deciding this means saying where kernel output goes: a second port, a buffer the server drains, a claim the server takes and the kernel respects except in a panic, or something else.

Ruled F, and built, 2026-10-03 (UTC)

calef ruled F on pull request #1498: a read-only frame, a cursor page and an append notification, with a counted UART fallback when there is no drainer or it lags. Built on lane milestone/342-kernel-console-arbitration. The names are provisional: kernel_log, kernel_ring, console::Inserter, and the probe features and flags.

Proof

Why this matters

It corrupts every bench session on argon, radon and xenon. A serial log is the only thing those three machines can say, and milestone 216 built a tool whose whole contract is recognising a boot sequence in that stream. Interleaved bytes break that contract in the least visible way available: the log is present, it looks like output, and the line the tool is matching on has a kernel message spliced through the middle of it. A gate that reads a board reads this.

It is also already load-bearing somewhere it cannot be fixed. Milestone 243's BUGS points at a home for this question that does not exist, which is the tell AGENTS.md names for being on too low a rung: a fact that lives only in a citation to nothing.

What a lane can do before the ruling

The fork deserves its options priced rather than argued, and none of that needs a decision first. What the kernel actually writes after userspace takes the console, and when, is a measurable list rather than an opinion. Whether the boards have a second usable port is a hardware fact per board. What a buffered path would cost during a panic, which is the case that matters most and the case a buffer serves worst, is the constraint that probably decides it.

Follow-on

Index row

Once the console server owns the console, the kernel and the server write to one UART from two address spaces with no arbitration, and the streams interleave at byte granularity. The kernel writes directly, for the reason §175 gives. The interleaving corrupts every bench session on argon, radon and xenon, where the serial log is the only thing those machines can say. It breaks milestone 216 (nothing in this tree can read a)'s boot-sequence recognizer in the least visible way: the log looks like output, and a kernel message splits the line being matched. Deciding it means saying where kernel output goes: a second port, a buffer the server drains, a claim the server takes and the kernel respects except in a panic, or something else. The choice binds every architecture and every future console consumer. A lane can price the options first. What a buffered path costs during a panic probably decides it.