Repository navigation
Fix hot-patch test path on Windows (#2080) - #2082
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Conversation
Refs #2080 Assisted-by: Claude Code:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aePVwfWQikf61EL6Ec7
passes() builds each pass's manifest path with Path::join, which writes the platform's separator. The test compared the result to a /-joined string, so it failed on Windows and kept the scheduled main run red. Compare the two as paths instead: a / in a literal is a separator on every platform, so the expectation stays readable and holds on Windows too. Fixes #2080 Assisted-by: Claude Code:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aePVwfWQikf61EL6Ec7
|
bugbot run Generated by Claude Code |
PR SummaryLow Risk Overview No runtime behavior changes—only the test expectation is corrected, with a short comment explaining why Reviewed by Cursor Bugbot for commit 5fffc73. Configure here. |
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 5fffc73. Configure here.
|
[agent] PR shepherd: review brief for the approver What it does: This only changes a test. Risk: Low. Test-only, two assertions in one file, and no product code changes. Look here
Verified
Changes I made: none. Open questions: none. Generated by Claude Code |
LLM Description written by Claude Code:claude-fable-5-2
Fixes #2080
Summary
A test-only change.
hot_patch::tests::a_start_is_a_project_pass_then_a_global_passfails on Windows, which has kept the scheduled
mainrun'stest (windows-latest, 1)leg, and soci-okonmain, red since #2068.The two manifest-path assertions now compare paths instead of strings.
Root cause
passes()builds each pass's manifest path withPath::join, which writesthe platform's separator. The test compared the result to a
/-joinedstring literal:
The product code is right: the path is handed to the scan as a path, and
either separator works on Windows. Only the test's expectation was wrong.
Pathequality compares components, and Windows parses both/and\as separators, so comparing as
Paths keeps the readable literal and holdson every platform. Both assertions (project pass and global pass) are
changed; they are the only
/state/...string comparisons in the file, andthe failing job's log shows no other failed test.
Evidence
main(63f791d): https://github.com/SocketDev/socket-patch/actions/runs/43562815783, jobtest (windows-latest, 1); that test is its only failure.os=windowson the branch. https://github.com/SocketDev/socket-patch/actions/runs/43600463417:test (windows-latest, 1)(the leg that failed onmain),test (windows-latest, 2)andci-ok (windows only)all pass.cargo test -p socket-patch-cli --lib: 943 passed, 0 failed (Linux).cargo clippy --locked --workspace --all-features -- -D warnings(CI's command): clean.rustfmt --checkon the touched file: clean./code-review highon the diff: no findings. Cursor Bugbot: no issues.Note:
cargo clippy -p socket-patch-cli --all-targets --all-features -- -D warningsfails locally on unmodified
origin/maintoo (duplicate_modandformat_in_format_argsin test targets). CI doesn't lint test targets, soit isn't visible there, and it isn't part of this change.
https://claude.ai/code/session_011f9aePVwfWQikf61EL6Ec7
Generated by Claude Code