Skip to content

permission profiles: expose availability to clients#26678

Merged
joeytrasatti-openai merged 6 commits into
mainfrom
codex/viyatb/permission-profile-availability-server
Jun 22, 2026
Merged

permission profiles: expose availability to clients#26678
joeytrasatti-openai merged 6 commits into
mainfrom
codex/viyatb/permission-profile-availability-server

Conversation

@viyatb-oai

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

Copy link
Copy Markdown
Collaborator

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
@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
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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

@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
viyatb-oai and others added 3 commits June 19, 2026 02:03
Co-authored-by: Codex <noreply@openai.com>
Avoid re-deserializing unrelated config sections without their layer base paths.

Co-authored-by: Codex <noreply@openai.com>
@joeytrasatti-openai joeytrasatti-openai force-pushed the codex/viyatb/permission-profile-availability-server branch from f01746d to b49ffdd Compare June 19, 2026 09:24

@joeytrasatti-openai joeytrasatti-openai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rebased onto current main and validated the complete allowed/disallowed catalog across core, app-server, protocol, and TUI coverage.

@joeytrasatti-openai joeytrasatti-openai enabled auto-merge (squash) June 19, 2026 09:24

@joeytrasatti-openai joeytrasatti-openai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Catalog now retains disallowed entries and derives availability from the effective layered config. Focused tests and all CI checks are green.

Comment thread codex-rs/app-server/src/request_processors/catalog_processor.rs Outdated
Comment thread codex-rs/core/src/config/permission_profile_catalog.rs Outdated
viyatb-oai and others added 2 commits June 22, 2026 12:40
Co-authored-by: Codex <noreply@openai.com>
Comment thread codex-rs/core/src/config/mod.rs
Comment thread codex-rs/tui/src/chatwidget/permissions_menu.rs
Comment thread codex-rs/tui/src/chatwidget/tests/permissions.rs
@joeytrasatti-openai joeytrasatti-openai merged commit ced3e4b into main Jun 22, 2026
31 checks passed
@joeytrasatti-openai joeytrasatti-openai deleted the codex/viyatb/permission-profile-availability-server branch June 22, 2026 20:48
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 22, 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.

3 participants