Skip to content

Cargo: host test builds carry line tables; harness-job comments after #1386 - #1389

Merged
GLinnik21 merged 8 commits into
mainfrom
lane/test-profile-linetables
Nov 14, 2026
Merged

GLinnik21 merged 8 commits into
mainfrom
lane/test-profile-linetables

Conversation

@GLinnik21

@GLinnik21 GLinnik21 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

  1. rust-modules/Cargo.toml: [profile.test] debug = "line-tables-only". Host unit-test builds in the main checkout stop writing full DWARF.
  2. Two stale comments about the harness job are rewritten to match Harness: each DepGates self-test runs only the rule it plants for #1386 (the Makefile comment above check-python-harness, the .github/workflows/ci.yml comment above host-python-harness).
  3. The prose the setting made false is corrected: tools/build-gc.sh (lane policy text), docs/agent-reference.md, tools/cargo-seed.py, .github/actions/host-rust/action.yml.

Which units the setting reaches

cargo test builds EVERY unit of the host unit suite with the test profile, not just the test harness: the 18 test binaries, the workspace library units under them and the third-party library units (cargo test --lib --no-run --unit-graph on the Makefile's -p list names profile.name = "test" for all of them; a -v build shows -C debuginfo= following CARGO_PROFILE_TEST_DEBUG for plx_base/plx_machine/plx_gfx/plx_platform rlibs). The test profile inherits dev, so until now it carried whatever dev had.

Reached: make check's check-cargo-unit-*, make test-fast, make test-crate, make test-hostsim, make build-bench, and the CI host unit jobs.
Not reached: [profile.dev]. make sim-macos is a cargo build (dev) and sim-linux / macapp / the ARM library use --release or --profile tvdev; no recipe passes --profile test. make lint / make check-nodef are cargo clippy / cargo check (dev, no codegen).

Lanes and CI: no change. .claude/worktrees/.cargo/config.toml (tools/build-gc.sh) and CI's ~/.cargo/config.toml (host-rust action) already set [profile.dev] debug = "line-tables-only" and [profile.dev.package."*"] debug = false, which test inherits; the --unit-graph JSON of the whole suite is byte-identical before and after this change in a lane. Only the owner's main checkout (full-DWARF dev) changes. There, third-party crates move from full DWARF to line tables too (a manifest debug applies to them; a package override would be the next step, not taken here).

Bench: how it was made representative of the main checkout

A bench run in a lane would show nothing (the lane config zeroes the difference). So base and head were measured in two scratch git worktrees OUTSIDE .claude/worktrees/ (no lane config, no ~/.cargo/config.toml), i.e. dev = full DWARF as in the main checkout. Checked first with --unit-graph: base has debuginfo 2 on all 18 test units, the 17 workspace library units and 100 third-party library units (the rest are host build scripts / proc-macros at 0); head has line-tables-only on exactly those units.

Command, each tree (make build-bench ARGS="--only leaf,ui,hub,leaf-inc,hub-inc,tests --cold --runs 3"; the second pair of runs left out tests and --cold), run alternately base, head, base, head on the same warm trees. Apple M4, 10 cores, rustc 1.100.0. Base de6a21c0c, head 9b2ad8371 (the later commits only change comments and prose). Medians of 3 per run, seconds:

Scenario base A1 head B1 base A2 head B2 pooled median (6 runs each), delta
Edit leaf (plx_base cbuf.rs), non-incremental 39.8 33.9 43.5 35.9 43.3 -> 34.7 s, -19.8%
Edit leaf (plx_ui dwell.rs), non-incremental 21.7 18.5 23.4 20.1 23.2 -> 19.1 s, -18.0%
Edit hub (plx_ui lib.rs), non-incremental 21.5 18.3 23.1 20.0 23.0 -> 19.2 s, -16.7%
Edit leaf (plx_base cbuf.rs), incremental (target-fast) 16.1 15.5 21.8 16.1 19.8 -> 15.9 s, inconclusive (see below)
Edit hub (plx_ui lib.rs), incremental 6.0 5.9 6.0 6.4 6.0 -> 6.2 s, no change
Unit suite run, default features (one pair) 47.4 44.5 - - -6.1%; 13429 passed / 0 failed / 116 ignored on both

Each head run against its adjacent base run, non-incremental rows: leaf -14.9% / -22.1% / -17.3%, ui -14.5% / -20.8% / -14.0%, hub -14.8% / -20.6% / -13.4% (the machine was shared with other lanes and ran slower in the second half, on both sides; the loaded first rounds are in the medians' tails, not the medians). Disk, du of rust-modules/target + target-fast after the runs: 3.13 GB + 6.43 GB (base) -> 2.47 GB + 5.29 GB (head), -19%.

What this does NOT show: the incremental loop (make test-fast, make test-crate) is not clearly faster. hub-inc is flat; leaf-inc reads -4% against the first base run and -26% / -29% against the second, because the baseline itself drifted from 16.1 s to 21.8 s between the two base runs. The measured gain is in non-incremental test builds (make check's cargo leg, build-bench, a cold or re-keyed tree).

What is lost, and the escape hatch

Variable-level debug info in host test binaries of the main checkout: lldb/rust-lldb on a test no longer shows locals or types. Panic backtraces keep file:line (that is what a line table is for). To get full DWARF back for one run: CARGO_PROFILE_TEST_DEBUG=2 make test-crate ... (or cargo test --config profile.test.debug=2). CARGO_PROFILE_DEV_DEBUG=2, the old hatch in tools/build-gc.sh's lane policy, no longer reaches a cargo test build because the manifest's explicit test value outranks what test inherits from dev; that text is corrected.

Costs to know

  • The first host test build on main after this lands is fully cold, third-party crates included (the debuginfo level is part of every unit's hash), and leaves the old hashes in target/debug/deps (tools/build-gc.sh --stale sweeps them once they are old enough).
  • tools/cargo-seed.py keys the seed on the manifest bytes, so lanes re-seed once.
  • CI's rust-cache key hashes rust-modules/Cargo.toml, so the host jobs have one cold build; the units themselves are unchanged for CI (identical unit graph).
  • The lane policy marker in tools/build-gc.sh stays v2 on purpose: the installer replaces any marked file that lacks the exact current marker, so a bump would flip the file between lanes on older and newer build-gc.sh, and cargo-seed.py hashes every applying cargo config byte for byte. The corrected text reaches fresh installs only; the installed comment stays as it was (a comment in an untracked file).

The comment fixes

Gates

Committed tree, git status --short empty before and after, head 603d477f5:

  • cd ci && python3 -m unittest test_ci_workflows test_ci_split test_dependencies: Ran 124 tests in 3.245s / OK

  • cd ci && python3 test_arm_profile.py: Ran 24 tests in 32.613s / OK

  • cd ci && python3 -m unittest test_build_gc test_cargo_seed (after the last edit): Ran 112 tests in 87.139s / OK (skipped=1); with test_test_fast test_no_host_staticlib on the previous commit: Ran 132 tests / OK (skipped=1)

  • make test-crate C=plx_base: test result: ok. 272 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

  • make check-nodef: exit 0 (Finished dev profile [unoptimized + debuginfo] target(s) in 17.81s)
    After the two read-only re-certifications below, head e47fbee18 (commits acd3c123e, e47fbee18), git status --short empty before and after:

  • python3 ci/test_readonly_dependencies.py: Ran 64 tests in 1.113s / OK (11 failures before the serde_json re-pin)

  • python3 ci/test_machine_readonly.py: Ran 34 tests in 0.227s / OK

  • python3 ci/test_readonly_generated.py: Ran 20 tests in 0.655s / OK (8 failures and 1 error before the generated-enums re-pin)

  • make check-python-rest: ==== check: 136 steps — all ok (191s wall, 454s cpu, 4 at once; slowest: test_build_gc.py 89s, test_disk_budget.py 55s, test_disk_preflight.py 42s) ==== (4 of 136 steps failed before the generated-enums re-pin: test_check_machine_shape.py, test_transition_arguments.py, check-machine-shape.py, test_readonly_generated.py)

  • Read-only certificates re-certified with the owner's explicit approval (2026-11-14), because [profile.test] changes the root rust-modules/Cargo.toml hash both pin:

    • ci/proofs/serde-json-immutable.json (regenerated with ci/readonly_dependencies.py --produce): workspace.manifests["Cargo.toml"] fbeb9007... -> c57b1c2d..., and ui/src/lib.rs lib_sha256 c77775a6... -> 616bd784... (stale on main since 6a74d2a8b, included with the owner's approval); CERTIFICATE_SHA256 in ci/readonly_dependencies.py 7a299a63... -> 29e62dc1... .
    • ci/proofs/platform-generated-enums.json: manifests["Cargo.toml"] fbeb9007... -> c57b1c2d... only (the file is equal to readonly_generated.produce_certificate output); CERTIFICATE_SHA256 in ci/readonly_generated.py b61be9b4... -> c737368b... .
  • Not run: the full make check (the unit suite itself passed in the bench on a main-like config: 13429 passed / 0 failed / 116 ignored, base and head). pr-reviewer ran once on the combined diff (one MINOR, fixed in the last commit); doc-claim-auditor is left to the manager.

🤖 Generated with Claude Code

GLinnik21 and others added 8 commits November 14, 2026 09:46
[profile.test] debug = "line-tables-only". cargo test builds every unit of the
host unit suite (workspace libraries and third-party crates included) with the
test profile, which inherited full DWARF from dev in the main checkout; lanes and CI
already trim dev through a cargo config, which test inherits, so for them the unit
graph is unchanged. dev is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Makefile (check-python-harness) and ci.yml (host-python-harness) described DepGates
as running the whole of ci/check-deps.sh per test, with 175 s / 661 s figures; since
#1386 each self-test runs only the rules it plants for. Both now say so, with the
CI step times read from main's runs on 2026-11-14 (144-196 s after, 380-500 s before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t has line tables

The test-profile setting falsified three statements: the build-gc.sh lane policy named
CARGO_PROFILE_DEV_DEBUG=2 as the way to get DWARF in a host test (it is
CARGO_PROFILE_TEST_DEBUG=2 now), and agent-reference.md, cargo-seed.py and the
host-rust action said the main checkout keeps full DWARF without saying it is the dev
profile's. The policy marker stays v2: cargo-seed.py hashes every applying cargo
config byte for byte, and a version bump would also flip between lanes on older and
newer build-gc.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… check covered dev builds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…profile

Both said the host tests run the dev profile; they run the test profile, which
inherits dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… change

The [profile.test] table added to rust-modules/Cargo.toml changes the root
manifest's pinned hash (workspace.manifests["Cargo.toml"]), so the serde_json
read-only certificate is regenerated with the documented producer
(ci/readonly_dependencies.py --produce) and CERTIFICATE_SHA256 is re-pinned to
the new canonical hash. Regenerated with the owner's explicit approval
("Approve re-pin", 2026-11-14).

Exactly two hashes change: the root Cargo.toml manifest hash, and the lib_sha256
of ui/src/lib.rs, which had been stale since 6a74d2a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… manifest change

ci/proofs/platform-generated-enums.json pins the root Cargo.toml by hash too, so the
[profile.test] table makes the generated-unit-enum proof return None and the machine-shape
gates that rest on it fail. The one changed value is manifests["Cargo.toml"]
(fbeb9007... -> c57b1c2d...), the same root-manifest hash the serde_json certificate
takes in the previous commit; the file is verified equal to readonly_generated.produce_certificate
output and CERTIFICATE_SHA256 is re-pinned to its canonical hash (c737368b...). Re-certified
with the owner's explicit approval (2026-11-14).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GLinnik21
GLinnik21 merged commit bc12623 into main Nov 14, 2026
25 checks passed
@GLinnik21
GLinnik21 deleted the lane/test-profile-linetables branch November 14, 2026 20:28
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