mirror of
https://github.com/openai/codex.git
synced 2026-11-05 16:29:31 +00:00
Align Guardian reviews with session configuration (#32747)
## What changed
- Include permission instructions in Guardian review requests and let the review model use its configured tool mode and standard tool plan instead of a Guardian-specific direct-tool override.
- Refine the Guardian policy for tenant policy precedence, authorization scoring, prompt-injection handling, read-only investigation, and post-denial user approval.
- Simplify low-risk allow responses to `{"outcome":"allow"}` regardless of authorization scoring.
## Testing
- Update Guardian request-layout snapshots to cover the permission instructions included in initial and follow-up reviews.
GitOrigin-RevId: eb83571ef61f7b4e854c12e13e7163c6fab43f00
This commit is contained in:
1 parent
769a5de257
commit
ea0fd84d94
8 files changed
+37
-97
No files matched your search
@@ -62,10 +62,6 @@ pub(crate) fn tool_user_shell_type(
|
||||
}
|
||||
|
||||
fn effective_tool_mode(turn_context: &TurnContext) -> ToolMode {
|
||||
if crate::guardian::is_guardian_reviewer_source(&turn_context.session_source) {
|
||||
return ToolMode::Direct;
|
||||
}
|
||||
|
||||
turn_context.model_info.tool_mode.unwrap_or_else(|| {
|
||||
if turn_context.config.features.enabled(Feature::CodeModeOnly) {
|
||||
ToolMode::CodeModeOnly
|
||||
|
||||
Reference in new issue
Block a user