Repository navigation
The guest test crate drops the fourteen dependencies and five redirects no test uses, and input-test leaves the tree - #690
Conversation
…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
|
Negative control for the every-binary build, at 6e37733: the patch below drops toyos-window from Applied with Result: EXIT=101, 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 $rcAnd the build it runs ( #!/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 |
|
Review of #690 at Merge with #592. #592 landed before this round, as Net lines.
BLOCKER
NOTE
REMOVE
SEND BACK |
…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
|
Negative control for the every-binary build, at Result:
mutation-drop-toyos-window.patchdiff --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 $rcbins.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 $rcmutation.logbins.logbins-stale.log |
|
Review of #690 at Round 1's BLOCKER
Round 1's NOTE is now filed as
Round 1's REMOVE (the #679 count) is gone from the body. Merge.
Lockfile. The new Net lines.
REMOVE
LAND AFTER NAMED CHANGES |
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
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
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.tomlnamed 23 dependencies and 8[patch.crates-io]redirects.cargo metadatanow writes nothing to stderr.How it was measured. First,
git grep -wfor each crate's identifier undertests/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 namedwindow, andsrc/bin/window_refusal.rsuseswindow::. Building every binary refused that cut (13 errors, all inwindow_refusal, EXIT=101), so toyos-window came back. The guest suite would not have caught it. No guest test buildswindow_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. At154054bf5, with toyos-window cut,cargo run -- --ci hostand 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_testfinds nothing that runs it. Besides the program itself, it was named by:system.tomlrow;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.rsloses 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 itssrc/licence.rsentry 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
12bc37a67and 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).cargo run -- --ci host: "Host: 67 step(s), all green"host.logcargo test --test toyos-build, the whole guest suite: "26 passed, 26 total"guest.logcargo run -- --build-only: the image's ROOT listsbin/proctestand thebin/spinsymlink, and nobin/input-testbuild.logtests/toyos-rust-testsfor x86_64-unknown-toyos (bins.sh), 109 of 109bins.logcargo metadata --offline --lockedintests/toyos-rust-tests, nothing on stderrmetadata-tests.logcargo metadata --offline --lockedinuserlandmetadata-userland.loggit grep -wundertests/toyos-rust-testsfor each removed crate, manifests and lockfiles left out: 0 files eachcrate-grep.logbins.sh(mutation.sh)window_refusal; reversed, tree cleanmutation.logbuild_toyos_bins' cargo calls against this worktree's sysroot. It first runscargo cleanin the crate and its four cdylib subcrates, asTestBuild::begindoes when the sysroot moves. Then it builds the subcrates, then--binswith-Lpointing at each. None of the crate's dependencies read the signing environment thatcargo_buildsets.bins-stale.log). It failed on artifacts the previous sysroot built:can't find crate for dasp_sample,fontandtoyos_keymap. Cargo keeps those artifacts because every ToyOS compiler prints the samerustc -vV. The row above is the run with the cleans.What I am unsure of
--metalor--debug, and I ran neither. A metal readback run would build them through the harness.real.rs's per-test comments. They still citereadelf -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.rsis +1 −14, and the issues are +33 −29.🤖 Generated with Claude Code
https://claude.ai/code/session_01WcU2Dsw6mDYtwYfzVHPzM8