Skip to content

issues: the kernel-is-small track's input steps and exits deliver to the owner of input over the input port, and step 10's exit checks the kernel's streams deleted - #904

Merged
Japabu merged 5 commits into
mainfrom
wt/toyos-records-input
Oct 13, 2026

Conversation

@Japabu

@Japabu Japabu commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

issues/the-kernel-is-small-interrupts-post-and-threads-wait.md no longer routes keyboard and mouse input through the kernel. Every clause of the track that presupposed a kernel feed is rewritten to the input ruling: userland owns the merge, drivers deliver to the owner of input over the input port, the kernel's merge is deleted, and the kernel's keyboard and mouse streams go when their last kernel source leaves, which step 10's exit checks.

The ruling is #899's, applied to usbd on #901 and recorded as #901's review NOTE 6. The fence was widened to the exits by the ruling on #901, recorded here. Nothing else in the file changes.

What changed, per clause:

What I am unsure of: Step 10's exit cites the toyos-input test by what it checks, not by a name. #901's design does not name it yet.

The AMD bench's failure line is not filed again. issues/a-metal-job-that-fails-on-the-amd-bench-is-reported-as-failing-on-the-t14.md already records it at its site: Boot::job_passed, tests/common/metal.rs:490-498. Its exit is one a test can fail. #873's AMD judge line is one more reading of the same defect. This branch does not edit that issue, because an existing issue is edited only by the branch that takes it up.

Gates

  • cargo run -- --ci host at ee3d8d62c, on origin/main at 6080e839d: EXIT=0, recorded as the log's last line (log).
  • No production code, test or manifest changes, so no guest test is reached and no design round is owed.

Growth: one issue file, +29 −13 lines.

🤖 Generated with Claude Code

https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy

…'s owner over the `input` port

Step 10 sent USB HID to the kernel's keyboard claim, and stage 7 step 2 had
ps2server feed the kernel's keyboard and mouse streams so the merge stayed in
the kernel. The ruling on #899 (issuecomment-6137234392), applied to usbd on
#901 (issuecomment-6137234651, and the review's NOTE 6 there,
issuecomment-6137611615), puts the merge in userland with no kernel feed. Both
clauses now say the drivers deliver to the screen's owner over the `input`
port, and that the kernel's keyboard and mouse streams go when their last
kernel source leaves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
@Japabu

Japabu commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Widening the fence: this branch also takes step 10 exit's third clause and stage 7.2's keyboard-claim sentence and kernel test, rewriting them to the input ruling (userland owns the merge; the kernel streams go with their last kernel source). Ruled on #901.

Japabu and others added 2 commits October 13, 2026 07:21
…release, not a keyboard claim

Step 10's exit named "the keyboard's by stage 7 step 2's kernel test on
usbd's claim", and stage 7 step 2 refused a keyboard claim while no
source existed and owed a kernel test of a keyboard claim handed to the
next claimant. Under the input ruling (#899, applied to usbd on #901)
neither driver holds a keyboard claim, so all three presupposed a kernel
feed that is gone.

Step 10's exit now holds a key usbd held at its death to the owner of
input's `toyos-input` release test, as #901's accepted design maps it.
Stage 7 step 2 names ps2server's one kernel claim, the `isa` row, and its
kernel test is `isa_lines_reach_their_holder`'s dead holder leaving no
record to the next, as #899's accepted design maps it. Taken here by the
ruling on #904 that widened its fence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
@Japabu Japabu changed the title issues: the kernel-is-small track's input steps deliver to the screen's owner over the input port issues: the kernel-is-small track's input steps and exits deliver to the screen's owner over the input port Oct 13, 2026
@Japabu

Japabu commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Review, round 1: head 8728cbf97

Read against origin/main at 6080e839d. git log origin/main..8728cbf97 has three commits: 4068a0cda, the merge 1eaf1fbb0 and 8728cbf97. git diff --shortstat gives 1 file, +21 −13. All of it is in issues/the-kernel-is-small-interrupts-post-and-threads-wait.md, with 0 lines of production code and 0 of tests. The cargo run -- --ci host log at 8728cbf97 ends Host: 76 step(s), all green. Its FAILED lines all fall inside [ci] control arms, each of which reached its verdict. No guest test is reached, and no design round is owed for a records change. Each rewritten clause was checked against #899's body at 74aea28dc ("The track's step 7.2, and its exit", "The merge moves to userland whole", "Negative controls") and #901's body (section 3, section 8's toyos-input row, "S5's exit"). It was also checked against the rulings issuecomment-6137234392, -6137234651 and -6138651083.

The 7.2 kernel test matches #899's mapping. It names the existing T14 row isa_lines_reach_their_holder (tests/toyos.rs:968), whose dies role is the part this step owes, and the stated control matches #899's IRQ[row].clear() mutation.

BLOCKER

  1. issues/the-kernel-is-small-interrupts-post-and-threads-wait.md:184-186 — the rewrite adds a deliverable to step 10: the kernel's keyboard and mouse streams go when their last kernel source leaves. No exit reads it. Step 10's exit (lines 188-211), stage 5's exit (which is "step 10's") and 6.4's exit (also "step 10's") can all be met with kernel/src/keyboard.rs, mouse.rs, input_merge_test.rs and DeviceType::Keyboard/Mouse (sdk/abi/src/syscall.rs:551,555) still in the tree. S1 of the xHCI move into usbd: a FAT entry that grows its file is written a cache flush after its chain and data, held by a module test that stops the disk inside a flush epoch #901's S5 closes against this exit alone ("S5's exit is the track's step-10 exit as it stands once issues: the kernel-is-small track's input steps and exits deliver to the owner of input over the input port, and step 10's exit checks the kernel's streams deleted #904 lands"), so the deletion the ruling makes possible could land unchecked. This is the deletion S1 of the xHCI move into usbd: a FAT entry that grows its file is written a cache flush after its chain and data, held by a module test that stops the disk inside a flush epoch #901's round-1 BLOCKER 2 required. Fix: add to step 10's exit something a build or grep can fail, for example keyboard.rs, mouse.rs and input_merge_test.rs gone from kernel/src, and no Keyboard or Mouse device class in sdk/abi.
  2. issues/the-kernel-is-small-interrupts-post-and-threads-wait.md:182-183 and :313-314 — "delivered to the screen's owner" and "delivering to the screen's owner" state the ruling more narrowly than the owner gave it. The ruling names "the userland owner of input, which is the inputserver Design: one userland input owner for the ARM desktop #868 proposes, or the compositor until Design: one userland input owner for the ARM desktop #868 lands" (issuecomment-6137234392; -6137234651 for usbd). ps2server: the i8042 driver leaves the kernel, and the owner of input merges every source #899's own text says that Design: one userland input owner for the ARM desktop #868's inputserver "takes the acceptor". Once Design: one userland input owner for the ARM desktop #868 lands, the track as written sends ps2server and usbd to the wrong program. Fix: write "the owner of input", as step 10's exit already does at line 192.

NOTE

  1. issues/the-kernel-is-small-interrupts-post-and-threads-wait.md:193-195 — "red with either release widened or removed" claims four mutations. The test the clause names checks two things: a connection's end releases every device it carried, and a gone releases only its own source. That test is red under three of the four mutations. It is not red when a connection's end is widened to release another connection's devices, because nothing in the clause's claim covers that case. S1 of the xHCI move into usbd: a FAT entry that grows its file is written a cache flush after its chain and data, held by a module test that stops the disk inside a flush epoch #901's section 8 states two controls: Merge's release on a connection's end removed, and gone releasing its whole connection. Fix: either add "and nothing another connection carried" to the claim, or name S1 of the xHCI move into usbd: a FAT entry that grows its file is written a cache flush after its chain and data, held by a module test that stops the disk inside a flush epoch #901's two controls exactly.
  2. issues/the-kernel-is-small-interrupts-post-and-threads-wait.md:313-320 — ps2server: the i8042 driver leaves the kernel, and the owner of input merges every source #899's accepted text for this step says "the kernel's merge is deleted, and its streams carry its own sources' records unmerged until usbd takes the last of them". The rewrite drops the kernel merge's deletion (HELD, merged_buttons, SOURCE_EXISTS). "Where userland merges it" only implies it. Fix: state the deletion in the step.
  3. PR body, Gates — the evidence log carries no exit code of its own. EXIT=0 appears only in the body, while the log ends at all green.

SEND BACK

… owner of input, not the screen's

Review round 1 on #904. Step 10's exit now fails while `keyboard.rs`,
`mouse.rs`, `input_merge_test.rs` or a `Keyboard`/`Mouse` class in
`sdk/abi` remains. Step 10 and stage 7 step 2 deliver to the owner of
input, as the ruling names it, not the screen's owner. The `toyos-input`
test's controls are #901's two, exactly. Stage 7 step 2 states the
kernel merge's deletion in #899's words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
@Japabu Japabu changed the title issues: the kernel-is-small track's input steps and exits deliver to the screen's owner over the input port issues: the kernel-is-small track's input steps and exits deliver to the owner of input over the input port, and step 10's exit checks the kernel's streams deleted Oct 13, 2026
@Japabu

Japabu commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Ruling on the open point: the track's order puts 7.2 (ps2server) before step 10 (#900's order item 1), so the kernel's last input source at step 10 is usbd's, and the exit can be met. Say so in step 10's depends.

@Japabu

Japabu commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Review, round 2: head a5c8e226e

Read against origin/main at 6080e839d. Since 8728cbf97 the branch adds one commit, a5c8e226e: +12 −7 in issues/the-kernel-is-small-interrupts-post-and-threads-wait.md. Over the whole branch it is 1 file, +26 −13, with 0 lines of production code and 0 of tests. The evidence log (ci-host-a5c8e226e.log) ends Host: 76 step(s), all green and then EXIT=0.

Round 1

BLOCKER

  1. issues/the-kernel-is-small-interrupts-post-and-threads-wait.md:182-186 — the owner's ruling (this PR's newest comment, posted after a5c8e226e was committed) is not applied. The ruling is that 7.2 comes before step 10, and step 10's depends must say so. At this head, step 10's body does not say it. Without it, step 10's new exit is only meetable by an ordering that nothing in the step states. That exit (lines 191-194) deletes keyboard.rs and mouse.rs and drops Keyboard/Mouse from the ABI. That can only be met once ps2server has taken the i8042, the kernel's other remaining source. Today the only place the ordering appears is the "What is left" list (lines 20 and 29-30), and nothing in step 10 itself states it. Change needed: add to step 10's body a sentence that it depends on stage 7 step 2 landing first, because at step 10 usbd's is the kernel's last input source. Cite the ruling on this PR.

NOTE

None.

SEND BACK

At step 10 usbd's is the kernel's last input source, so its exit's
deletion of the kernel's input streams is met only once ps2server holds
the i8042. The owner's ruling on #904 puts 7.2 before step 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
@Japabu
Japabu marked this pull request as ready for review October 13, 2026 05:46
@Japabu
Japabu added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 1a81b59 Oct 13, 2026
6 checks passed
@Japabu
Japabu deleted the wt/toyos-records-input branch October 13, 2026 06:00
Japabu added a commit that referenced this pull request Oct 13, 2026
#894 adds the clipboard port beside the input port: both are held alone,
both are served by the compositor, and its poll budget counts both.
#904 rewrote step 7.2 of the track; its text is kept, marked done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
Japabu added a commit that referenced this pull request Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant