test(llm-cli): fix Windows CI codex path assertions#1009
Merged
muddlebee merged 1 commit intoTracer-Cloud:mainfrom Apr 27, 2026
Merged
Conversation
- Add _posix_path_set for simulated linux/darwin fallback path checks - Assert npm_prefix unix dirs via Path.as_posix() tuples - Aligns with existing Windows test normalization pattern Made-with: Cursor
Contributor
Greptile SummaryThis test-only PR fixes Windows CI failures in four path assertions by normalising Confidence Score: 5/5Safe to merge — changes are test-only and correctly address the root cause. All remaining findings are P2 or lower; the normalization approach is sound and consistent with the logic in No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[pytest on Windows CI] --> B[patch sys.platform → linux/darwin]
B --> C[_fallback_codex_paths]
C --> D[default_cli_fallback_paths in binary_resolver]
D --> E["str(Path(candidate).expanduser())\n→ Windows backslash paths"]
E --> F[paths list contains backslash strings]
F --> G{Before fix}
F --> H{After fix}
G --> I["assert '/opt/homebrew/bin/codex' in paths\n❌ FAILS on Windows CI"]
H --> J["_posix_path_set: Path(p).as_posix()\n→ forward-slash set"]
J --> K["assert '/opt/homebrew/bin/codex' in normalized\n✅ PASSES"]
Reviews (1): Last reviewed commit: "test(llm-cli): normalize path assertions..." | Re-trigger Greptile |
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.
Errors in windows due to #781
Describe the changes you have made in this PR -
Windows CI runs
test (windows-latest)withsys.platformpatched tolinux/darwinin a few Codex fallback-path tests, butpathlib.Pathstill uses Windows separators on the runner. Assertions expected POSIX strings (/opt/...), so pytest failed on the Windows matrix (the workflow stays green only because that job usescontinue-on-error).This PR normalizes paths with
Path(...).as_posix()in those tests so they stay valid on Windows hosts while still checking the intended locations.Demo/Screenshot for feature changes and bug fixes -
N/A (test-only change). Local verification:
uv run pytest tests/integrations/llm_cli/test_codex_adapter.py— 16 passed.Code Understanding and AI Usage
Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?
If you used AI assistance:
Explain your implementation approach:
The production resolver already returns host-native path strings; the bug was test expectations that mixed “simulated OS” (
sys.platformpatch) with realPathflavor (still Windows on CI). Normalizing withas_posix()in assertions matches the existing pattern intest_fallback_paths_include_windows_defaultsand avoids changing runtime behavior.Checklist before requesting a review
Note: Please check Allow edits from maintainers if you would like us to assist in the PR.