Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(cost): avoid cloning caps in budget estimate test

Steven Enamakel1314358e3b1e
diff --git a/crates/openhuman-core/src/platform/cost/budget_tests.rs b/crates/openhuman-core/src/platform/cost/budget_tests.rs
index 08c9c95a22..39640751ce 100644
--- a/crates/openhuman-core/src/platform/cost/budget_tests.rs
+++ b/crates/openhuman-core/src/platform/cost/budget_tests.rs
@@ -366,9 +366,14 @@ fn the_calls_own_estimate_counts() {
);
let mut big = call("m", &scope);
big.estimated_usd = 0.2;
- assert!(evaluate(&[cap.clone()], &[earlier.clone()], big, now())
- .refusal()
- .is_some());
+ assert!(evaluate(
+ std::slice::from_ref(&cap),
+ std::slice::from_ref(&earlier),
+ big,
+ now()
+ )
+ .refusal()
+ .is_some());
assert!(evaluate(&[cap], &[earlier], call("m", &scope), now())
.refusal()
.is_none());