fix(agent): pin codex approvals_reviewer to host#3435
Open
rnegron wants to merge 3 commits into
Open
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(agent): pin codex approvals_reviewer..." | Re-trigger Greptile |
There was a problem hiding this comment.
No showstoppers. The fix correctly pins the Codex approvals reviewer to prevent gateway 403s, with a test verifying the new arg. The bot comment about configOverrides shadowing is resolved and the code explicitly documents the intentional override escape hatch.
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.
Problem
Codex runs on
posthog_codefail every command with:Codex 0.140.0 — the native
openai/codexapp-server harness PostHog Code switched to (replacing the oldcodex-acpadapter) — ships its guardian approval reviewer as a stable, default-on feature. The reviewer calls a dedicatedcodex-auto-reviewmodel, which our gateway'sposthog_codeallowlist does not serve, so it is rejected 403 at the access check. The host already owns approvals (approvals.ts→requestPermission), so the guardian is a redundant second authority.Changes
approvals_reviewerto its own default"user"inbuildAppServerArgs, keeping approval decisions on the host instead of the gateway-blockedcodex-auto-reviewmodel."auto_review"and the legacy"guardian_subagent"are the same variant — both hitcodex-auto-review, so"user"is the only value that keeps traffic on allowlisted models.How did you test this?
vitest run src/adapters/codex-app-server— 160 pass (2 unrelated failures: unbuilt@posthog/gitworkspace dep). New assertion inspawn.test.tslocks the flag.-c approvals_reviewer="user"→ exit 0;-c approvals_reviewer="bogus"→unknown variant 'bogus', expected one of 'user', 'auto_review', 'guardian_subagent'— confirms it is a first-class, validated config value.Automatic notifications