Sync approval_mode known-values doc comment for Codex v0.147.0/v0.146.1 (#219) - #226
Merged
Conversation
….146.1 --approve-for-me (PR openai/codex#36373) and the v0.146.1 cyber-model auto-review backport (PR openai/codex#37057) were checked against upstream: neither writes a new value into session_meta.ask_for_approval. Both route through the existing "on-request" approval policy plus a separate approvals_reviewer setting, not a new ask_for_approval string. Update the "Known values" doc comment in discover.rs and both shared/types.ts occurrences to record this so the three stay in sync and don't drift when the next Codex release lands. No functional parsing change — extraction was already a permissive passthrough. Fixes #219
delexw
marked this pull request as ready for review
August 12, 2026 23:56
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.
What
Updates the
approval_mode"Known values" doc comment indiscover.rs:46and bothshared/types.tsoccurrences (231, 270) so all three stay in sync, per #219.Why
Issue #219 flagged that Codex v0.147.0's
--approve-for-meflag and v0.146.1's cyber-model auto-review defaults might introduce a new value intosession_meta.ask_for_approval, and that the "Known values" comment is duplicated in three places with no automated check keeping them in sync.I checked the actual upstream source for the two PRs cited in the issue:
openai/codex#36373(--approve-for-me) setsapproval_policy="on-request"(an existing value) plus a new, separateapprovals_reviewer="auto_review"config field — not a newask_for_approvalstring.openai/codex#37057(cyber-model auto-review backport) also results in the existingon-requestpolicy, not a new approval-mode value.So no new string value actually lands in
ask_for_approval. Rather than guessing an unconfirmed value (the issue explicitly said not to without a real capture), I documented this finding directly in the comment so the next release cycle isn't reinvestigated from scratch, and kept the three locations word-for-word in sync.Change
Doc comment only — no functional or parsing change. Extraction in
discover.rs(payload.get("ask_for_approval").and_then(...)) was already a fully permissive passthrough with no enum validation, so it needs no changes.Verification
cargo test --lib --manifest-path src-tauri/Cargo.toml— 360 passedcargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings— cleancargo fmt --manifest-path src-tauri/Cargo.toml --check— cleannpx tsc --noEmit— cleannpx vitest run— 148 passedcargo test --lib --manifest-path src-tauri/Cargo.toml http_api— 6 passedFixes #219