Skip to content

Sync approval_mode known-values doc comment for Codex v0.147.0/v0.146.1 (#219) - #226

Merged
delexw merged 2 commits into
mainfrom
fix-issue-219
Aug 13, 2026
Merged

Sync approval_mode known-values doc comment for Codex v0.147.0/v0.146.1 (#219)#226
delexw merged 2 commits into
mainfrom
fix-issue-219

Conversation

@delexw

@delexw delexw commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What

Updates the approval_mode "Known values" doc comment in discover.rs:46 and both shared/types.ts occurrences (231, 270) so all three stay in sync, per #219.

Why

Issue #219 flagged that Codex v0.147.0's --approve-for-me flag and v0.146.1's cyber-model auto-review defaults might introduce a new value into session_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) sets approval_policy="on-request" (an existing value) plus a new, separate approvals_reviewer="auto_review" config field — not a new ask_for_approval string.
  • openai/codex#37057 (cyber-model auto-review backport) also results in the existing on-request policy, 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 passed
  • cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings — clean
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check — clean
  • npx tsc --noEmit — clean
  • npx vitest run — 148 passed
  • cargo test --lib --manifest-path src-tauri/Cargo.toml http_api — 6 passed

Fixes #219

….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
delexw marked this pull request as ready for review August 12, 2026 23:56
@delexw
delexw merged commit c0bd7bb into main Aug 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compat] Codex v0.147.0/v0.146.1: --approve-for-me flag and cyber-model auto-review defaults extend approval_mode values

1 participant