Route MCP elicitations through the shared approval decision path (#43447)

## What changed

- Use `decide_approval` for MCP elicitations, carrying the effective approval policy, reviewer, and synchronous-review requirement into the decision.
- Preserve unsupported form and URL elicitations for user review.
- Use `computer_use_review_required()` for review evidence, session policy, and turn metadata so model policy takes precedence over the legacy flag.
- Derive strict-review notifications from each assessment's review reason.

## Testing

Add coverage for model policy precedence, user and full-access modes, sensitive elicitations, independent code-mode and nested-tool policies, cached score reuse, and user review of unsupported elicitations.

GitOrigin-RevId: d0a9c40572dca7b3dbf876230d2162b72728084d
This commit is contained in:
jif authored and copyberry committed 2026-09-07 12:04:27 +00:00
1 parent c0b6285711
commit ce5c4133bd
12 files changed
+585 -129

No files matched your search

+3 -3
View File
@@ -500,7 +500,7 @@ impl GuardianReviewSessionManager {
parent_context
.turn()
.model_info()
.node_repl_auto_review_required,
.computer_use_review_required(),
)
.with_node_repl_policy(&session_config.node_repl_policy);
reuse_key.root_authorization_version = root_authorization_version;
@@ -613,7 +613,7 @@ impl GuardianReviewSessionManager {
.parent_context
.turn()
.model_info()
.node_repl_auto_review_required,
.computer_use_review_required(),
)
.with_node_repl_policy(&params.node_repl_policy);
next_reuse_key.root_authorization_version = root_authorization_version;
@@ -1424,7 +1424,7 @@ async fn ensure_guardian_node_repl_policy(
.parent_context
.turn()
.model_info()
.node_repl_auto_review_required
.computer_use_review_required()
|| !matches!(
&params.request,
GuardianApprovalRequest::McpToolCall { server, tool_name, .. }