Skip to content

guardian: use permission profile for review sandbox#22789

Merged
bolinfest merged 1 commit into
mainfrom
pr22789
May 15, 2026
Merged

guardian: use permission profile for review sandbox#22789
bolinfest merged 1 commit into
mainfrom
pr22789

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented May 15, 2026

Why

SandboxPolicy is being pushed back toward legacy config loading and compatibility boundaries. Guardian review sessions already want the built-in read-only permission behavior; carrying that as an active PermissionProfile makes the review sandbox follow the new permissions path instead of configuring the child session through the legacy policy API.

What Changed

  • Configure the guardian review session with PermissionProfile::read_only().
  • Send the read-only profile through the guardian child Op::UserTurn.
  • Keep the legacy sandbox_policy field populated with SandboxPolicy::new_read_only_policy() declared next to the profile so the two remain visibly in sync until the compatibility field goes away.

How To Review

Start in codex-rs/core/src/guardian/review_session.rs. The important check is that both the guardian config and the child turn now use the read-only permission profile, while the remaining SandboxPolicy::ReadOnly assignment is only the compatibility field required by the current turn protocol.

Verification

  • cargo test -p codex-core guardian_review_session_config_clears_parent_developer_instructions

Stack created with Sapling. Best reviewed with ReviewStack.

@bolinfest bolinfest merged commit 68ccfdc into main May 15, 2026
46 checks passed
@bolinfest bolinfest deleted the pr22789 branch May 15, 2026 15:59
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 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