Repository navigation
The panel test boots an image without sshserver, and a CI step's cargo finds fresh what the job's cargo built - #756
Conversation
…o finds fresh what the job's cargo built `guest / suite` was measured again on three jobs of 2026-10-08 (113110642665, 113190683753, 113188345621): 821 to 1072 s, of which the suite's own `building` figure is 368 to 610 s. Two of its costs go here. tests/panelcase is a config of the compositor and logkeeper. `screen_fatal_halt_composited` booted tests/metalcase, the T14's image, and was the only guest test that did: its ROOT's BUILT line was 121 to 212 s on the runners. `cargo build --timings` of that ROOT on the development machine gave 369 unit-seconds over 279 units, 230 of them in crates only sshserver reaches, and no guest speaks SSH. Built after the same builds, panelcase's BUILT line read 8 s there against metalcase's 53 s. What the test asserts is unchanged: the compositor holds the panel, the fatal report takes it, and the black box carries the report. What it loses is sshserver, netstack, soundserver, the block and file servers and test-runner running when the kernel dies; it asserts nothing of them. `cargo run` hands the program it runs CARGO_PKG_* and CARGO_MANIFEST_*, and cargo judges a build script's `rerun-if-env-changed` by its own environment. ring's script names seven of them, so the suite step's `cargo test`, a child of the driver, found ring stale against the build the job's own cargo had just made and compiled ring, rustls, rustls-webpki, ureq and the build system again: 36 to 54 s between `=== [ci] the suite` and `Running tests/toyos.rs`. `dispatch` now takes both families out of the driver's environment before any step. Setting them by hand on `cargo test --test toyos-build --no-run` reproduced the five `Compiling` lines; under `cargo run -- --ci guest` at this commit the step prints `Finished` and none. issues/the-guest-job-builds-every-image-on-every-run.md is closed: its exit was the measurement, which the three logs' BUILT lines now are, two of them pull request runs. What they leave is filed with those numbers as issues/the-guest-suite-compiles-every-guest-crate-cold-on-every-run.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RvnWQFcMuGqTHYhvSnTe8A
|
Evidence for the body at m1-forget-nothing --- a/src/ci.rs
+++ b/src/ci.rs
@@ -106,7 +106,7 @@ fn forget_own_package() {
for (name, _) in std::env::vars_os() {
let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_") || n.starts_with("CARGO_MANIFEST_"));
if own {
- std::env::remove_var(name);
+ let _ = name;
}
}
}m2-keep-manifest-vars --- a/src/ci.rs
+++ b/src/ci.rs
@@ -104,7 +104,7 @@ pub fn dispatch(root: &Path, args: &[String]) {
/// its dependents and this crate a second time.
fn forget_own_package() {
for (name, _) in std::env::vars_os() {
- let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_") || n.starts_with("CARGO_MANIFEST_"));
+ let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_"));
if own {
std::env::remove_var(name);
}m3-keep-pkg-vars --- a/src/ci.rs
+++ b/src/ci.rs
@@ -104,7 +104,7 @@ pub fn dispatch(root: &Path, args: &[String]) {
/// its dependents and this crate a second time.
fn forget_own_package() {
for (name, _) in std::env::vars_os() {
- let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_") || n.starts_with("CARGO_MANIFEST_"));
+ let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_MANIFEST_"));
if own {
std::env::remove_var(name);
}m4-no-gate-row --- a/src/build.rs
+++ b/src/build.rs
@@ -3159,7 +3159,6 @@ mod tests {
"tests/metalcase/system.toml",
"tests/metaldevicecase/system.toml",
"tests/netcase/system.toml",
- "tests/panelcase/system.toml",
"tests/proctreecase/system.toml",
"tests/testcases/system.toml",
"tests/virtjobcase/system.toml",m5-compositor-not-started --- a/tests/panelcase/system.toml
+++ b/tests/panelcase/system.toml
@@ -7,7 +7,7 @@
assets = ["assets"]
[boot]
-start = ["logkeeper", "compositor"]
+start = ["logkeeper"]
# `every_boot_config_runs_logkeeper` is what refuses a boot config without it.
[programs.logkeeper]The whole suite, metalcase's ROOT against panelcase's, each after netcase's and testcases' ROOTs from an empty userland target, development machine: The first block began with every target empty, so its first The reproduction of the second build, before the change ( |
|
Review round 1 of Net lines ( BLOCKER
NOTE
The three rulings asked for
Against #746 (
|
…e says what is true of the folded tree The three files both sides changed, src/build.rs, src/ci.rs and tests/toyos.rs, are main's whole plus this branch's hunks and nothing else: `git diff origin/main` on them shows the `ALL_CONFIGS` row, the `forget_own_package` call, function and test pair, and the panelcase path. The issue file: `[profile.toyos]` is the root manifest's; the bullet that the five-locks issue folds three target directories is gone with that issue, the fold having landed; the development machine's figures for a fresh suite and for an entry's bytes are said to be from before the fold and not measured since; "No runner has measured either" is dropped. Job 113260475768, #746's merge group at `1084ddc9a`, is added as column D: the one baseline that builds as the tree now does. It still shows both costs this branch removes, `BUILT x86_64 ROOT of tests/metalcase ... (158s)` and ring, rustls, rustls-webpki, ureq and toyos-build compiled a second time under `=== [ci] the suite` (`Finished test` in 44.82s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RvnWQFcMuGqTHYhvSnTe8A
|
Evidence for the body at m1-forget-nothing diff --git a/src/ci.rs b/src/ci.rs
index 1fb5d1d48..5053d9954 100644
--- a/src/ci.rs
+++ b/src/ci.rs
@@ -106,7 +106,7 @@ fn forget_own_package() {
for (name, _) in std::env::vars_os() {
let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_") || n.starts_with("CARGO_MANIFEST_"));
if own {
- std::env::remove_var(name);
+ let _ = name;
}
}
}m2-keep-manifest-vars diff --git a/src/ci.rs b/src/ci.rs
index 1fb5d1d48..fcf6e93e5 100644
--- a/src/ci.rs
+++ b/src/ci.rs
@@ -104,7 +104,7 @@ pub fn dispatch(root: &Path, args: &[String]) {
/// its dependents and this crate a second time.
fn forget_own_package() {
for (name, _) in std::env::vars_os() {
- let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_") || n.starts_with("CARGO_MANIFEST_"));
+ let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_"));
if own {
std::env::remove_var(name);
}m3-keep-pkg-vars diff --git a/src/ci.rs b/src/ci.rs
index 1fb5d1d48..f811eae04 100644
--- a/src/ci.rs
+++ b/src/ci.rs
@@ -104,7 +104,7 @@ pub fn dispatch(root: &Path, args: &[String]) {
/// its dependents and this crate a second time.
fn forget_own_package() {
for (name, _) in std::env::vars_os() {
- let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_PKG_") || n.starts_with("CARGO_MANIFEST_"));
+ let own = name.to_str().is_some_and(|n| n.starts_with("CARGO_MANIFEST_"));
if own {
std::env::remove_var(name);
}m4-no-gate-row diff --git a/src/build.rs b/src/build.rs
index 8c8c90eba..c14988ca7 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -3104,7 +3104,6 @@ mod tests {
"tests/metalcase/system.toml",
"tests/metaldevicecase/system.toml",
"tests/netcase/system.toml",
- "tests/panelcase/system.toml",
"tests/proctreecase/system.toml",
"tests/testcases/system.toml",
"tests/virtjobcase/system.toml",The guest test at this head, exit 0 (its |
|
Review round 2 of Net lines ( Round 1's BLOCKER
Round 1's NOTEs
The lines the landing rests on, read in
|
The track issue conflicted in the meter paragraph, which #766 rewrote with the T14's reading and this branch had re-owned. It takes main's text whole, its two new bullets included, with the one owner line this branch changed: "the power-off stage" is this slice, whose stage paragraph the branch deletes, so the meter's owner reads "this stage". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RvnWQFcMuGqTHYhvSnTe8A
Takes two costs out of
guest / suiteby building less, and replacesissues/the-guest-job-builds-every-image-on-every-run.mdwith a file for what remains. No cache entry is added and no workflow is touched.Head
e93b3a141: the branch merged withorigin/main1084ddc9a(#746, the one workspace). Every local measurement under "Gates" and "Mutations" is from this head. CI ranhostandguest / suiteon it (run 37765227287, both success); what the landing rests on in their logs is under "What CI showed".The measurement
Four
guest / suitejobs of 2026-10-08, each with the sysroot restored from cache, split by the log's own timestamps and the suite'sbuildingandtestingfigures. A is job 113110642665 (run 37715155555, a merge group), B is 113190683753 (run 37740095844, #749, which moved the kernel), C is 113188345621 (run 37739721567, #750, which moved one userland crate). D is 113260475768 (run 37760845496), #746's own merge group at1084ddc9a: the one baseline that builds as the tree now does. Seconds:deps: apt and rustupFinished dev)Finished test)The
BUILTlines behindbuilding:mask-windowskernel, ROOT of tests/virtsmpcaseThe premise after the fold. #746 changed how steps build, so both halves were checked against D before anything was kept. Both costs are still on
main: D printsBUILT x86_64 ROOT of tests/metalcase, for screen_fatal_halt_composited (158s), and between=== [ci] the suiteandRunning tests/toyos.rsit printsCompiling ring v0.17.14,Compiling rustls v0.23.45,Compiling rustls-webpki v0.103.15,Compiling ureq v3.4.2,Compiling toyos-build v0.1.0andFinished \test` profile ... in 44.82s`. Neither half of this change goes.What changed, per decision
screen_fatal_halt_compositedbootstests/panelcase, a new config oflogkeeperandcompositor, in place oftests/metalcase, the T14's image. It was the only guest test that booted metalcase.cargo build --timingsof metalcase's ROOT on the development machine, before the fold: 279 units, 217 compiled, 369 unit-seconds, 230 of them in crates onlysshserverreaches (russh, tokio, p521, fiat-crypto, crypto-bigint) and 58 in crates only the compositor reaches. No guest test speaks SSH. Built after the same builds (netcase's and testcases' ROOTs), panelcase'sBUILTline read 8 s where metalcase's read 53 s; that pair is from30d6713a0, before the fold, and was not taken again.sshserver,netstack,soundserver,diskserver,fileserverandtest-runnerare no longer running when the kernel dies. The test asserts nothing of them and, the boot being muted, never read a line from them.metalcaseis unchanged in what it builds and stays the T14'sMETALCASEarm; two sentences of its header that described the QEMU boot are deleted.SCREEN_TESTS' comment).cargo runtold the driver about its own package.cargo runsetsCARGO_PKG_*andCARGO_MANIFEST_*for the program it runs, and cargo judges a build script'srerun-if-env-changedby its own environment. ring's script names seven of them. So the suite step'scargo test, a child of the driver, finds ring stale against the build the job's own cargo has just made, and compiles ring, rustls, rustls-webpki, ureq andtoyos-buildagain: the fiveCompilinglines under=== [ci] the suitein all four logs.ci::dispatchremoves both families before any step (forget_own_package). Nothing in the tree reads either family from the environment at run time: every use insrc/andtests/isenv!, but the new test's own assertion and a proc macro in asrc/cicache.rsfixture, which a cargo of its own runs.buildingfigure; what stands in its way is in the new issue: the repository's caches are already past 10 GB with no gate reading a stored size, and no pull request can show the saving before a writer onmainexists.CARGO_INCREMENTAL=0in the job. A cold x86-64 kernel took 43 s of CPU without it and 62 s with it on the development machine under load, but it also turns rustc's MIR inliner on (the rootCargo.toml,[profile.toyos]), so the job would boot other bytes thancargo runbuilds. Recorded in the issue.issues/the-guest-job-builds-every-image-on-every-run.mdis deleted. Its exit asked what an entry restored frommain's scope would save, measured on a pull request run. That was not measured as written: no entry was restored. What two pull request runs (B, C) measure is each build's cost, which bounds any entry's saving from above; the review's ruling 1 is that the exit is met as that bound and superseded, not met as written.issues/the-guest-suite-compiles-every-guest-crate-cold-on-every-run.mdcarries the remainder, with an exit a log can fail:buildingunder 60 s on a pull request that moves no guest source.[profile.toyos]is cited at the root manifest; the bullet citing the five-locks issue is gone with that issue, its fold having landed; the development machine's figures for a fresh suite (23 s) and an entry's bytes are said to be from before the fold, when the guests built into four target directories, and not measured since; "No runner has measured either" is dropped; D is added.What CI showed
Run 37765227287 at
e93b3a141(checked out as7196814, this head merged into1084ddc9a), against the lines below. One run against one run on different runners: the baseline is D, #746's own merge-group job onmain(113260475768).host(job 113271124288)[ci] Host: 78 step(s), all green.Cache not found for input keys: host-sealed-Linux-X64-…,the cache entry, read by content: none restored: the run is cold, andCompiling ringunder=== [ci] the build system: the cold compile expected untilmain's nightly after One workspace, one lock: the root, the kernel, the loader, userland and the SDK resolve together #746 seals an entry.guest / suite(job 113272198698)3. Between
=== [ci] the suiteandRunning tests/toyos.rs: sixCompilinglines,toyos-bootmap,kernel,toyos-i219,toyos-xhci,toyos-userbound,toyos-build: the harness and its dev-dependencies, as in D. None of ring, rustls, rustls-webpki or ureq.Finished `test` profile … in 11.92sagainst D's 44.82 s.4.
BUILT x86_64 ROOT of tests/panelcase, for screen_fatal_halt_composited (35s),PASS screen_fatal_halt_composited (7s), and no line namingtests/metalcase(D: 158 s for that image).5.
test result: ok. 31 passed, 31 total (549.4s; workers: 411s building, 138s testing)against D's465s building;[ci] Guest: 5 step(s), all green.What that is and is not: the harness's build fell from 44.82 s to 11.92 s and the panel test's image from 158 s to 35 s, on a runner that was the slower of the two (its driver's build read 2m 36s against D's 2m 04s); every other large
BUILTline rose on it (netcase 89 s to 117 s, the x86-64 test kernel and testcases 54 s to 63 s, the AArch64 test kernel, loader and testcases 91 s to 111 s).buildingis 465 s against 411 s; 54 s is not a saving per run, and nothing past these figures is measured.The merge with #746
git merge origin/mainat1084ddc9amergedsrc/build.rs,src/ci.rsandtests/toyos.rswithout a conflict. Checked by hand:git diff origin/main HEAD -- src testsis this branch's hunks and nothing else: theALL_CONFIGSrow insrc/build.rs; theforget_own_package()call indispatch, the function and the test pair insrc/ci.rs; thetests/panelcasepath intests/toyos.rs;tests/panelcase/system.toml; and the two deleted sentences oftests/metalcase/system.toml. Every other line of the three files ismain's.Gates
All at
e93b3a141, run alone by the orchestrator frombuild-request.sh, tree clean before and after.cargo metadata --lockedcargo test --lib(the build system, ashost's "the build system" step runs it)394 passed; 0 failed; 11 ignoredcargo test --test toyos-build -- screen_fatal_halt_compositedBUILT x86_64 kernel boot-actuators,test-actuators, loader, ROOT of tests/panelcase,[panic] the fatal report is on the panel and sealed in the black box (14264 bytes),PASS screen_fatal_halt_composited (8s),1 passed, 1 total. Its140s buildingis the worktree's first sysroot after the merge, not panelcase's costcargo run -- --ci hosthoston this head, job 113271124288,[ci] Host: 78 step(s), all greenguest / suiteon this head, job 113272198698,31 passed, 31 total,[ci] Guest: 5 step(s), all greengit status --porcelain --ignore-submodules=noneMutations
Each applied as a checked patch, shown to build (
cargo test --lib --no-run, exit 0), run, and reversed (exit 0) in one script. M1 to M4 were run again ate93b3a141because the merge changed the files they patch (src/ci.rs,src/build.rs); the patches, regenerated against this head, are in the comment below. M5 was not: the merge did not changetests/panelcase/system.toml, and its result is from30d6713a0.forget_own_packageremoves nothingci::tests::a_steps_cargo_finds_fresh_what_the_jobs_cargo_builtDirty one v0.1.0 (...): the env variable CARGO_PKG_NAME changedCARGO_MANIFEST_*the env variable CARGO_MANIFEST_DIR changedCARGO_PKG_*the env variable CARGO_PKG_NAME changedALL_CONFIGSrow for panelcasebuild::tests::every_shipped_boot_config_is_coveredassertion \left == right` failedatsrc/build.rs:3564`30d6713a0)screen_fatal_halt_composited(guest)FAIL screen_fatal_halt_composited: the compositor never took the screenWhat the new test sees that reading cannot: that cargo compares a build script's named variables against its own environment and not the script's. That
dispatchcalls the function is read, and line 3 above is where a runner shows it.Size
git diff --shortstat origin/main...HEAD: 7 files, +160 −32. Production:src/ci.rs+17. Tests:src/ci.rs+43,src/build.rs+1,tests/toyos.rs+1 −1,tests/panelcase/system.toml+20,tests/metalcase/system.toml+1 −4. Issues: +77 −27.What I am unsure of
tests/toyos.rs, which holds the test it turns red, did change in the merge, though not the test's own assertions.🤖 Generated with Claude Code
https://claude.ai/code/session_01RvnWQFcMuGqTHYhvSnTe8A