Merge 591f0ee2a0 into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2025-11-20 16:47:33 -08:00
committed by GitHub

View File

@@ -244,11 +244,16 @@ async fn tool_call_output_exceeds_limit_truncated_chars_limit() -> Result<()> {
"expected truncated shell output to be plain text"
);
assert_eq!(output.len(), 9976); // ~10k characters
let truncated_pattern = r#"(?s)^Exit code: 0\nWall time: 0 seconds\nTotal output lines: 100000\nOutput:\n.*?…\d+ chars truncated….*$"#;
let truncated_pattern = r#"(?s)^Exit code: 0\nWall time: [0-9]+(?:\.[0-9]+)? seconds\nTotal output lines: 100000\nOutput:\n.*?…\d+ chars truncated….*$"#;
assert_regex_match(truncated_pattern, &output);
let len = output.len();
assert!(
(9_900..=10_000).contains(&len),
"expected ~10k chars after truncation, got {len}"
);
Ok(())
}