mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Require automatic review for high-risk Guardian v2 actions (#38569)
## What changed - Add a thread-scoped extension API for requesting automatic review, resolving multiple contributors to the strongest requirement. - Have Guardian v2 request automatic review when it is enabled and the latest `action_risk` score is at least `0.8`. - Honor extension review requirements across tool approvals, MCP elicitation, and remote execution while preserving host configuration and managed-policy constraints. ## Testing - Cover contributor registration and requirement resolution. - Verify Guardian v2 requests review at the threshold, returns to the default below it, and does not affect threads where the extension is disabled. - Exercise extension-requested strict review with a remote model override. GitOrigin-RevId: 6329fc23585d5cc7173c39bb9952c3109ec3884b
This commit is contained in:
1 parent
d40dfcc3c7
commit
1c4f42863c
11 files changed
+187
-15
No files matched your search
@@ -282,7 +282,8 @@ 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)
|
||||
if (routes_approval_to_guardian(&ctx.step_context.turn)
|
||||
|| ctx.session.extension_strict_auto_review_enabled().await)
|
||||
&& network.remote_policy_decider().is_some()
|
||||
{
|
||||
let timeout = ctx
|
||||
|
||||
Reference in new issue
Block a user