Commit Graph

1 Commits

Author SHA1 Message Date
Alexander Whitestone
7f2b271225 feat: token budget tracker with real-time dashboard (#622)
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 20s
Smoke Test / smoke (pull_request) Failing after 23s
Validate Config / YAML Lint (pull_request) Failing after 20s
Validate Config / JSON Validate (pull_request) Successful in 31s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 1m8s
Validate Config / Shell Script Lint (pull_request) Failing after 33s
Validate Config / Cron Syntax Check (pull_request) Successful in 9s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 11s
Validate Config / Playbook Schema Validation (pull_request) Successful in 33s
PR Checklist / pr-checklist (pull_request) Failing after 7m20s
Architecture Lint / Lint Repository (pull_request) Has been cancelled
Validate Config / Python Test Suite (pull_request) Has been cancelled
scripts/token_tracker.py:
  SQLite store for token usage per pipeline/worker/hour
  CLI dashboard: --watch (live), --summary (daily)
  Budget alerts at 50%, 80%, 100% thresholds
  Progress bars + ETA estimation
  --record pipeline worker tokens
  --budget pipeline tokens
  --alerts (check only)
  Default budgets: knowledge-mine 200M, training-factory 215M,
    playground 16M, adversary 17M (448M total)

tests/test_token_tracker.py: 23 tests
  record_usage, get_usage_since, get_worker_usage
  format_tokens (B/M/K formatting)
  progress_bar (empty/half/full/over)
  estimate_eta (done/hours/minutes/no data)
  check_alerts (no alerts, 50%, 80%, 100%, over-budget)
2026-04-15 21:06:40 -04:00