Skip to content

Add budget gates for dispatch cost ceilings#92

Merged
corylanou merged 1 commit into
mainfrom
symphony/digitaldrywood_symphony_88
May 22, 2026
Merged

Add budget gates for dispatch cost ceilings#92
corylanou merged 1 commit into
mainfrom
symphony/digitaldrywood_symphony_88

Conversation

@corylanou
Copy link
Copy Markdown

Context

Fixes #88. Symphony needs a pre-dispatch budget gate so runaway agents cannot spend past configured daily or per-issue ceilings.

TL;DR

Add configurable dispatch budget gates and a dashboard spend tile.

Summary

  • Add agent.budget config, model pricing YAML, and budget refusal helpers.
  • Add SQLite spend queries and rolling p50 token estimates from completed sessions.
  • Refuse dispatch before claim, post one cooldown-limited comment, and keep issue state unchanged.
  • Show today's spend, a seven-day sparkline, and per-issue budget markers in the dashboard.

Alternatives

  • Mid-run cancellation remains out of scope because it needs safe Codex session teardown.

Test Plan

  • make -C elixir all
  • mix test --cover
  • Focused budget, stats, dashboard API, and orchestrator budget tests

Summary:
- Add dispatch-time budget checks for daily and per-issue USD caps.
- Add SQLite spend readers, shipped model pricing, and dashboard spend UI.
- Cover budget gates, orchestrator refusal cooldowns, and spend helpers.

Rationale:
- Refusing before claim prevents runaway token spend without changing
  in-flight Codex session handling.
- Missing model pricing logs and under-gates so config drift does not block
  dispatch unexpectedly.

Tests:
- make all

Co-authored-by: Codex <codex@openai.com>
@corylanou corylanou force-pushed the symphony/digitaldrywood_symphony_88 branch from 4606c8b to 40e0dad Compare May 22, 2026 14:29
@corylanou corylanou merged commit 6dd15cf into main May 22, 2026
3 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.

feat(budget): pre-dispatch token-cost ceiling per issue and per day

1 participant