diff --git a/crates/bashkit/tests/large_tree_stress_tests.rs b/crates/bashkit/tests/large_tree_stress_tests.rs index 7dd046f0e..226dfcdb6 100644 --- a/crates/bashkit/tests/large_tree_stress_tests.rs +++ b/crates/bashkit/tests/large_tree_stress_tests.rs @@ -425,6 +425,12 @@ async fn rg_stops_at_the_input_budget_on_a_huge_tree() { async fn rg_within_budget_holds_bounded_memory() { let _serial = SERIAL.lock().await; let (fs, mut bash) = setup().await; + // The first rg in the process builds one-time state (4 MiB locally, more + // on CI, where it pushed this past BOUNDED_PEAK). It is not per-file + // memory, so pay it on a small subtree first and measure only the walk. + bash.exec("rg -l nomatch /big/d0 > /dev/null") + .await + .unwrap(); for cmd in [ "rg -l nomatch /big", "rg -c nomatch /big/d1 /big/d0",