Repository navigation
Fix cargo home tests failing on Windows nightly - #1814
Conversation
#1779 made cargo_home() read the home the way cargo does: HOME on Unix, USERPROFILE on Windows. The two crawler_cargo_e2e fallback tests still pointed only HOME at their temp dir, so on Windows the crawler found the runner's real ~/.cargo and both tests failed in the nightly CI run on main. Point the platform's home variable at the temp dir instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 85e3b02. Configure here.
|
PR CI is green ( I dispatched a full CI run on this branch (40831237830) to check the fix on Windows:
Generated by Claude Code |
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
Final review briefWhat it does. Test-only fix for last night's red Windows nightly. #1779 made Risk: low. One test file, 12 lines; no runtime code touched. Look here
Verified. Read the full diff and the root cause in #1779. PR CI Changes I made. None. Open questions. None. Auto-merge is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
Problem
Nightly CI on main (run 40824880386, 2026-10-29) is red. In
test (windows-latest, 2)(job 123285953223),crawler_cargo_e2efails 2 of its 41 tests every time. These are assertion failures, not a flake:The nightly before this one (2026-10-28) passed these tests. PR CI and the merge queue never run the Windows
testmatrix (it runs only on schedule, dispatch orCI_SCOPE=full), so the queue did not catch this.Root cause
#1779 (230d493) changed
utils::cargo_home::cargo_home()to read the home the way cargo does: onlyHOMEon Unix and onlyUSERPROFILEon Windows. The two integration tests still pointed onlyHOMEat their temp dir. On Windows the crawler therefore resolved the runner's real~/.cargo.Fix
Test-only change. A
HOME_VARconstant (USERPROFILEon Windows,HOMEelsewhere) mirrors the one incargo_home.rs. The two tests now set, save and restore that variable. Production code is unchanged.Proof
cargo test -p socket-patch-core --test crawler_cargo_e2egives 42 passed.cargo clippy -p socket-patch-core --test crawler_cargo_e2e -- -D warningsis clean. rustfmt is clean on the touched file.workflow_dispatchof CI on this branch.Not fixed here (separate problem, same nightly)
test (windows-latest, 1)also fails 3socket-patch-core --libtests from #1763/#1764. Two use Unix-only absolute paths for GOWORK (/elsewhere/go.work,/nonexistent/go.work) and one gets a\\?\verbatim path back. Open PRs #1812 and #1800 touch those files, so this PR leaves them alone. Tracked in a ci-janitor issue.Where tests run
No test removed or moved.
Generated by Claude Code
Note
Low Risk
Test-only environment variable handling in integration tests; no runtime or security impact.
Overview
Fixes Windows nightly failures in
crawler_cargo_e2eforcargo_home_fallback_to_home_dot_cargoandempty_cargo_home_falls_back_to_home_dot_cargo. After productioncargo_home()started resolving home like Cargo (USERPROFILEon Windows, notHOME), those tests still pointed onlyHOMEat a temp dir, so the crawler used the runner’s real~/.cargoinstead of the staged registry tree.The change is tests only: a
HOME_VARconstant mirrors production (USERPROFILEvsHOME), and both tests now save, set, and restore that variable when isolating$HOME/.cargofallback behavior. No production code changes.Reviewed by Cursor Bugbot for commit 85e3b02. Configure here.
Generated by Claude Code