Make the Guardian review timeout configurable (#56371)

## What changed

Add `auto_review.timeout_ms` to configure the overall Guardian review budget, including setup and retries. Keep the default at 90,000 milliseconds; setting it to `0` disables the review deadline while preserving cancellation, retry attempt limits, and independent transport timeouts.

Carry the configured deadline through review execution and report the configured budget in review telemetry, using zero for unlimited reviews.

## Testing

Add coverage for shared setup budgets, configured timeouts, cancellation with unlimited reviews, and retry attempt limits without a deadline.

GitOrigin-RevId: 00404e0cb2f2cfaf6de183d6e27f5e4a371942a8
This commit is contained in:
Vivian Fang
2026-10-23 06:34:00 +00:00
committed by copyberry
parent a96fa4f220
commit d6817454d7
27 changed files with 231 additions and 60 deletions
@@ -274,6 +274,7 @@ async fn new_config(
guardian_conversation_history_prompt: None,
guardian_conversation_history_max_output_tokens: None,
guardian_circuit_break_action: Default::default(),
guardian_review_timeout: Some(std::time::Duration::from_secs(90)),
include_permissions_instructions: false,
include_apps_instructions: false,
include_collaboration_mode_instructions: false,