fix(cli): make cwd snapshot tests portable on Windows - #431
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
The
rust-ci-fullWindows x64 run30317403819exposed three deterministiccodex-clitest failures. Two tests used Unix-only/targetfixtures, which are not absolute Windows paths. A third compared serialized path text, so the same temporary directory failed when Windows represented it through an 8.3 short path with different casing.What changed
tempfile::TempDirfor launcher and requested working directories so fixtures are absolute on every platform.paths_match_after_normalizationinstead of a hardcoded string.Verification
just test-fast -p codex-cli runtime_context_from_config_keeps_workspace_permissions_symbolic_for_cwd_snapshot(1 passed)just test-fast -p codex-cli explicit_cwd_snapshot_(2 passed)just test -p codex-cli agent_cmd::tests::(9 passed)just fix -p codex-clijust fmt2968352..HEADgitleaks scans (no leaks)The full
just test-fast -p codex-clirun passed 311 of 312 tests, including all changed tests. The sole failure was the unchangedsandbox_with_network_proxy_blocks_direct_loopback_access, where localcurltimed out with exit 28 instead of the expected connection-refused exit 7.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.