Conversation
viyatb-oai
approved these changes
Jun 2, 2026
Collaborator
There was a problem hiding this comment.
Looks good. permission_profile is authoritative in SessionConfiguration::apply, so the legacy SandboxPolicy override is redundant.
Optional follow-up: is it beneficial to add an integration test where the guardian reviewer attempts a write and verify that the read-only PermissionProfile blocks it?
Collaborator
Author
Will investigate in a subsequent PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Guardian review turns already submit a read-only
PermissionProfile, which is the permissions model the runtime should honor. Passing the equivalent legacySandboxPolicythroughThreadSettingsOverrideskeeps two representations of the same read-only constraint alive on this path and makes the guardian flow depend on compatibility plumbing that is being phased out.What Changed
sandbox_policytoNonewhen the guardian review session submits its childOp::UserInput.permission_profile: Some(PermissionProfile::read_only())andapproval_policy: Some(AskForApproval::Never), so the guardian review remains read-only and cannot request approvals.SandboxPolicyimport and redundant comment fromcodex-rs/core/src/guardian/review_session.rs.Verification
Not run locally; this is a narrow cleanup of redundant thread-settings override state.