Skip to content

test: isolate exec review policy config test#22512

Merged
bolinfest merged 1 commit into
mainfrom
pr22512
May 14, 2026
Merged

test: isolate exec review policy config test#22512
bolinfest merged 1 commit into
mainfrom
pr22512

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented May 13, 2026

Why

thread_start_params_include_review_policy_when_review_policy_is_manual_only builds a Config with a temporary CODEX_HOME, but ConfigBuilder::default() can still load host-managed configuration. On local macOS machines with enterprise-managed Codex config, that host state can leak into the test and change the resulting config, even though CI does not have the same managed config source.

This makes the test environment-dependent: it can pass in CI while failing locally for developers who have managed configuration installed.

What Changed

  • Updated codex-rs/exec/src/lib_tests.rs so the test calls LoaderOverrides::without_managed_config_for_tests() through ConfigBuilder::loader_overrides(...).
  • Left the rest of the test setup intact, including the temporary CODEX_HOME, temporary cwd, and explicit approvals_reviewer harness override.

Verification

cargo test -p codex-exec thread_start_params_include_review_policy_when_review_policy_is_manual_only

@bolinfest bolinfest requested review from jif-oai and pakrym-oai May 13, 2026 16:51
@bolinfest bolinfest merged commit e8969d9 into main May 14, 2026
27 checks passed
@bolinfest bolinfest deleted the pr22512 branch May 14, 2026 19:14
@github-actions github-actions Bot locked and limited conversation to collaborators May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants