diff options
| author | Claude <noreply@anthropic.com> | 2026-05-26 20:31:24 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-05-26 20:31:24 +0000 |
| commit | 32715355fe2eed321df4f7083dfe580d35f8a62a (patch) | |
| tree | 76c3fd6a45646a2f6bdca95e46f66a00d6f08e59 /docs | |
| parent | 39f74dbbc7adca0e2058112408bb99694deefcaf (diff) | |
feat(executor): budget-gate the dispatcher — reroute to local or block (Phase 6)
The pool now consults a BudgetGate before taking an agent slot. If running on
the chosen paid provider could breach its rolling window (estimated by the
task's max_budget_usd), it reroutes to the free local runner when one is
registered; otherwise it stops before running and marks the task
BUDGET_EXCEEDED. serve.go builds a budget.Accountant from [budget] config and
wires it into the pool (only when limits are configured).
Allows the QUEUED → BUDGET_EXCEEDED transition, since the gate blocks a queued
task before it ever reaches RUNNING. Covered by pool tests for both the block
and reroute paths against a fake gate.
https://claude.ai/code/session_01SESwn7kQ7oP62trWw6pc39
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
