wangdl 4713758344
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 45s
test: add unit tests for platform-budget.service (API-AI-065)
- 15 tests covering all 6 public methods
- checkPlatformBudget: healthy, auto-create, circuit-open, half-open limit,
  half-open pass, token exceeded, cost exceeded
- recordSuccess: upsert with reset circuit to closed
- recordFailure: increment failedCount, open circuit at threshold, first-day create
- Admin: transitionToHalfOpen / closeCircuit
- getBudgetState: state + limits, auto-create fallback

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 12:15:20 +08:00
..