Skip to content

test(cost): add unit test for max_daily_cents=0 unlimited budget#2111

Merged
bug-ops merged 1 commit intomainfrom
issue-2110-cost-test
Mar 22, 2026
Merged

test(cost): add unit test for max_daily_cents=0 unlimited budget#2111
bug-ops merged 1 commit intomainfrom
issue-2110-cost-test

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 22, 2026

Summary

  • Adds check_budget_unlimited_when_max_daily_cents_is_zero to crates/zeph-core/src/cost.rs
  • Covers the branch if self.max_daily_cents > 0.0 && ... — confirms that max_daily_cents = 0.0 means unlimited regardless of accumulated spend
  • Updates CHANGELOG.md [Unreleased] Testing section

Test plan

  • cargo nextest run -p zeph-core -E 'test(check_budget_unlimited)' — passes
  • cargo +nightly fmt --check — OK
  • cargo clippy --workspace -- -D warnings — OK
  • cargo nextest run --workspace --lib --bins — 5915 passed

Closes #2110

…vior

Adds check_budget_unlimited_when_max_daily_cents_is_zero to cover the
case where max_daily_cents=0 means unlimited — the fix in #2109 was
correct but lacked a test for this code path.

Closes #2110
@bug-ops bug-ops enabled auto-merge (squash) March 22, 2026 02:07
@github-actions github-actions bot added tests Test-related changes size/XS Extra small PR (1-10 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate and removed tests Test-related changes size/XS Extra small PR (1-10 lines) labels Mar 22, 2026
@bug-ops bug-ops merged commit d2ad612 into main Mar 22, 2026
25 checks passed
@bug-ops bug-ops deleted the issue-2110-cost-test branch March 22, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(cost): add unit test for max_daily_cents=0 unlimited budget behavior

1 participant