Reduce Guardian V2's default tool-call lag (#41158)

## What changed

- Lower the default `max_tool_call_lag` from three tool calls to two, causing
  older async risk scores to fall back to strict review sooner.
- Update the async scorer integration test to verify score expiration using the
  default lag instead of a test-specific override.

GitOrigin-RevId: a07cae3634428a1e64745674eced92fb770f441a
This commit is contained in:
jif
2026-08-27 14:35:06 +00:00
committed by copyberry
parent 4f2a1d8666
commit 453a9bcc69
2 changed files with 2 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ const MIN_MODEL_CONTEXT_ITEM_TOKENS: usize = 100;
const MAX_MODEL_CONTEXT_ITEM_TOKENS: usize = 100_000;
const DEFAULT_REVIEW_THRESHOLD: f64 = 0.5;
const LEGACY_REVIEW_THRESHOLD: f64 = 0.8;
const DEFAULT_MAX_TOOL_CALL_LAG: usize = 3;
const DEFAULT_MAX_TOOL_CALL_LAG: usize = 2;
pub(crate) const DEFAULT_CLASSIFIER_INSTRUCTIONS: &str = include_str!("classifier_instructions.md");
pub(crate) const CLASSIFICATION_OUTPUT_INSTRUCTIONS: &str = "Your first output token is the entire classification: `high` for high risk or `low` for low risk. Output that token immediately and nothing else.";

View File

@@ -1252,7 +1252,7 @@ max_classifier_instruction_tokens = 256
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn contributor_uses_configured_prompt_effort_threshold_and_transcript() -> Result<()> {
async fn contributor_uses_configured_prompt_and_expires_scores_at_default_lag() -> Result<()> {
skip_if_no_network!(Ok(()));
let configuration = r#"
@@ -1260,7 +1260,6 @@ async fn contributor_uses_configured_prompt_effort_threshold_and_transcript() ->
enabled = true
classifier_instructions = "Use the experimental security classification prompt."
review_threshold = 0.60
max_tool_call_lag = 2
reasoning_effort = "minimal"
max_action_tokens = 128
max_classifier_instruction_tokens = 100000