Skip to content

The guest test crate drops the fourteen dependencies and five redirects no test uses, and input-test leaves the tree - #690

Merged
Japabu merged 5 commits into
mainfrom
wt/toyos-codetidy
Oct 3, 2026
Merged

Japabu merged 5 commits into
mainfrom
wt/toyos-codetidy

Conversation

@Japabu

@Japabu Japabu commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

The guest test crate depends only on what a test uses. This closes issues/build/the-guest-test-crate-depends-on-three-crates-no-test-uses.md. tests/toyos-rust-tests/Cargo.toml named 23 dependencies and 8 [patch.crates-io] redirects.

  • Fourteen dependencies go: toyos-quiesce, toyos-i219, blockd, toyos-blockring, toyos-fat32, toyos-dns, winit, softbuffer, ureq, rustls, rustls-rustcrypto, rustls-pki-types, webpki-roots and sha2. blockd's comment goes with them.
  • Nine stay, each used by a binary: toyos-abi, toyos, toyos-window, toyos-tco, toyos-inspect, inspect, libloading, cpal and memmap2.
  • Five redirects go: winit, softbuffer, raw-window-handle, getrandom and toyos-window. With the fourteen gone, cargo reported each of them "not used in the crate graph".
  • Three redirects stay: toyos-abi, toyos and memmap2. cargo metadata now writes nothing to stderr.

How it was measured. First, git grep -w for each crate's identifier under tests/toyos-rust-tests, leaving out the manifests. The deciding step was building every binary of the crate. The first cut also removed toyos-window, which a search by package name cannot find: its [lib] is named window, and src/bin/window_refusal.rs uses window::. Building every binary refused that cut (13 errors, all in window_refusal, EXIT=101), so toyos-window came back. The guest suite would not have caught it. No guest test builds window_refusal. Only the metal profile's shared block (build_toyos_bins) builds every binary.

That gap is filed as issues/build/only-a-metal-or-debug-run-builds-every-binary-of-the-guest-test-crate.md. At 154054bf5, with toyos-window cut, cargo run -- --ci host and the whole guest suite each exited 0. Its exit is a check the merge queue runs that builds every binary and goes red under this branch's negative-control patch.

The lockfile is what cargo wrote from the trimmed manifest. It keeps 100 of its 280 packages, and each one keeps the (name, version, source, checksum) the old lockfile pinned, so nothing re-resolved.

The internet-clients track (issues/design-debt/the-internet-clients-work-unchanged.md) drops its citation of the closed issue, and with it the claim that the test crate names rustls-rustcrypto. doom's build script still names it, and the track still says so.

input-test leaves the tree. The owner ruled on 2026-10-03 that it leaves the shipped image. git grep -w -e input-test -e input_test finds nothing that runs it. Besides the program itself, it was named by:

  • its system.toml row;
  • its userland workspace member and lock entry;
  • toyos-symbols/tests/real.rs, which reads a frozen copy (toyos-symbols/tests/fixtures/input-test.bin) and never the built program.

No test uses the program, so it is deleted rather than moved to a test image: userland/input-test/, its row, its member and its lock entry all go. The test image (tests/testcases/system.toml) never carried it. real.rs loses two pieces of prose the deletion made false: the refresh recipe that copied input-test's build output over the fixture, and the module-doc sentence saying every boot meets /system/bin/input-test. The fixture and its src/licence.rs entry are unchanged.

The shipped-image issue is renamed to issues/design-debt/the-shipped-image-carries-two-test-programs.md. It keeps its two remaining rows, proctest and spin. Its two searches, re-run at the head, find nothing that runs either program (shipped-image-searches.log). Nothing cited the old slug.

#592 landed as 12bc37a67 and is merged here (37de743d3), with no conflict. Its new test sources name none of the fourteen (crate-grep.log), and every binary, its three new ones included, builds at the head.

Gates

Every log is in ~/.claude/jobs/2280e09e/tmp/scratchpad/orch/codetidy-r2/ on the development machine. The negative control's patch, its scripts and its logs are also in #690 (comment).

gate head exit log
cargo run -- --ci host: "Host: 67 step(s), all green" 626d210 EXIT=0 host.log
cargo test --test toyos-build, the whole guest suite: "26 passed, 26 total" 626d210 EXIT=0 guest.log
cargo run -- --build-only: the image's ROOT lists bin/proctest and the bin/spin symlink, and no bin/input-test 626d210 EXIT=0 build.log
every binary of tests/toyos-rust-tests for x86_64-unknown-toyos (bins.sh), 109 of 109 626d210 EXIT=0 bins.log
cargo metadata --offline --locked in tests/toyos-rust-tests, nothing on stderr 626d210 EXIT=0 metadata-tests.log
cargo metadata --offline --locked in userland 626d210 EXIT=0 metadata-userland.log
git grep -w under tests/toyos-rust-tests for each removed crate, manifests and lockfiles left out: 0 files each 626d210 crate-grep.log
negative control: the patch that drops toyos-window, then bins.sh (mutation.sh) 626d210 + patch EXIT=101, 13 errors all in window_refusal; reversed, tree clean mutation.log
  • The every-binary build follows build_toyos_bins' cargo calls against this worktree's sysroot. It first runs cargo clean in the crate and its four cdylib subcrates, as TestBuild::begin does when the sysroot moves. Then it builds the subcrates, then --bins with -L pointing at each. None of the crate's dependencies read the signing environment that cargo_build sets.
  • A red run at this head: the merge moved the sysroot, and the first every-binary run, without those cleans, exited 101 (bins-stale.log). It failed on artifacts the previous sysroot built: can't find crate for dasp_sample, font and toyos_keymap. Cargo keeps those artifacts because every ToyOS compiler prints the same rustc -vV. The row above is the run with the cleans.

What I am unsure of

  • The every-binary build ran outside the harness. The harness builds every binary only under --metal or --debug, and I ran neither. A metal readback run would build them through the harness.
  • Stale paths remain in real.rs's per-test comments. They still cite readelf -S userland/target/x86_64-unknown-toyos/toyos/input-test, a path no build makes now. I left them as the record of how the numbers were read off the binary the fixture copies.

No new dependency, guest test, gate or lock, and nothing high-risk.

Net lines: +250 −2116 over 13 files. Of those, +216 −2003 is the guest test crate's lockfile, rewritten by cargo, and −21 its manifest. Production (userland and system.toml) is −49 and adds nothing. real.rs is +1 −14, and the issues are +33 −29.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WcU2Dsw6mDYtwYfzVHPzM8

Japabu and others added 3 commits October 3, 2026 16:58
…put-test leaves the tree

tests/toyos-rust-tests/Cargo.toml named 23 dependencies and eight [patch]
redirects. `git grep -w` for each crate's identifier under
tests/toyos-rust-tests finds a use of eight: toyos-abi, toyos, toyos-tco,
toyos-inspect, inspect, libloading, cpal and memmap2. The other fifteen are
named by the manifest and its lockfile alone: toyos-window, toyos-quiesce,
toyos-i219, blockd, toyos-blockring, toyos-fat32, toyos-dns, winit, softbuffer,
ureq, rustls, rustls-rustcrypto, rustls-pki-types, webpki-roots and sha2.
520c0d1 deleted the last binary that named each of fourteen of them, and no
commit under tests/toyos-rust-tests/src ever named toyos_window.

With the fifteen gone cargo reports five redirects "not used in the crate
graph": toyos-window, winit, softbuffer, raw-window-handle and getrandom. They
go too; toyos-abi, toyos and memmap2 stay, and cargo warns about none of them.
The lockfile is what `cargo metadata --offline` wrote from the trimmed
manifest: 97 of its 280 packages, each at the version, source and checksum it
was pinned at before.

input-test: the owner ruled on 2026-10-03 that it leaves the shipped image.
`git grep -w -e input-test -e input_test` finds nothing that runs it: beside
the program there is its row in system.toml, its workspace member, and
toyos-symbols/tests/real.rs, which reads a frozen copy under
toyos-symbols/tests/fixtures/ and never the built program. So the program is
deleted with its row, and real.rs loses the refresh recipe that copied the
program's build output over the fixture.

issues/build/the-guest-test-crate-depends-on-three-crates-no-test-uses.md
closes; the internet-clients track drops its citation of it, and with it the
claim that the test crate names rustls-rustcrypto. The shipped-image issue is
renamed to the two rows it still holds, proctest and spin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013UDZQ6fSKw14e4w2TKTRfm
…t meets /system/bin/input-test

No image carries that program any more, so the sentence was false; the
fixture is a frozen copy and the test reads nothing else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WcU2Dsw6mDYtwYfzVHPzM8
…ts lib name, `window`

The first commit's search spelled each crate by its package name, and
toyos-window's lib target is `window`, so `git grep -w toyos_window` found
nothing while `src/bin/window_refusal.rs` uses `window::` throughout. Building
every binary of the crate for x86_64-unknown-toyos, as `build_toyos_bins` does
for the metal profile's shared block, refused it: 13 errors, all in
window_refusal, EXIT=101. With the dependency back all 106 binaries build,
EXIT=0. The guest suite did not see it: no guest test builds that binary.

The lockfile gains toyos-window, toyos-font and toyos-keymap, at the entries
the old lockfile had. Its `[patch]` redirect stays gone: a path dependency
needs none, and cargo reports no unused patch.

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

Japabu commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Negative control for the every-binary build, at 6e37733: the patch below drops toyos-window from tests/toyos-rust-tests, which the first cut did by mistake (its [lib] is window).

Applied with git apply --check then git apply, every x86_64 binary built as build_toyos_bins builds them, then restored with git apply -R; git status --porcelain --ignore-submodules=none empty afterwards.

Result: EXIT=101, could not compile toyos-rust-tests (bin "window_refusal") due to 13 previous errors, the first being error[E0432]: unresolved import window at src/bin/window_refusal.rs:33. Without the patch, the same build is EXIT=0, 106 of 106 binaries.

diff --git a/tests/toyos-rust-tests/Cargo.lock b/tests/toyos-rust-tests/Cargo.lock
index e138fe4c9..bbacb88ff 100644
--- a/tests/toyos-rust-tests/Cargo.lock
+++ b/tests/toyos-rust-tests/Cargo.lock
@@ -681,10 +681,6 @@ dependencies = [
 name = "toyos-abi"
 version = "0.16.0"
 
-[[package]]
-name = "toyos-font"
-version = "0.2.0"
-
 [[package]]
 name = "toyos-inspect"
 version = "0.1.0"
@@ -692,10 +688,6 @@ dependencies = [
  "toyos-abi",
 ]
 
-[[package]]
-name = "toyos-keymap"
-version = "0.1.0"
-
 [[package]]
 name = "toyos-rust-tests"
 version = "0.1.0"
@@ -708,23 +700,12 @@ dependencies = [
  "toyos-abi",
  "toyos-inspect",
  "toyos-tco",
- "toyos-window",
 ]
 
 [[package]]
 name = "toyos-tco"
 version = "0.1.0"
 
-[[package]]
-name = "toyos-window"
-version = "0.20.0"
-dependencies = [
- "toyos",
- "toyos-abi",
- "toyos-font",
- "toyos-keymap",
-]
-
 [[package]]
 name = "unicode-ident"
 version = "1.0.24"
diff --git a/tests/toyos-rust-tests/Cargo.toml b/tests/toyos-rust-tests/Cargo.toml
index 400cd0afb..6f51ce105 100644
--- a/tests/toyos-rust-tests/Cargo.toml
+++ b/tests/toyos-rust-tests/Cargo.toml
@@ -7,7 +7,6 @@ license = "MIT OR Apache-2.0"
 [dependencies]
 toyos-abi = { path = "../../toyos-abi" }
 toyos = { path = "../../toyos" }
-toyos-window = { path = "../../userland/toyos-window" }
 toyos-tco = { path = "../../toyos-tco" }
 toyos-inspect = { path = "../../toyos-inspect" }
 # The reader's asker, for `hda_client_stall`.

The script:

#!/bin/zsh
# Apply the mutation as a checked patch, build every x86_64 test binary, restore, prove the tree clean.
D=<scratch>
cd <worktree> || exit 9
git apply --check $D/mutation-drop-toyos-window.patch || { echo "PATCH DOES NOT APPLY"; exit 9; }
git apply $D/mutation-drop-toyos-window.patch && echo "applied: $(git diff --shortstat)"
$D/x86-bins.sh; rc=$?
echo "MUTATION BUILD EXIT=$rc"
git apply -R $D/mutation-drop-toyos-window.patch && echo "restored"
s=$(git status --porcelain --ignore-submodules=none); [ -z "$s" ] && echo "tree clean" || { echo "TREE DIRTY: $s"; exit 8; }
exit $rc

And the build it runs (x86-bins.sh):

#!/bin/zsh
# Every binary of tests/toyos-rust-tests for x86_64-unknown-toyos, as src/build.rs's
# build_toyos_bins builds them: cdylib subcrates first, then --bins with -L to each.
set -u
W=<worktree>
C=$W/tests/toyos-rust-tests
export RUSTUP_TOOLCHAIN=<primary>/rust/build/sysroots/$(cat $W/target/toyos-sysroot-key)
unset RUSTFLAGS RUSTC
T=x86_64-unknown-toyos
L=""
for sub in tls-cranelift tls-dlopen-lib tls-lib tls-multi-crate; do
  echo "=== cdylib $sub"
  (cd $C/$sub && cargo build --target $T --profile toyos) || { echo "SUB-FAILED $sub"; exit 1; }
  L="$L -L $C/$sub/target/$T/toyos"
done
echo "=== bins with RUSTFLAGS=${L# }"
cd $C && RUSTFLAGS="${L# }" cargo build --target $T --profile toyos --bins

@Japabu

Japabu commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator Author

Review of #690 at 6e37733c6, round 1.

Merge with #592. #592 landed before this round, as 12bc37a67. git merge-tree --write-tree origin/main 6e37733c6 exits 0 (tree a9f908786) with no conflict. #592 touches none of this branch's twelve files. Its new test sources (isa_claim_refused, isa_grant, isa_lines, isa_row, arch/port, arch/stack) import only std, toyos and toyos_abi. git grep -w over the merged tree's tests/toyos-rust-tests, lockfile excluded, finds none of the fourteen removed crates.

Net lines. git diff --shortstat origin/main...6e37733c6: 12 files, +223 −2116.

  • Production (system.toml, userland/): +0 −49.
  • Test crate: manifest −21, lockfile +216 −2003.
  • toyos-symbols/tests/real.rs: +1 −14.
  • Issues: +6 −29.

BLOCKER

NOTE

  • tests/toyos-rust-tests/Cargo.toml:10 — no hosted check compiles every binary of this crate. Only build_toyos_bins (src/build.rs:2074) does, and it runs only under --metal and --debug (tests/toyos.rs:4002, :4041). At 154054bf5, with toyos-window cut and window_refusal unbuildable, codetidy/host2.log and codetidy/guest.log were both EXIT=0. Why it matters: the branch found this gap, and its own commit 6e37733c6 says so, but filed nothing. Root CLAUDE.md, "Zero silent debt": record it in issues/ with an owner, this evidence, and an exit condition a build can fail.

REMOVE

SEND BACK

Japabu and others added 2 commits October 3, 2026 17:48
…st crate

The branch found this gap and recorded it only in 6e37733's message: at
154054b the test crate's manifest had dropped toyos-window, which
window_refusal imports as `window`, and building every binary failed with 13
errors, EXIT=101, while `cargo run -- --ci host` (host2.log) and the whole
guest suite (guest.log) each exited 0. build_toyos_bins is reached only
through build_shared_bins under --metal and --debug, which no workflow passes;
the guest suite builds abuse_readonly_copyout and panic_halts_first alone.

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

Japabu commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator Author

Negative control for the every-binary build, at 626d21061 (the merge of 12bc37a67 plus the issue this round files). The patch drops toyos-window from tests/toyos-rust-tests, which the first cut did by mistake; its [lib] is window.

Result: mutation.sh EXIT=101, 13 errors all in src/bin/window_refusal.rs, 66 of 109 binaries present; patch reversed, git status --porcelain --ignore-submodules=none empty. Without the patch, bins.sh at the same head: EXIT=0, 109 of 109.

bins.sh now runs the cargo cleans that build_toyos_bins' TestBuild::begin runs when the sysroot moves. The merge moved it, and the first run at this head without them exited 101 on artifacts the previous sysroot built (can't find crate for dasp_sample, font, toyos_keymap; bins-stale.log).

mutation-drop-toyos-window.patch
diff --git a/tests/toyos-rust-tests/Cargo.lock b/tests/toyos-rust-tests/Cargo.lock
index e138fe4c9..bbacb88ff 100644
--- a/tests/toyos-rust-tests/Cargo.lock
+++ b/tests/toyos-rust-tests/Cargo.lock
@@ -681,10 +681,6 @@ dependencies = [
 name = "toyos-abi"
 version = "0.16.0"
 
-[[package]]
-name = "toyos-font"
-version = "0.2.0"
-
 [[package]]
 name = "toyos-inspect"
 version = "0.1.0"
@@ -692,10 +688,6 @@ dependencies = [
  "toyos-abi",
 ]
 
-[[package]]
-name = "toyos-keymap"
-version = "0.1.0"
-
 [[package]]
 name = "toyos-rust-tests"
 version = "0.1.0"
@@ -708,23 +700,12 @@ dependencies = [
  "toyos-abi",
  "toyos-inspect",
  "toyos-tco",
- "toyos-window",
 ]
 
 [[package]]
 name = "toyos-tco"
 version = "0.1.0"
 
-[[package]]
-name = "toyos-window"
-version = "0.20.0"
-dependencies = [
- "toyos",
- "toyos-abi",
- "toyos-font",
- "toyos-keymap",
-]
-
 [[package]]
 name = "unicode-ident"
 version = "1.0.24"
diff --git a/tests/toyos-rust-tests/Cargo.toml b/tests/toyos-rust-tests/Cargo.toml
index 400cd0afb..6f51ce105 100644
--- a/tests/toyos-rust-tests/Cargo.toml
+++ b/tests/toyos-rust-tests/Cargo.toml
@@ -7,7 +7,6 @@ license = "MIT OR Apache-2.0"
 [dependencies]
 toyos-abi = { path = "../../toyos-abi" }
 toyos = { path = "../../toyos" }
-toyos-window = { path = "../../userland/toyos-window" }
 toyos-tco = { path = "../../toyos-tco" }
 toyos-inspect = { path = "../../toyos-inspect" }
 # The reader's asker, for `hda_client_stall`.
mutation.sh
#!/bin/zsh
# Apply the mutation as a checked patch, build every x86_64 test binary, restore, prove the tree clean.
D=/Users/jan/.claude/jobs/2280e09e/tmp/scratchpad/orch/codetidy-r2
cd /Users/jan/Dev/jan/toyos-codetidy || exit 9
echo "head $(git rev-parse HEAD)"
git apply --check $D/mutation-drop-toyos-window.patch || { echo "PATCH DOES NOT APPLY"; exit 9; }
git apply $D/mutation-drop-toyos-window.patch && echo "applied: $(git diff --shortstat)"
$D/bins.sh; rc=$?
echo "MUTATION BUILD EXIT=$rc"
git apply -R $D/mutation-drop-toyos-window.patch && echo "restored"
s=$(git status --porcelain --ignore-submodules=none); [ -z "$s" ] && echo "tree clean" || { echo "TREE DIRTY: $s"; exit 8; }
exit $rc
bins.sh
#!/bin/zsh
# Every binary of tests/toyos-rust-tests for x86_64-unknown-toyos, as src/build.rs's
# build_toyos_bins builds them: cdylib subcrates first, then --bins with -L to each.
set -u
W=/Users/jan/Dev/jan/toyos-codetidy
C=$W/tests/toyos-rust-tests
export RUSTUP_TOOLCHAIN=/Users/jan/Dev/jan/toyos/rust/build/sysroots/$(cat $W/target/toyos-sysroot-key)
echo "head $(git -C $W rev-parse HEAD), toolchain $RUSTUP_TOOLCHAIN"
unset RUSTFLAGS RUSTC
T=x86_64-unknown-toyos
# What build_toyos_bins' TestBuild::begin does when the sysroot moved (Clean::All):
# cargo keys an artifact on `rustc -vV`, which every ToyOS compiler prints alike.
for dir in $C $C/tls-cranelift $C/tls-dlopen-lib $C/tls-lib $C/tls-multi-crate; do
  echo "=== cargo clean in $dir"
  (cd $dir && cargo clean) || { echo "CLEAN-FAILED $dir"; exit 1; }
done
L=""
for sub in tls-cranelift tls-dlopen-lib tls-lib tls-multi-crate; do
  echo "=== cdylib $sub"
  (cd $C/$sub && cargo build --target $T --profile toyos) || { echo "SUB-FAILED $sub"; exit 1; }
  L="$L -L $C/$sub/target/$T/toyos"
done
echo "=== bins with RUSTFLAGS=${L# }"
cd $C && RUSTFLAGS="${L# }" cargo build --target $T --profile toyos --bins; rc=$?
n=$(ls $C/src/bin/*.rs | wc -l | tr -d ' '); b=0
for f in $C/src/bin/*.rs; do [ -f $C/target/$T/toyos/$(basename $f .rs) ] && b=$((b+1)); done
echo "src/bin sources: $n; built binaries present: $b"
exit $rc
mutation.log
head 626d2106150606687307af33df88558c43d47082
applied:  2 files changed, 20 deletions(-)
head 626d2106150606687307af33df88558c43d47082, toolchain /Users/jan/Dev/jan/toyos/rust/build/sysroots/4383f9b0c5c75ed9
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests
     Removed 5786 files, 615.5MiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-cranelift
     Removed 455 files, 500.6MiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-dlopen-lib
     Removed 48 files, 4.4MiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-lib
     Removed 22 files, 1.7MiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate
     Removed 47 files, 2.9MiB total
=== cdylib tls-cranelift
   Compiling cranelift-srcgen v0.128.4
   Compiling cranelift-isle v0.128.4
   Compiling heck v0.5.0
   Compiling cranelift-codegen-shared v0.128.4
   Compiling libm v0.2.16
   Compiling allocator-api2 v0.2.21
   Compiling equivalent v1.0.2
   Compiling hashbrown v0.16.1
   Compiling cranelift-bitset v0.128.4
   Compiling target-lexicon v0.13.5 (https://github.com/ToyOSOrg/target-lexicon?branch=toyos#45832ce6)
   Compiling rustc-hash v2.1.1
   Compiling smallvec v1.15.1
   Compiling arbitrary v1.4.2
   Compiling log v0.4.29
   Compiling hashbrown v0.15.5
   Compiling cranelift-entity v0.128.4
   Compiling cranelift-assembler-x64-meta v0.128.4
   Compiling bumpalo v3.20.2
   Compiling cranelift-bforest v0.128.4
   Compiling indexmap v2.13.0
   Compiling regalloc2 v0.13.5
   Compiling cranelift-control v0.128.4
   Compiling cranelift-codegen-meta v0.128.4
   Compiling cranelift-assembler-x64 v0.128.4
   Compiling wasmtime-internal-math v41.0.4
   Compiling gimli v0.32.3
   Compiling cranelift-codegen v0.128.4
   Compiling cranelift-frontend v0.128.4
   Compiling tls-cranelift v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-cranelift)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 39.39s
=== cdylib tls-dlopen-lib
   Compiling tls-dlopen-lib v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-dlopen-lib)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.25s
=== cdylib tls-lib
   Compiling tls-lib v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-lib)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.16s
=== cdylib tls-multi-crate
   Compiling tls-dep v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate/dep)
   Compiling tls-multi-crate v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.24s
=== bins with RUSTFLAGS=-L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-cranelift/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-dlopen-lib/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-lib/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate/target/x86_64-unknown-toyos/toyos
   Compiling toyos-abi v0.16.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-abi)
   Compiling cpal v0.18.0 (https://github.com/ToyOSOrg/cpal?branch=toyos-0.18.0#29180f7b)
   Compiling dasp_sample v0.11.0
   Compiling memmap2 v0.9.11 (https://github.com/ToyOSOrg/memmap2-rs?branch=toyos-0.9.11#ad0d8905)
   Compiling toyos-tco v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-tco)
   Compiling toyos v0.18.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos)
   Compiling toyos-inspect v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-inspect)
   Compiling libloading v0.8.9 (https://github.com/ToyOSOrg/rust_libloading?branch=toyos-sdk-0.12#bad8d494)
   Compiling inspect v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/userland/inspect)
   Compiling toyos-rust-tests v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests)
error[E0432]: unresolved import `window`
  --> src/bin/window_refusal.rs:33:5
   |
33 | use window::{CreateError, Window};
   |     ^^^^^^ use of unresolved module or unlinked crate `window`
   |
   = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
  --> src/bin/window_refusal.rs:51:20
   |
51 |     (Reply::Refuse(window::REFUSED_AT_CAPACITY), CreateError::AtCapacity),
   |                    ^^^^^^ use of unresolved module or unlinked crate `window`
   |
   = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
  --> src/bin/window_refusal.rs:52:20
   |
52 |     (Reply::Refuse(window::REFUSED_TOO_LARGE), CreateError::TooLarge),
   |                    ^^^^^^ use of unresolved module or unlinked crate `window`
   |
   = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
  --> src/bin/window_refusal.rs:57:46
   |
57 |     (Reply::Unrelated, CreateError::Protocol(window::MSG_FRAME)),
   |                                              ^^^^^^ use of unresolved module or unlinked crate `window`
   |
   = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
   --> src/bin/window_refusal.rs:104:33
    |
104 |     assert_eq!(header.msg_type, window::MSG_CREATE_WINDOW, "client sent the wrong request");
    |                                 ^^^^^^ use of unresolved module or unlinked crate `window`
    |
    = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
   --> src/bin/window_refusal.rs:109:31
    |
109 |             ipc::send(handle, window::MSG_WINDOW_REFUSED, &window::WindowRefused { reason })
    |                               ^^^^^^ use of unresolved module or unlinked crate `window`
    |
    = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
   --> src/bin/window_refusal.rs:113:33
    |
113 |             ipc::signal(handle, window::MSG_FRAME).expect("send a reply that answers nothing");
    |                                 ^^^^^^ use of unresolved module or unlinked crate `window`
    |
    = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
   --> src/bin/window_refusal.rs:118:31
    |
118 |             ipc::send(handle, window::MSG_WINDOW_CREATED, &info)
    |                               ^^^^^^ use of unresolved module or unlinked crate `window`
    |
    = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error: method call on a diverging inference variable
   --> src/bin/window_refusal.rs:140:22
    |
140 |         assert!(!got.to_string().is_empty(), "{got:?} has no message");
    |                      ^^^^^^^^^
    |
    = help: consider providing a type annotation
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #156047 <https://github.com/rust-lang/rust/issues/156047>
    = note: `-D method-call-on-diverging-infer-var` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(method_call_on_diverging_infer_var)]`

error[E0433]: cannot find module or crate `window` in this scope
   --> src/bin/window_refusal.rs:109:60
    |
109 |             ipc::send(handle, window::MSG_WINDOW_REFUSED, &window::WindowRefused { reason })
    |                                                            ^^^^^^ use of unresolved module or unlinked crate `window`
    |
    = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
   --> src/bin/window_refusal.rs:117:24
    |
117 |             let info = window::WindowInfo { width: 100, height: 100, stride: 100, pixel_format: 0 };
    |                        ^^^^^^ use of unresolved module or unlinked crate `window`
    |
    = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

error[E0433]: cannot find module or crate `window` in this scope
   --> src/bin/window_refusal.rs:105:15
    |
105 |     let _req: window::CreateWindowRequest =
    |               ^^^^^^ use of unresolved module or unlinked crate `window`
    |
    = help: if you wanted to use a crate named `window`, use `cargo add window` to add it to your `Cargo.toml`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `toyos-rust-tests` (bin "window_refusal") due to 13 previous errors
warning: build failed, waiting for other jobs to finish...
src/bin sources: 109; built binaries present: 66
MUTATION BUILD EXIT=101
restored
tree clean
bins.log
head 626d2106150606687307af33df88558c43d47082, toolchain /Users/jan/Dev/jan/toyos/rust/build/sysroots/4383f9b0c5c75ed9
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests
     Removed 10591 files, 1.1GiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-cranelift
     Removed 455 files, 500.6MiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-dlopen-lib
     Removed 48 files, 4.4MiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-lib
     Removed 22 files, 1.7MiB total
=== cargo clean in /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate
     Removed 47 files, 2.9MiB total
=== cdylib tls-cranelift
   Compiling cranelift-srcgen v0.128.4
   Compiling cranelift-isle v0.128.4
   Compiling heck v0.5.0
   Compiling libm v0.2.16
   Compiling cranelift-codegen-shared v0.128.4
   Compiling cranelift-bitset v0.128.4
   Compiling hashbrown v0.16.1
   Compiling target-lexicon v0.13.5 (https://github.com/ToyOSOrg/target-lexicon?branch=toyos#45832ce6)
   Compiling equivalent v1.0.2
   Compiling allocator-api2 v0.2.21
   Compiling hashbrown v0.15.5
   Compiling rustc-hash v2.1.1
   Compiling smallvec v1.15.1
   Compiling arbitrary v1.4.2
   Compiling log v0.4.29
   Compiling cranelift-assembler-x64-meta v0.128.4
   Compiling cranelift-entity v0.128.4
   Compiling bumpalo v3.20.2
   Compiling cranelift-bforest v0.128.4
   Compiling indexmap v2.13.0
   Compiling regalloc2 v0.13.5
   Compiling cranelift-control v0.128.4
   Compiling cranelift-codegen-meta v0.128.4
   Compiling wasmtime-internal-math v41.0.4
   Compiling cranelift-assembler-x64 v0.128.4
   Compiling gimli v0.32.3
   Compiling cranelift-codegen v0.128.4
   Compiling cranelift-frontend v0.128.4
   Compiling tls-cranelift v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-cranelift)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 1m 07s
=== cdylib tls-dlopen-lib
   Compiling tls-dlopen-lib v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-dlopen-lib)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.49s
=== cdylib tls-lib
   Compiling tls-lib v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-lib)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.33s
=== cdylib tls-multi-crate
   Compiling tls-dep v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate/dep)
   Compiling tls-multi-crate v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.45s
=== bins with RUSTFLAGS=-L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-cranelift/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-dlopen-lib/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-lib/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate/target/x86_64-unknown-toyos/toyos
   Compiling toyos-abi v0.16.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-abi)
   Compiling cpal v0.18.0 (https://github.com/ToyOSOrg/cpal?branch=toyos-0.18.0#29180f7b)
   Compiling toyos-keymap v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-keymap)
   Compiling dasp_sample v0.11.0
   Compiling toyos-font v0.2.0 (/Users/jan/Dev/jan/toyos-codetidy/userland/toyos-font)
   Compiling memmap2 v0.9.11 (https://github.com/ToyOSOrg/memmap2-rs?branch=toyos-0.9.11#ad0d8905)
   Compiling toyos-tco v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-tco)
   Compiling toyos v0.18.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos)
   Compiling toyos-inspect v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-inspect)
   Compiling libloading v0.8.9 (https://github.com/ToyOSOrg/rust_libloading?branch=toyos-sdk-0.12#bad8d494)
   Compiling inspect v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/userland/inspect)
   Compiling toyos-window v0.20.0 (/Users/jan/Dev/jan/toyos-codetidy/userland/toyos-window)
   Compiling toyos-rust-tests v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests)
    Finished `toyos` profile [optimized + debuginfo] target(s) in 13.64s
src/bin sources: 109; built binaries present: 109
bins-stale.log
head 626d2106150606687307af33df88558c43d47082, toolchain /Users/jan/Dev/jan/toyos/rust/build/sysroots/4383f9b0c5c75ed9
=== cdylib tls-cranelift
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.13s
=== cdylib tls-dlopen-lib
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.09s
=== cdylib tls-lib
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.09s
=== cdylib tls-multi-crate
    Finished `toyos` profile [optimized + debuginfo] target(s) in 0.09s
=== bins with RUSTFLAGS=-L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-cranelift/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-dlopen-lib/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-lib/target/x86_64-unknown-toyos/toyos -L /Users/jan/Dev/jan/toyos-codetidy/tests/toyos-rust-tests/tls-multi-crate/target/x86_64-unknown-toyos/toyos
   Compiling toyos-abi v0.16.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-abi)
   Compiling toyos-tco v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-tco)
   Compiling toyos v0.18.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos)
   Compiling toyos-inspect v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/toyos-inspect)
   Compiling libloading v0.8.9 (https://github.com/ToyOSOrg/rust_libloading?branch=toyos-sdk-0.12#bad8d494)
   Compiling cpal v0.18.0 (https://github.com/ToyOSOrg/cpal?branch=toyos-0.18.0#29180f7b)
   Compiling toyos-window v0.20.0 (/Users/jan/Dev/jan/toyos-codetidy/userland/toyos-window)
   Compiling inspect v0.1.0 (/Users/jan/Dev/jan/toyos-codetidy/userland/inspect)
error[E0463]: can't find crate for `dasp_sample`
  --> /Users/jan/.cargo/git/checkouts/cpal-80b2b4f5f497b7ae/29180f7/src/sample_format.rs:21:9
   |
21 | pub use dasp_sample::I24;
   |         ^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cpal` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `font`
 --> /Users/jan/Dev/jan/toyos-codetidy/userland/toyos-window/src/framebuffer.rs:6:9
  |
6 | pub use font::Color;
  |         ^^^^ can't find crate

error[E0463]: can't find crate for `toyos_keymap`
  --> /Users/jan/Dev/jan/toyos-codetidy/userland/toyos-window/src/lib.rs:21:9
   |
21 | pub use toyos_keymap::{Emit, Mods, Translator};
   |         ^^^^^^^^^^^^ can't find crate

error: could not compile `toyos-window` (lib) due to 2 previous errors
src/bin sources: 109; built binaries present: 106

@Japabu

Japabu commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator Author

Review of #690 at 626d21061, round 2.

Round 1's BLOCKER

  • PR The guest test crate drops the fourteen dependencies and five redirects no test uses, and input-test leaves the tree #690 body, "## Gates": no row named its log. CLOSED. Every row now gives a head, an exit and a log in codetidy-r2/, and each log says what its row claims:
    • host.head, guest.head and build.head read 626d21061.
    • host.start (15:57:17Z) and guest.start (15:55:06Z) both come after 626d21061 was committed at 15:50:39Z.
    • host.log ends "Host: 67 step(s), all green" (host.exit EXIT=0), and real.rs's tests pass in it (lines 4383–4384).
    • guest.log ends "26 passed, 26 total" (guest.exit EXIT=0).
    • build.log adds bin/proctest and the bin/spin symlink, and nothing in it names input.
    • bins.exit is EXIT=0 with 109 of 109 binaries; mutation.exit is EXIT=101 with 13 errors, all in window_refusal.
    • metadata-tests.log is the --locked run at this head (EXIT=0), and the new lockfile has no [[patch.unused]].
    • bins.sh makes build_toyos_bins' cargo calls (src/build.rs:2074): the cdylib subcrates first, then --bins with -L to each.

Round 1's NOTE is now filed as issues/build/only-a-metal-or-debug-run-builds-every-binary-of-the-guest-test-crate.md, and its claims hold at the head:

  • build_shared_bins (tests/toyos.rs:3510) is the one caller of build_toyos_bins, and it is called only at :4059 (metal) and :4098 (debug).
  • The guest suite builds from the test crate only through build_toyos_bin, at :1406 and :1785.
  • Under src/ and .github/, the only file that names the crate is src/sourcegate.rs:163, which walks text and compiles nothing.
  • No workflow passes --metal or --debug.

Round 1's REMOVE (the #679 count) is gone from the body.

Merge.

Lockfile. The new tests/toyos-rust-tests/Cargo.lock has 100 (name, version, source, checksum) tuples, and all of them are among the old file's 280 (comm -13 is empty). Each of the nine kept dependencies is used by path somewhere under tests/toyos-rust-tests/src.

Net lines. git diff --shortstat origin/main...626d21061: 13 files, +250 −2116.

  • Production (system.toml, userland/): +0 −49.
  • Tests: the test crate's manifest −21 and lockfile +216 −2003; toyos-symbols/tests/real.rs +1 −14.
  • Issues: +33 −29.

REMOVE

LAND AFTER NAMED CHANGES

@Japabu
Japabu marked this pull request as ready for review October 3, 2026 16:12
@Japabu
Japabu enabled auto-merge October 3, 2026 16:12
@Japabu
Japabu added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit c86570c Oct 3, 2026
6 checks passed
@Japabu
Japabu deleted the wt/toyos-codetidy branch October 3, 2026 16:50
Japabu added a commit that referenced this pull request Oct 3, 2026
Takes #688, #689, #690, #691 and #692. Two conflicts:

- Cargo.toml `members`: this branch's `kernel/loom` and `kernel/sim` beside
  #692's `tests/libc-arch`; `kernel-loom` is gone with the move.
- The track: #688, #691 and #692 took steps 1, 5 and 3, this branch step 2,
  so step 4 is what remains. Its timing sentence now cites the owner's
  ruling in his words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WcU2Dsw6mDYtwYfzVHPzM8
Japabu added a commit that referenced this pull request Oct 3, 2026
Conflicts, all from #690:
- userland/Cargo.toml: the members keep neither `init` (renamed here to
  `supervisor`) nor `input-test` (deleted by #690).
- tests/toyos-rust-tests/Cargo.toml: #690's deletion of the
  diskserver/toyos-blockring/toyos-fat32/toyos-dns dependencies and their
  comment stands.
- tests/toyos-rust-tests/Cargo.lock: main's lock, with cpal at f46381d, the
  fork commit that says `soundserver did not let go`; `cargo metadata
  --locked` accepts it unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WcU2Dsw6mDYtwYfzVHPzM8
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