From b4d5c3fa0ba29f22e8836daaebd9607f38664a97 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 23 Nov 2026 05:28:40 -0600 Subject: [PATCH] fix(fleet-queue): make sweep-wiring source assertion whitespace-insensitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sweep_wiring_runs_the_detective_beside_the_recheckers flattened core.rs by joining whitespace-split tokens with single spaces, then asserted the closed-bound call appears as `run_closed_bound_checks( t, ...` — a shape that only holds when the call is formatted across multiple lines. The call in core.rs sits on one line, so the test failed on main while the wiring itself is correct. Strip all whitespace from both the source and the needle so the assertion pins the call's shape, not the formatter's line-breaking. Closes #13215 --- .../crates/fleet-queue/src/turso_queue/closed_bound.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/fleet/crates/fleet-queue/src/turso_queue/closed_bound.rs b/pkgs/fleet/crates/fleet-queue/src/turso_queue/closed_bound.rs index 26b85cc7bb..1665328094 100644 --- a/pkgs/fleet/crates/fleet-queue/src/turso_queue/closed_bound.rs +++ b/pkgs/fleet/crates/fleet-queue/src/turso_queue/closed_bound.rs @@ -818,8 +818,12 @@ mod tests { // and a cycle that found missing records lands in the // sweep event. let src = include_str!("core.rs"); - let flat = src.split_whitespace().collect::>().join(" "); - assert!(flat.contains("run_closed_bound_checks( t, req_i64(req, \"closed_bound_limit\")")); + // Whitespace-insensitive: strip every whitespace character from + // both sides so the assertion pins the call's shape, not the + // formatter's line-breaking (the call sits on one line today and + // was multi-line when this test was written). + let squashed: String = src.chars().filter(|c| !c.is_whitespace()).collect(); + assert!(squashed.contains("run_closed_bound_checks(t,req_i64(req,\"closed_bound_limit\")")); assert!(src.contains("req_bool(req, \"closed_bound\")")); assert!(src.contains("out[\"closed_bound\"]")); assert!(src.contains("closed_bound_missing > 0"));