You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI perf: test (windows/macos) — redundant cargo build step + full debuginfo linking ~240 test binaries (~930 job-min/day, ~300 macOS) #1173
Run tests took 13.6 min: 5 min 28 s compiling and linking (only socket-patch-core/socket-patch-cli show Compiling, so deps came from the rust-cache) plus 8.2 min running 159 test binaries.
Build compiles the workspace bins with the dev profile. cargo test in the next step recompiles the same crates as test targets and links them.
Linking about 240 integration-test binaries with full DWARF/PDB debuginfo dominates the 5.5 min compile phase on Windows.
Root cause
ci.ymltest job, line ~285: - name: Build / run: cargo build --workspace runs before scripts/ci-test-shard.py.
cargo test already builds every [[bin]] that integration tests use via CARGO_BIN_EXE_*, so the separate build only helps if some test locates target/debug/socket-patch by path.
The dev profile's default debug = true makes every test binary carry full debuginfo, which CI never uses. Panics still give file:line with line-tables-only.
Proposed fix
Check that no test needs a pre-built binary outside CARGO_BIN_EXE_*: grep for target/debug / env!("CARGO_BIN_EXE under crates/*/tests. Then delete the Build step from the test job.
On push to main it can stay (or become cargo test --no-run) if the rust-cache save wants bin artifacts.
Set CARGO_PROFILE_DEV_DEBUG: line-tables-only in the test job env, and in e2e-build if it isn't already off. This shrinks link inputs for the ~240 test binaries on Windows and macOS.
Follow-up, separate: find out why core lib unit tests take 210 s on Windows against 57 s on macOS. Likely filesystem-heavy tests on NTFS/Defender, so check for tempdir churn.
Expected saving
Measured: removing Build saves ~628 Windows + ~306 macOS job-min/day, and about 1.5 min off each test leg's wall time.
Estimated, not yet measured: line-tables-only should save another 1–2 min per Windows/macOS leg, i.e. about 400–800 Windows and 180–360 macOS job-min/day. Please measure this on the PR.
test legs aren't on the ci-ok critical path today (Gradle e2e is), so the critical-path effect is about 0. The gain is macOS/Windows runner time and slot occupancy.
Coverage and risk
No test is removed. If some test does depend on a pre-built binary, step 1 shows that immediately as a test failure on the PR.
[agent] Triaged as priority:p3 (CI-only). No open PR references this yet; it is not a duplicate of the other CI-perf reports (#1170–#1178 each target a different workflow cost).
test (windows-latest, 2) became the last job before ci-ok in merge_group runs right after #1143 merged. It was last in 4 of the 6 successful merge_group runs created between 21:35 and 22:25 UTC, at 21–23 min. Since then it has dropped to ~18 min per run. Here is the in-job split: Build takes 2.1–2.4 min (the redundant step this issue targets) and Run tests takes 14.8–15.4 min. Examples: 37858663723, 37859440298.
Across the 24h sample, Run tests cost 12.5 min per Windows leg (n=143) and 9.7 min per macOS leg (n=117). Removing Build saves ~2 min per leg and up to ~2 min of merge-queue critical path in the runs where this leg finishes last.
[agent] Re-verified against origin/main (578b63e) on 2026-10-11: still technically applies, but the cost is now small. The redundant cargo build --workspace step is still there (ci.yml:352-353), but the test job (macOS + Windows, 2 shards) now runs only on full scope / schedule / dispatch (ci.yml:302), so it costs ~4 legs × ~1.6 min ≈ 6 job-min per nightly run instead of ~930 job-min/day. Leaving open as a low-value cleanup for the nightly tier; it does not affect PR or merge-queue runner usage.
[agent] Fix PR: #1396. The debuginfo half is already fixed on main (Cargo.toml:132, debug = "line-tables-only"); the PR drops the redundant build step.
"Redundant" cargo build --workspace (ci.yml:375-376): it isn't redundant. On macOS/Windows it is the only step that compiles and links socket-patch-node (cdylib, test = false) and the non-test socket-patch-bench binary. Locally, after the workspace build (209 crates), cargo test --workspace --no-run recompiled only 55, so most of the step's time is reused by Run tests rather than duplicated.
Cost: the test job runs only on full scope / schedule / dispatch (ci.yml:325), so PR and merge-queue usage is zero. Removing the step would save well under ~2 min × 4 legs per nightly run and lose the addon link check. A trial removal (CI: drop redundant build in nightly test job (#1173) #1396) was closed for this reason.
Activity
mikolalysenko commentedon Oct 8, 2026
[agent] Triaged as
priority:p3(CI-only). No open PR references this yet; it is not a duplicate of the other CI-perf reports (#1170–#1178 each target a different workflow cost).Generated by Claude Code
mikolalysenko commentedon Oct 9, 2026
Profiler refresh, 2026-10-09 00:17 UTC
test (windows-latest, 2)became the last job beforeci-okin merge_group runs right after #1143 merged. It was last in 4 of the 6 successful merge_group runs created between 21:35 and 22:25 UTC, at 21–23 min. Since then it has dropped to ~18 min per run. Here is the in-job split:Buildtakes 2.1–2.4 min (the redundant step this issue targets) andRun teststakes 14.8–15.4 min. Examples: 37858663723, 37859440298.Across the 24h sample,
Run testscost 12.5 min per Windows leg (n=143) and 9.7 min per macOS leg (n=117). RemovingBuildsaves ~2 min per leg and up to ~2 min of merge-queue critical path in the runs where this leg finishes last.Generated by Claude Code
mikolalysenko commentedon Oct 11, 2026
[agent] Re-verified against origin/main (578b63e) on 2026-10-11: still technically applies, but the cost is now small. The redundant
cargo build --workspacestep is still there (ci.yml:352-353), but thetestjob (macOS + Windows, 2 shards) now runs only on full scope / schedule / dispatch (ci.yml:302), so it costs ~4 legs × ~1.6 min ≈ 6 job-min per nightly run instead of ~930 job-min/day. Leaving open as a low-value cleanup for the nightly tier; it does not affect PR or merge-queue runner usage.Generated by Claude Code
mikolalysenko commentedon Oct 11, 2026
[agent] Claiming this issue (shared root cause: redundant
cargo build --workspacestep in ci.yml'stestjob). Branch: agent/fix-ci-test-redundant-build. Claim-ID: 2026-10-11T18:50:49Z-60a4f2Generated by Claude Code
mikolalysenko commentedon Oct 11, 2026
[agent] Fix PR: #1396. The debuginfo half is already fixed on main (
Cargo.toml:132,debug = "line-tables-only"); the PR drops the redundant build step.Generated by Claude Code
mikolalysenko commentedon Oct 11, 2026
[agent] Re-verified on origin/main (
41659c1) and closing as not planned.[profile.dev]usesdebug = "line-tables-only"(Cargo.toml:130-132).cargo build --workspace(ci.yml:375-376): it isn't redundant. On macOS/Windows it is the only step that compiles and linkssocket-patch-node(cdylib,test = false) and the non-testsocket-patch-benchbinary. Locally, after the workspace build (209 crates),cargo test --workspace --no-runrecompiled only 55, so most of the step's time is reused byRun testsrather than duplicated.testjob runs only on full scope / schedule / dispatch (ci.yml:325), so PR and merge-queue usage is zero. Removing the step would save well under ~2 min × 4 legs per nightly run and lose the addon link check. A trial removal (CI: drop redundant build in nightly test job (#1173) #1396) was closed for this reason.Generated by Claude Code