Fix auto-review config compatibility across protocol and SDK#19113
Merged
won-openai merged 1 commit intomainfrom Apr 23, 2026
Merged
Fix auto-review config compatibility across protocol and SDK#19113won-openai merged 1 commit intomainfrom
won-openai merged 1 commit intomainfrom
Conversation
Collaborator
Author
|
@codex Review |
Contributor
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
| if key == "auto_review" { | ||
| pinned_features.insert(Feature::GuardianApproval, enabled); | ||
| continue; | ||
| } |
Collaborator
There was a problem hiding this comment.
why is this specifically needed?
b48a967 to
784a1e6
Compare
dylan-hurd-oai
approved these changes
Apr 23, 2026
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.
Why
This keeps the partial Guardian subagent -> Auto-review rename forward-compatible across mixed Codex installations. Newer binaries need to understand the new
auto_reviewspelling, but they cannot write it to shared~/.codex/config.tomlyet because older CLI/app-server bundles only knowuserandguardian_subagentand can fail during config load before recovering.The Python SDK had the opposite compatibility gap: app-server responses can contain
approvalsReviewer: "auto_review", but the checked-in generated SDK enum did not accept that value.What Changed
ApprovalsReviewer::AutoReviewreadable from bothguardian_subagentandauto_review, while serializing it asguardian_subagentin both protocol crates.approvals_reviewer = "guardian_subagent"while UI copy still says Auto-review.feature_requirements.auto_reviewto the existingFeature::GuardianApprovalgate without adding a broad local[features].auto_reviewkey or changing config writes.auto_reviewto the Python SDKApprovalsReviewerenum and coverThreadResumeResponsevalidation.Testing
cargo test -p codex-protocol approvals_reviewercargo test -p codex-app-server-protocol approvals_reviewercargo test -p codex-tui update_feature_flags_enabling_guardian_selects_auto_reviewcargo test -p codex-tui update_feature_flags_enabling_guardian_in_profile_sets_profile_auto_review_policycargo test -p codex-core feature_requirements_auto_review_disables_guardian_approvalpytest sdk/python/tests/test_client_rpc_methods.py::test_thread_resume_response_accepts_auto_review_reviewergit diff --check