Repository navigation
The tree says who uses each thing: the folder restructure, stages 4-9 - #857
Conversation
The owner asked for this track to be filed as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017cSFvbD35xJ2kGANVdm23C
… by one [patch]
Stage 4 of issues/the-tree-says-who-uses-each-thing.md, closing
issues/std-names-the-sdk-crates-by-path.md.
The fork (ToyOSOrg/rust main, c1b88133) names both crates in
library/std/Cargo.toml as `">=0.16, <1"` and `">=0.18, <1"`, the floors
this tree's manifests declare, and drops the workspace's
`toyos-abi = { path = "../toyos-abi" }` patch, which was already unused
(the forks naming toyos-abi in rust/Cargo.lock require "0.1").
library/Cargo.lock is re-locked with the patch applied; rust/Cargo.lock
without it, taking toyos-abi 0.1.0 from crates.io as those forks ask.
src/sysroot.rs declares the patch once: `std_patch` spells
`--config patch.crates-io.<crate>.path="<worktree>/<crate>"` for each
STD_MANIFESTS directory, refusing by name a worktree path bootstrap would
split at whitespace or TOML would misread. `toolchain::x_build_with`
hands it to every bootstrap run (std, the compiler, LLVM) in
CARGOFLAGS_NOT_BOOTSTRAP, measured as the one variable that reaches a
local rebuild's stage-0 std and nothing it should not:
- CARGOFLAGS_BOOTSTRAP reaches none of it (a local rebuild counts its
compiler as stage 1): std resolved toyos 0.75.0 and toyos-abi 0.63.0
from crates.io, and built.
- CARGOFLAGS reaches it, and bootstrap.py's own build of bootstrap too,
which wrote `[[patch.unused]]` into src/bootstrap/Cargo.lock, a fork
file no build puts back.
The keyed std text carries the patch's spelling with its paths as
placeholders. The licence step's std `cargo metadata` takes the same
arguments and `--locked`, so the scratch copy of a lockfile that was
stale by design goes.
`assert_std_built_from` took a std whose toyos-abi came from a registry
when toyos came from the worktree (its matcher saw only `<crate>/src/`
paths), and refused one built wholly from the registry as "Cargo's
dep-info moved". It now recognises a registry's `<crate>-<version>/src/`,
requires a source of each crate, and names a registry's copy as a
resolve the patch did not reach.
src/CLAUDE.md's std type-check recipe no longer copies the library or
links crates beside it: it points cargo at the fork's own library/ with
the same patch, which writes nothing in the fork (re-verified).
The userland libstd/libtoyos/libtoyos_abi of both targets, built by the
old mechanism in this worktree and by the new one, are identical in
their .rmeta and .so, and in every rlib member but the per-invocation
token rustc puts in each object's name, which two builds of one tree
differ by too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017cSFvbD35xJ2kGANVdm23C
|
Log: mutation patch: the old dep-info gate ( |
|
Log: mutation run: the old dep-info gate against the registry test ( |
|
Log: control build A: old fork, old compiler, this worktree ( |
|
Log: measurement: CARGOFLAGS_BOOTSTRAP ( |
|
Log: measurement: CARGOFLAGS_BOOTSTRAP fork diff ( |
|
Log: measurement: CARGOFLAGS_NOT_BOOTSTRAP ( |
|
Log: measurement: CARGOFLAGS ( |
|
Log: measurement: CARGOFLAGS fork diff ( |
|
Log: measurement: no patch ( |
|
Log: control bootstrap.toml ( |
|
Log: comparison script ( |
|
Log: comparison: old (A) against new (B) ( |
|
Log: comparison negative control: A against the registry-built std ( |
|
Log: std type-check recipe, re-verified ( |
|
Log: clean toolchain build + --build-only x86_64 (at c7e7f88ca) ( |
|
Log: clean toolchain build + --build-only x86_64 (at c7e7f88ca) ( |
|
Log: --build-only aarch64 (at c7e7f88ca) ( |
|
Log: --build-only x86_64 at head ( |
|
Log: --build-only aarch64 at head ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
Log: cargo run -- --ci host ( |
|
The whole branch's renames at 330e39a, part 1 of 3 |
|
The whole branch's renames at 330e39a, part 2 of 3 |
|
The whole branch's renames at 330e39a, part 3 of 3 |
|
T14 reading at The one failure is |
|
Review of 330e39a against Size: What I checked and found holding:
BLOCKER
NOTE
SEND BACK |
…e rule hostws tests it Since the program roots replaced the userland prefix, host_files() skipped everything under system/, apps/ and tests/guest/. That reached the nine netstack crates that were root host crates on main (wire, ip, shard, shard/tcp, shard/testnet, udp, dhcp, dns, i219), so every_host_scratch_is_ the_guard no longer read them and the gate was weaker than on main. A file under a program root now belongs to the innermost workspace member holding it, and is host code when hostws::host_members holds that member: the program crate directly under the root stays guest, a nested host member (netstack's crates, mixer, virtio-sound, aml, desktop, mdns, node) is walked, and an excluded crate under a root (the tls-* rust-tests crates) stays guest. A std::env::temp_dir() placed in system/netstack/shard/testnet/src/lib.rs reds every_host_scratch_is_the_guard (exit 101); it stayed green before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017cSFvbD35xJ2kGANVdm23C
… states std_patch's path restriction On main userland/CLAUDE.md loaded the scanout caveat for the window crate and every app. After the split it lives in system/CLAUDE.md, which nothing under sdk/ or apps/ loads, so each gets a one-line pointer to it. std_patch names the worktree whole in std's [patch], and refuses a path holding whitespace, a quote, a backslash, a control character or non-UTF-8 bytes on every bootstrap run. Nothing measures that main built from such a path, so the restriction is stated where a build-system agent reads it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017cSFvbD35xJ2kGANVdm23C
…name a valid owner and no stale path
Stage 4's exit now says what was measured: identical .rlib members and
byte-identical .rmeta and .so, the object names' per-invocation token aside,
and records that the closed std-names-the-sdk-crates-by-path exit ("the
sysroot key is unchanged by the switch") is not met. Stage 6's says no file
was added or deleted by the move, which 2b8c8c3 meets (329 renames, 43
modified); "every change a rename" it does not.
sprite's owner is the desktop track, the machines track's is the owner's
decision, and the guest-built-crate issue is the orchestrator's, apart from
stage 7, which has landed. That issue names `loader`, not `bootloader`, and
is renamed off `userland/`, which no longer exists.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017cSFvbD35xJ2kGANVdm23C
…ust-tests The one file #858 changes, tests/toyos-rust-tests/src/bin/abuse_page_straddle.rs, is renamed by this branch to tests/guest/rust-tests/; git's rename detection carried all of its hunks there, and it names no path this branch moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017cSFvbD35xJ2kGANVdm23C
|
Round 2, |
|
Round 2, |
|
Round 2, |
|
Round 2, |
|
Round 2, |
|
Round 2, |
|
Round 2, |
|
Round 2, |
|
Round 2, |
|
Round 2, the guest suite |
|
Round 2, the guest suite |
|
Round 2, T14 images staged with |
|
Round 2, the review's mutation: |
|
T14 reading at |
|
Review of 22b8ed1 against Earlier findings
The merge and the measurements carried from 330e39aThe merge 22b8ed1 has a combined diff that is empty: it resolved nothing by hand. Between 330e39a and b86c02b, round 2 changes three things:
None of them reaches an image, the build's output, or a file list. The merge adds no file and changes the content of one guest binary. That binary was built and run at the head by the guest suite, and in the The Size
Round 2 over 330e39a is +38 −16:
I accept it. BLOCKERNone. NOTENone. LAND |
The folder restructure of
issues/the-tree-says-who-uses-each-thing.md, stages 4-9, in one pull request (the owner's ruling). The rule: a path says who uses a thing; a thing lives inside the one thing that uses it, and what several things use lives under the top level named for what they share. The track records the rule, the rulings, the tree, and what of it is left: stage 5's exit and stage 10.This body is the record. Each stage's evidence (decisions, every gate's log, negative controls, what was unsure) is one comment, linked under Evidence.
Also in this branch, as its own commit (e7a9954):
issues/machines-anyone-can-lend-to-toyos.md, filed unchanged at the owner's request.What moved where
A directory drops
toyos-; no package name changes. Top level after:.cargo .claude .github .gitignore .gitmodules CLAUDE.md Cargo.lock Cargo.toml LICENSE-APACHE LICENSE-MIT NOTICE README.md apps assets build clippy.toml doom.jpg first-boot.jpg images issues kernel lib licenses loader rust sdk system tests. Stage 10 movesassets,licensesand the two photos.toyos-abi,toyos,toyos-keymap,userland/toyos-font,userland/toyos-window,userland/filepicker-api,toyos-osrelease,userland/libc,tests/libc-archsdk/{abi,toyos,keymap,font,window,filepicker,osrelease,libc,libc/arch}toyos-{cpuvuln,microcode,its,smmu,usbhid,phys}kernel/<name>bcachefsand 31toyos-*crateslib/<name>userland/'s 23 programs; calc, doom, editor, files, paint, snake, toyfetch; proctest, kernelprobe, metalprobe, test-runnersystem/<name>,apps/<name>,tests/guest/<name>userland/sprite; the net family,toyos-dhcp,toyos-dns,toyos-i219system/compositor/sprite;system/netstack/{ip,shard,udp,wire,dhcp,dns,i219}userland/{acpiserver-api,logkeeper-api,toyos-pci-claim};userland/CLAUDE.mdlib/{acpiserver-api,logkeeper-api,pci-claim};system/CLAUDE.mdsystem.toml,diag/system.toml,console/system.toml;tests/<case>/system.tomlimages/{system,diag,console}.toml;tests/images/<case>.tomlsrc/metal*.rs,src/testargs.rs,src/bin/toyos-metal.rs,tests/t14-linuxtoyos-metalintests/metal, readings intests/metal/t14-linuxtests/toyos-rust-tests; the C cases;tests/testcases/tinyccand itsLICENSEtests/guest/rust-tests;tests/guest/c;tests/corpus/tinycc/src/,src/bin/toyos-flash.rs,examples/imgstat.rs,src/CLAUDE.mdbuild/,build/bin/toyos-flash.rs,build/bin/imgstat.rs,build/CLAUDE.mdbootloader/(packagebootloader),.github/qemu-version,toyos-ssh/loader/,build/ci/qemu-version,build/ssh/Not moved:
tests/cavp, whichlib/sha2's SHAVS driver andlib/sha2-hw's tests read. The orchestrator ruled it shared test data, which insidelib/sha2the licence gate would count as shipping.The commits, by stage
A stage puts its semantic changes in commits of their own, before its move, with three exceptions, each a semantic change inside a move commit: ca8daa7 (stage 5) also makes
StdCrate/std_cratesread std's crates' names from their manifests; 443a316 (stage 7) also adds three entries tohostws::guest_built; df13917 (stage 9) also makeshostws's scan of the build system's files refuse a directory it cannot read. A move commit rewrites every path it breaks, so every commit builds;issues/follows in a commit of its own.toyos-abiandtoyosby version, and the build supplies them by one[patch](sysroot::std_patch, throughCARGOFLAGS_NOT_BOOTSTRAP). Therustgitlink moves to ToyOSOrg/rustmainc1b88133ec7. The dep-info gate also refuses a std built from a registry's copy of either crate. Closesissues/std-names-the-sdk-crates-by-path.md.ci::KERNEL_DIRandSDK_DIRare the directories, apart from the package names. ca8daa7: the move; std's crates are named by their manifests. b6e1951:issues/.issues/;toyos-cpuvuln-has-one-consumer-and-lives-outside-it.mdcloses.filesdraws its two icons itself and depends onspriteno more. 05d1172: programs resolve in one list of roots (build::PROGRAM_ROOTS), and a name two roots hold is refused. 09bc1c9: a crate nested in a program is a host member, as one nested in the kernel is. 443a316: the move. 401e03d:issues/.<stem>.toml, whose artifact isbootable-<stem>.img;--boot-confignames a file intests/images/. 6bbf889: the metal loop is the packagetoyos-metal;whole_diskandNodego tobuild/disk.rs, whichtoyos-flashand the loop share. a25daec: the move. d2791f6: two stale fixture notes. 170428c:issues/.build::LOADER_DIRis the loader's directory, apart from its package. df13917: the move; the root package names its[lib]and three[[bin]]s;hostws's scan of the build system's files refuses a directory it cannot read. 330e39a:issues/; the track records stages 5-9.hostws's rule. Under aPROGRAM_ROOTSentry, a file belongs to the innermost workspace member holding it, and is host code whenhostws::host_membersholds that member. So the program crate directly under a root stays guest; a nested host member (the nine netstack crates that were root host crates onmain, and mixer, virtio-sound, aml, desktop, mdns, node) is walked; and an excluded crate under a root (thetls-*rust-tests crates) stays guest. Before it,host_files()skipped everything under a root, soevery_host_scratch_is_the_guardno longer read the 153.rsfiles of the netstack crates it read onmain. d62d5e1: one-line pointers insdk/window/CLAUDE.mdandapps/CLAUDE.mdto the scanout caveat insystem/CLAUDE.md(onmain,userland/CLAUDE.mdloaded it for both).build/CLAUDE.mdstatesstd_patch's refusal of a worktree path with whitespace, a quote, a backslash, a control character or non-UTF-8 bytes. The commit also carries the guest-built-crate issue's rename, which b86c02b edits. b86c02b: stage 4's and stage 6's exits say what was met; three issues name a valid owner, and none names a stale path. 22b8ed1: mergesorigin/mainfor abuse_page_straddle takes Stat's size from toyos_abi: red on the T14 since #851 #858. The one file abuse_page_straddle takes Stat's size from toyos_abi: red on the T14 since #851 #858 touches is renamed here totests/guest/rust-tests/, and git's rename detection carried its hunks there.Gates at the head, 22b8ed1
cargo run -- --ci host: 73 steps, all greencargo test:tests/toyos.rs61 of 61, the library's tests (315 passed, 15 ignored), checks 41std::env::temp_dir()insystem/netstack/shard/testnet/src/lib.rs, applied as a checked patch; the crate builds, thensourcegate::tests::every_host_scratch_is_the_guardruns, and the patch is reverted in the same script. At 330e39a the review measured it greencargo test --test toyos-build -- --metal --metal-readback <dir> boot:testcases boot:latencycase: 3 images stagedMeasured at the first round's head, 330e39a
Round 2 changes a test in
build/sourcegate.rs, threeCLAUDE.mdfiles andissues/, and the merge brings inabuse_page_straddle.rs, a guest test's source. None of them is what the rows below measure, except the merged guest test, whose binary is in the images.cargo run -- --ci host: 73 steps, all greencargo test:tests/toyos.rs61 of 61, the library's tests, checks 41--build-onlyx86_64 and--arch aarch64,--diag-boot --build-only,--console-boot --build-only, and everytests/images/<case>.tomlon its architecture: 22 builds.text,.rodataand.dataare byte-identical, and only local symbols'.llvm.<N>suffixes differ, which follow source files' checksumsgit diff -M: every move commit's moves are renames (stage 9's: 104, 75 at 100%, 45 modified, none added or deleted). Over the whole branch, 1550 renames; three moved files edited across stages pair only at-M20%cargo test --test toyos-build -- --metal --metal-readback <dir> boot:testcases boot:latencycase: 3 images staged; the T14 reading at 330e39a is 253/1, the one redtest_rs_abuse_page_straddle, which #858 fixesEach earlier stage's gates, at its own head, are in its comment.
Owed, and unsure
std_patchrefuses a worktree path holding whitespace, a quote, a backslash, a control character or a non-UTF-8 byte, on every bootstrap run. No measurement shows whethermain, which gave std its SDK crates by relative path, built from such a path.build/CLAUDE.mdstates the restriction.SYSROOT_SOURCESandPUBLISHEDare lists.SYSROOT_SOURCEScannot come fromsdk/alone, because libc linkstoyos-elf, which is inlib/elf.PUBLISHEDleaves outsdk/filepicker, which the filepicker ruling makes public. No release dry run was made:releaseandpublishrun only on a push tomain, so stage 5 read the plan they start from instead.SYSROOT_SOURCESandRECIPE's text).std-names-the-sdk-crates-by-path.mdasked that the sysroot key be unchanged by the switch, and every key moved. The track's stage 4 now says so, and words its exit as what was measured: identical.rlibmembers and byte-identical.rmetaand.so, with object member names aside, since they carry rustc's per-invocation token.kernel/microcodecould not sit where the track puts it;toyos-i219,toyos-pci-claimand the two-apicrates placed by the rule rather than by the brief (6, 7);testargsinsidetoyos-metal(8);hostws's scan refusing a directory it cannot read (9);issues/a-test-in-a-guest-built-crate-no-step-reads-runs-nowhere.md;issues/sprite-dereferences-a-raw-pointer-behind-a-safe-fn.md:spritehad never been linted, and the first lint of it found a safepub fnwriting through a caller's raw pointer.Evidence, one comment per stage
Stage 4 · Stage 5 · Stage 6 · Stage 7 · Stage 8 · Stage 9
Growth
git diff --shortstat origin/main...22b8ed1c8: 1956 files, +3034 −2504, of which 1550 are renames. Round 2 adds +38 −16 over 330e39a, the merged file aside. By stage (each comment breaks its own down):Production grows mostly in:
sysroot.rs/toolchain.rs's std patch and its dep-info gate (4, 5);files' own icon blit and the program roots (7);[lib]/[[bin]]tables (9).build::Bootshrinks (8).Every other changed line is a path rewritten one for one, in code, prose or
issues/.🤖 Generated with Claude Code
https://claude.ai/code/session_017cSFvbD35xJ2kGANVdm23C