[codex] Ignore fsmonitor config in Git metadata reads#22652
Merged
Conversation
jif-oai
approved these changes
May 14, 2026
evawong-oai
approved these changes
May 14, 2026
Contributor
There was a problem hiding this comment.
Validated PR 22652 at head 37f8213.
Result: approve.
Validation performed:
- Checked out the PR head and verified the worktree HEAD matched 37f8213 before running the test.
- Added a targeted regression that exercises the changed metadata path through get_has_changes.
- The test creates a temporary Git repository, writes a repository configured core.fsmonitor helper, and configures Git to use that helper.
- The helper payload writes a marker file if Git invokes it. That marker is the signal for the reported behavior.
- The test then writes an untracked file and calls get_has_changes, which runs the Codex Git metadata path that now invokes git with core.fsmonitor disabled.
Observed result:
- get_has_changes returned Some(true), so Codex still detected the working tree change.
- helper_ran was false, so the repository controlled core.fsmonitor helper did not execute.
- The targeted test passed with 1 passed and 0 failed.
Relevant validation output:
ZDI_31270_AFTER_PR_FSMONITOR_VALIDATION has_changes=Some(true) helper_ran=false
test git_info_tests::zdi_31270_fsmonitor_after_pr_get_has_changes ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1743 filtered out; finished in 0.23s
Security conclusion: this validates the specific reported fsmonitor execution path after the PR. The metadata read still works, but a repository supplied core.fsmonitor helper is not executed during get_has_changes on the patched head.
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.
Summary
core.fsmonitorconfigurationget_has_changeswhen a repository defines an fsmonitor commandValidation
cargo fmt --allcargo test -p codex-core test_get_has_changes_cargo test -p codex-git-utils