Summary
PR #2109 fixed the cost budget guard so that max_daily_cents=0 means unlimited (no budget restriction), via:
if self.max_daily_cents > 0.0 && state.spent_cents >= self.max_daily_cents {
However, no unit test covers this case. The existing tests use max_daily_cents = 0.01 (budget exceeded) and max_daily_cents = 100.0 (under limit) but never max_daily_cents = 0.0 (unlimited).
Expected behavior
CostTracker::new(true, 0.0).check_budget() should always return Ok(()) regardless of how much has been spent.
Proposed test
#[test]
fn check_budget_unlimited_when_max_daily_cents_is_zero() {
let tracker = CostTracker::new(true, 0.0);
tracker.record_usage("claude-opus-4-20250514", 100_000, 100_000);
assert!(tracker.check_budget().is_ok());
}
Severity: LOW — the fix is correct. This is purely a coverage gap.