Repository navigation
logkeeper: the UART's carrier starts within a bound, whatever the rounds have read - #1228
Merged
Merged
Conversation
…nds have read The console UART's carrier starts where the rounds have read past the records the kernel put on the UART itself. Nothing bounded that: a kernel answer naming a position its ring never reaches (a shard of a CPU that never started, fixed at its cause by #1207) left the carrier waiting in `Hub::wire_start` and the UART silent for the machine's life, with no line saying why. A round with no lines never said the start either. The loop owns the awaited event, so the bound is the loop's: the hand-over (`Handover`) carries what the kernel spoke, what the rounds so far owe the UART and a deadline `WIRE_START` (5 s) after it. Every round, with lines or without, says the start once the rounds have read past the kernel's positions, or at the deadline wherever they have read to, with a warning that names both sets of positions. The carrier then starts from there with what the rounds before owe; the kernel's records read later repeat on the UART, which beats a silent one. The loop wakes at least every `POLL_SLOW`, so the carrier's wait on the hub ends within the bound plus one cadence. Closes issues/logkeepers-uart-carrier-waits-for-its-start-with-no-bound-and-no-report.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…y a checked subtraction Clippy's adopted `unchecked_time_subtraction` names the bare `Instant - Duration` in the new test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Japabu
added a commit
to ToyOSOrg/evidence
that referenced
this pull request
Nov 11, 2026
…he adopted lints
Collaborator
Author
Review of #1228 at 3713400ArchitectureThe bound sits with the loop. The loop owns the event being awaited (the rounds' read positions passing what the kernel spoke) and also what the UART is owed. The wait rule
FindingsNo blockers. SUGGESTION (optional):
Evidence
LAND |
Collaborator
Author
Japabu
marked this pull request as ready for review
November 11, 2026 17:06
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The console UART's carrier starts where
logkeeper's rounds have read past the records the kernel put on the UART itself. Nothing bounded that. A kernel answer naming a position its ring never reaches (a shard of a CPU that never started; fixed at its cause by #1207) left the carrier waiting inHub::wire_start, and the UART silent for the machine's life with no line saying why. A round with no lines never said the start either. Recorded inissues/logkeepers-uart-carrier-waits-for-its-start-with-no-bound-and-no-report.md, which this closes.Resulting behaviour
Handoverinsystem/logkeeper/src/main.rs): what the kernel spoke, what the rounds so far owe the UART, and a deadlineWIRE_START(5 s) after it.POLL_SLOW(250 ms), so the carrier's wait inHub::wire_startends within the bound plus one cadence.Decisions
Hub::wire_startkeeps waiting on the hub's condition with no timeout of its own; what it waits for now always arrives. The alternative, await_timeoutin the hub, needs the owed lines moved into the hub or the carrier started from the boot's first line, and a way to tell the loop the start was forced so it stops accumulating. Tradeoff: if the loop itself were wedged the carrier would still not start. Then nothing reaches the replay either, and that is a defect of whatever the loop waits in, not of this start.WIRE_START: a false expiry repeats lines, a missed one leaves the UART silent.Checks
cargo test --manifest-path system/logkeeper/Cargo.tomlat 3713400: exit 0, 28 passed, including the newthe_wire_starts_at_its_bound_whatever_the_rounds_have_read, which drivesHandoverwith instants it chooses (l1228-test.log; at cd9efbb,logkeeper-test-1.log).Handover::overmakes that test fail (exit 101;logkeeper-control.log,logkeeper-control.patch).cargo clippy --manifest-path system/logkeeper/Cargo.toml --all-targetswith the workspace's adopted lints at 3713400 (l1228-clippy.log): the one finding in this change, an uncheckedInstant - Durationin the new test, is fixed by 3713400. The five left are in code this branch does not touch and are onmainas they are here; no gate lints a guest program (issues/userland-programs-are-never-linted.md).--ci hostat cd9efbb was cut short by the machine's disk filling (logkeeper-ci-host-enospc.log); its host-member tests and lint, which do not include logkeeper, were green but for the known macOSllvm::testsred.Hub::set_wire_fromis six lines read in review, and the carrier's start from a said position is held by the existing hub tests.Evidence: ToyOSOrg/evidence
pr-1228, at aaa33277 (linked above per check).Risks
🤖 Generated with Claude Code