Skip to content

feat(permissions): apply inherited profiles at runtime#23705

Merged
bolinfest merged 2 commits into
codex/permissions-profile-extendsfrom
codex/viyatb/permissions-profile-runtime-stack
May 20, 2026
Merged

feat(permissions): apply inherited profiles at runtime#23705
bolinfest merged 2 commits into
codex/permissions-profile-extendsfrom
codex/viyatb/permissions-profile-runtime-stack

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented May 20, 2026

Stack

This PR is stacked on #22270. Review #22270 first for the config-level extends resolver and merge semantics; this follow-up contains the runtime and protocol wiring on top of that foundation.

Why

The resolver in #22270 makes inherited permission profiles well-defined in config, but selected profiles still need to flow through runtime permission compilation, network-proxy selection, and the active-profile metadata exposed to clients. This PR keeps that integration separate from the inheritance rules themselves so each diff has a narrower review surface.

What changed

  • Resolve selected custom permission profiles before compiling runtime sandbox and network policy, including supported built-in baselines such as :read-only and :workspace.
  • Preserve the selected profile's extends metadata on the active permission profile while the resolved permissions drive runtime behavior.
  • Update network proxy profile loading so built-in defaults and inherited custom profiles select the effective network policy consistently.
  • Add runtime coverage for built-in extension baselines, active-profile metadata, and network-proxy selection.
  • Refresh app-server protocol comments and generated schema/TypeScript fixtures for the now-active extends field.

Validation

Run on the full inheritance stack before the PR split:

  • cargo test -p codex-config
  • cargo test -p codex-core permissions_profiles_
  • cargo test -p codex-core selected_network_from_tables_
  • cargo test -p codex-core default_permissions_profile_can_extend_builtin_workspace

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdf7559323

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread codex-rs/core/src/network_proxy_loader.rs
Comment thread codex-rs/core/src/network_proxy_loader_tests.rs Outdated
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/permissions-profile-runtime-stack branch from fdf7559 to b620d33 Compare May 20, 2026 17:39
@bolinfest bolinfest self-requested a review May 20, 2026 19:16
@bolinfest bolinfest merged commit 7155129 into codex/permissions-profile-extends May 20, 2026
30 checks passed
@bolinfest bolinfest deleted the codex/viyatb/permissions-profile-runtime-stack branch May 20, 2026 19:20
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants