mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +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
@@ -833,7 +833,9 @@ async fn review_guardian_mcp_elicitation(
|
||||
request.server_name.as_str(),
|
||||
elicitation_connector_id(&request.elicitation),
|
||||
);
|
||||
if !crate::guardian::routes_approval_policy_to_guardian(approval_policy, approvals_reviewer) {
|
||||
if !crate::guardian::routes_approval_policy_to_guardian(approval_policy, approvals_reviewer)
|
||||
&& !session.extension_strict_auto_review_enabled().await
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user