mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Let extensions resolve approval reviews before Guardian (#38592)
## What changed - Give approval review contributors the first opportunity to resolve an action when automatic review is not required for the model. - Return an extension's decision directly and fall back to Guardian when no extension claims the review. - Update Guardian V2 to approve actions below its risk threshold through the review contributor API, and remove the extension approval-policy API. ## Testing - Verify that an extension approval bypasses both the Guardian model call and the user approval prompt. - Cover Guardian V2 review decisions for low-risk, high-risk, and disabled threads. GitOrigin-RevId: 5be56941143aff6f358b75b5f8101b7c047147ae
This commit is contained in:
1 parent
5bc8da6d78
commit
23094236ac
12 files changed
+174
-149
No files matched your search
@@ -282,8 +282,7 @@ impl<'a> ToolRuntime<UnifiedExecRequest, UnifiedExecAttempt> for UnifiedExecRunt
|
||||
let mut launch = network.remote_launch_config().await.map_err(|err| {
|
||||
ToolError::Codex(CodexErr::Io(io::Error::other(err.to_string())))
|
||||
})?;
|
||||
if (routes_approval_to_guardian(&ctx.step_context.turn)
|
||||
|| ctx.session.extension_strict_auto_review_enabled().await)
|
||||
if routes_approval_to_guardian(&ctx.step_context.turn)
|
||||
&& network.remote_policy_decider().is_some()
|
||||
{
|
||||
let timeout = ctx
|
||||
|
||||
Reference in new issue
Block a user