fix(tui): restore the windows test job - #497
Merged
Merged
Conversation
The test bound `dir` unconditionally but used it only inside two `#[cfg(unix)]` blocks, so on Windows it compiled to an unused variable and `-D warnings` failed the build. Every PR's Windows job has been red since the test landed. Gating the whole test is the honest fix: creating a symlink on Windows needs developer mode or SeCreateSymbolicLinkPrivilege, so the scenario is not reachable on a stock runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test (windows-latest)has been failing onmainsince the@-mentions work landed, which makes every PR's Windows job red. Two distinct problems, one hiding the other.1. The build error
expand_rejects_symlink_escaping_the_workspacebounddirunconditionally but used it only inside two#[cfg(unix)]blocks. Gating the whole test onunixis the honest fix — creating a symlink on Windows needs developer mode orSeCreateSymbolicLinkPrivilege, so the scenario isn't reachable on a stock runner. Unix coverage is unchanged.2. What the build error was hiding
Because the error killed the whole
agentbin test target, no test in that binary had run on Windows since the mentions PR merged. Fixing the build surfaced 3 genuine failures (534 passed, 3 failed):This is a product bug, not a test bug.
display_pathlabels an inlined file with whateverstrip_prefixreturns, so on Windows the model receives:while the user typed
@src/main.rs. The model quotes that label back in subsequent tool calls, so the path shape it was shown disagrees with the one it was asked about.Fixed by folding separators to
/in the label. The fold is cfg-gated to Windows on purpose: a backslash is a legal filename character on Unix, so an unconditional replace would mislabel a real file rather than normalize a separator.Verification
file_labels_use_forward_slashes_on_every_platformpins the label shape and runs on all platforms.mentionstests pass on Linux;clippy --all-targets -- -D warningsandfmt --checkclean.Note for reviewers
The Windows job was effectively a no-op for the
agentbinary while this was broken. Worth assuming other Windows-specific gaps accumulated in that window — this PR fixes the three that CI can see, and does not claim the surface is otherwise clean.