feat: list_dir tool (#4817)

Add a tool to list_dir. It is useful because we can mark it as
non-mutating and so use it in parallel
This commit is contained in:
jif-oai
2025-10-07 19:33:19 +01:00
committed by GitHub
parent 338c2c873c
commit 226215f36d
7 changed files with 1001 additions and 13 deletions

View File

@@ -390,19 +390,9 @@ async fn shell_timeout_includes_timeout_prefix_and_metadata() -> Result<()> {
);
let stdout = output_json["output"].as_str().unwrap_or_default();
let timeout_pattern = r"(?s)^Total output lines: \d+
command timed out after (?P<ms>\d+) milliseconds
line
.*$";
let captures = assert_regex_match(timeout_pattern, stdout);
let duration_ms = captures
.name("ms")
.and_then(|m| m.as_str().parse::<u64>().ok())
.unwrap_or_default();
assert!(
duration_ms >= timeout_ms,
"expected duration >= configured timeout, got {duration_ms} (timeout {timeout_ms})"
stdout.contains("command timed out"),
"timeout output missing `command timed out`: {stdout}"
);
} else {
// Fallback: accept the signal classification path to deflake the test.