Fix Windows CI assertions for guardian and Smart Approvals#14645
Fix Windows CI assertions for guardian and Smart Approvals#14645charley-oai merged 9 commits intomainfrom
Conversation
aibrahim-oai
commented
Mar 13, 2026
- Normalize guardian assessment path serialization to use forward slashes for cross-platform stability.
- Seed workspace-write defaults in the Smart Approvals override-turn-context test so Windows and non-Windows selection flows are consistent.
Normalize guardian assessment paths to forward slashes so JSON output is stable across platforms, and make the Smart Approvals override-turn-context test explicitly seed workspace-write defaults before key navigation. Co-authored-by: Codex <noreply@openai.com>
8424d51 to
f13cb2e
Compare
Co-authored-by: Codex <noreply@openai.com>
|
@codex review this |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0906296075
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Codex <noreply@openai.com>
codex-rs/core/src/guardian.rs
Outdated
| "cwd": cwd.to_string_lossy().replace('\\', "/"), | ||
| "files": files | ||
| .iter() | ||
| .map(|path| path.to_string_lossy().replace('\\', "/")) | ||
| .collect::<Vec<_>>(), |
There was a problem hiding this comment.
Why is this being done?
There was a problem hiding this comment.
already removed.
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
codex-rs/core/src/guardian_tests.rs
Outdated
| let cwd = if cfg!(windows) { | ||
| PathBuf::from(r"C:\tmp") | ||
| } else { | ||
| PathBuf::from("/tmp") | ||
| }; | ||
| let file = if cfg!(windows) { | ||
| AbsolutePathBuf::try_from(r"C:\tmp\guardian.txt").expect("absolute path") | ||
| } else { | ||
| AbsolutePathBuf::try_from("/tmp/guardian.txt").expect("absolute path") | ||
| }; |
There was a problem hiding this comment.
FYI, I believe this could be:
| let cwd = if cfg!(windows) { | |
| PathBuf::from(r"C:\tmp") | |
| } else { | |
| PathBuf::from("/tmp") | |
| }; | |
| let file = if cfg!(windows) { | |
| AbsolutePathBuf::try_from(r"C:\tmp\guardian.txt").expect("absolute path") | |
| } else { | |
| AbsolutePathBuf::try_from("/tmp/guardian.txt").expect("absolute path") | |
| }; | |
| let (cwd, file) = if cfg!(windows) { | |
| (r"C:\tmp", r"C:\tmp\guardian.txt") | |
| } else { | |
| ("/tmp", "/tmp/guardian.txt") | |
| }; | |
| let cwd = AbsolutePathBuf::try_from(cwd).expect("absolute path"); | |
| let file = AbsolutePathBuf::try_from(file).expect("absolute path"); |
There was a problem hiding this comment.
Ah right on queue, CI started failing
Co-authored-by: Codex <noreply@openai.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b18763a553
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Codex <noreply@openai.com>
