Skip to content

Conversation

@dtsong
Copy link
Owner

@dtsong dtsong commented Jan 23, 2026

Summary

  • Configurable monthly budget limits with webhook alerts
  • Alerts fire at configurable thresholds (default 80% and 100%)
  • Option to pause reviews when budget exceeded
  • Slack-formatted alert messages

Changes

  • src/pr_review_agent/metrics/budget_monitor.py — budget checking, alerts, pause logic
  • src/pr_review_agent/config.pyBudgetConfig dataclass
  • .ai-review.yaml — budget config section (disabled by default)
  • tests/test_budget_monitor.py — 20 tests

Test plan

  • 20 unit tests passing
  • Lint clean
  • Config loading tested

Closes #10

🤖 Generated with Claude Code

- BudgetConfig with monthly limit, alert thresholds, pause option
- budget_monitor.py: check spend, detect threshold crossings, send alerts
- Slack-formatted webhook alerts at configurable percentages (80%, 100%)
- Option to pause reviews when budget exceeded
- 20 tests covering all budget logic

Implements #10

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dtsong dtsong merged commit f5d9839 into main Jan 23, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase 5.3] Budget Alerts

2 participants