Skip to content

fix(config): honor selected profile approval policy - #530

Merged
mldangelo-oai merged 5 commits into
openai:mainfrom
sylvesterkaczmarek:fix/profile-approval-policy-precedence
Oct 17, 2026
Merged

mldangelo-oai merged 5 commits into
openai:mainfrom
sylvesterkaczmarek:fix/profile-approval-policy-precedence

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An explicitly selected Codex profile could not override a root approval_policy = "never" with "on-request". The SDK kept denying permission requests even though the selected profile requested automatic approval review. Resolve the selected profile first, consistent with model and provider settings. Fixes #528.

Changes

  • Use the existing profile selector with a null-safe fallback to the root policy; no new resolver or public API.
  • Preserve root behavior when the profile omits the policy or supplies null, which the TOML writer treats as absent.
  • Cover both override directions, runtime configuration, thread options, saved recipes, and the intentional never override for fresh and resumed Deep Scan workers.
  • Update the command-authentication test that still expected the old root-wins behavior.
  • Document profile precedence and merge main 83564c957 into the branch.

Testing

Validated head 54ef007f1f2 against main 83564c957:

  • 98 configuration, credential, Deep Scan configuration, and runtime-projection tests passed; five focused API/runtime approval cases also passed.
  • Deep Scan executor suite passed, including concurrent discovery/reducer launches and resumed workers.
  • SDK build, SDK/MCP types and generated-source checks, package formatting, Ruff checks, and plugin source compatibility checks passed.
  • Negative controls reproduced the original override bug on main and the earlier patch's null-fallback regression.
  • Broader tests are not clean: nine API cases and 26 CLI/config cases fail identically on main and this branch. Six saved-scan Python-discovery cases also reproduce on main. The full SDK run was stopped at these baseline failures; no complete SDK or cross-platform pass is claimed.

Risk and rollout

The behavior changes when an explicitly selected profile provides a policy that differs from the root. A selected on-request policy now enables automatic approval review even if the root says never. Missing or null profile values still inherit the root policy. Deep Scan workers retain their explicit never policy. No new CLI flags or dependencies.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the bug Something isn't working label Aug 18, 2026
@sylvesterkaczmarek
sylvesterkaczmarek force-pushed the fix/profile-approval-policy-precedence branch from e9d0738 to a98755b Compare October 1, 2026 09:16
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Rebased onto current main today; the branch is now 0 behind and GitHub Verified. TypeScript build:ci passes, both focused approval-policy tests pass, Prettier is clean, and git diff --check passes. Could a maintainer review the refreshed head when convenient?

@mldangelo-oai mldangelo-oai added area:config Project configuration, profiles, schemas, and effective scan settings. area:sandbox Execution permissions, isolation, trusted paths, and filesystem access controls. and removed area:sandbox Execution permissions, isolation, trusted paths, and filesystem access controls. area:config Project configuration, profiles, schemas, and effective scan settings. labels Oct 8, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Could a maintainer approve CI and review the selected-profile approval-policy fix? There has been no review since the last refresh.

@mldangelo-oai mldangelo-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! Profile overrides now behave consistently with the other settings, and the fallback and Deep Scan worker cases are covered. All required checks passed.

The separate Invoice Desk smoke test stopped before running because its CI environment is missing an API key. That's unrelated to this change.

@mldangelo-oai
mldangelo-oai merged commit f8aeff2 into openai:main Oct 17, 2026
59 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selected profile cannot relax a root approval_policy = "never"

2 participants