From 36c686b8282e2ec2a93b907473cb30c0e168581a Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 4 May 2026 10:57:28 -0400 Subject: [PATCH] test(server): avoid float equality in usage scenario Use a tolerance-based runtime assertion so workspace clippy can run with float_cmp denied. --- lib/crates/fabro-server/tests/it/scenario/usage.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/crates/fabro-server/tests/it/scenario/usage.rs b/lib/crates/fabro-server/tests/it/scenario/usage.rs index 976e0bf69..264124bcf 100644 --- a/lib/crates/fabro-server/tests/it/scenario/usage.rs +++ b/lib/crates/fabro-server/tests/it/scenario/usage.rs @@ -150,5 +150,8 @@ fn assert_non_llm_billing(billing: &serde_json::Value, expected_stage_ids: &[&st let total_runtime_secs = billing["totals"]["runtime_secs"] .as_f64() .expect("totals should include runtime_secs"); - assert_eq!(total_runtime_secs, runtime_secs); + assert!( + (total_runtime_secs - runtime_secs).abs() < f64::EPSILON, + "total runtime {total_runtime_secs} should equal summed stage runtime {runtime_secs}" + ); }