Skip to content

permission profiles: expose availability to clients#26678

Open
viyatb-oai wants to merge 2 commits into
mainfrom
codex/viyatb/permission-profile-availability-server
Open

permission profiles: expose availability to clients#26678
viyatb-oai wants to merge 2 commits into
mainfrom
codex/viyatb/permission-profile-availability-server

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented Jun 5, 2026

Why

permissionProfile/list currently advertises every built-in and configured profile even when effective enterprise requirements prevent selecting it. That forces each client to reconstruct policy from lower-level requirement fields, which is easy to miss and difficult to keep consistent.

The catalog should remain complete so clients can explain that an option was disabled by an administrator, while also reporting whether each profile is selectable.

What

  • Add an allowed field to each permission profile summary.
  • Build a shared catalog from the effective config and current requirements, including allowed_sandbox_modes, allowed_permissions, and filesystem restrictions.
  • Use the shared catalog in app-server and the TUI so disallowed profiles remain visible but cannot be selected.
  • Use the canonical :danger-full-access profile ID in the TUI.
  • Update the app-server schemas, API documentation, behavioral tests, and TUI snapshots.

Scope

This PR targets main directly and is independent of #24852. It preserves the current behavior where built-in profiles are constrained by sandbox-mode requirements and allowed_permissions applies to configured profiles.

Testing

  • just test -p codex-core permission_profile_catalog_marks_profiles_disallowed_by_requirements
  • just test -p codex-app-server permission_profile_list
  • just test -p codex-app-server-protocol
  • just test -p codex-tui profile_permissions
  • just fix -p codex-core
  • just fix -p codex-app-server-protocol
  • just fix -p codex-app-server
  • just fix -p codex-tui
  • just fmt

@viyatb-oai viyatb-oai requested a review from a team as a code owner June 5, 2026 21:01
Co-authored-by: Codex <noreply@openai.com>
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/permission-profile-availability-server branch from 7ef098a to b097cab Compare June 5, 2026 21:44
@viyatb-oai viyatb-oai changed the base branch from viyatb/permissions-scheme-part1-20260527 to main June 5, 2026 21:45
alexc-oai added a commit that referenced this pull request Jun 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

alexc-oai pushed a commit that referenced this pull request Jun 5, 2026
@alexc-oai alexc-oai force-pushed the codex/viyatb/permission-profile-availability-server branch from 37e7874 to c32db16 Compare June 5, 2026 21:58
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/permission-profile-availability-server branch from 0cf948f to b097cab Compare June 5, 2026 22:54
Avoid re-deserializing unrelated config sections without their layer base paths.

Co-authored-by: Codex <noreply@openai.com>
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.

1 participant