Skip to content

Fix budget exhaustion re-dispatch loop - #54

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-bugs-54ef
Draft

Fix budget exhaustion re-dispatch loop#54
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-bugs-54ef

Conversation

@cursor

@cursor cursor Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve _turn_budget_exhausted across G1 stale-claim pruning so budget-exhausted active tickets are not re-dispatched on the next poll tick.
  • Add a regression test covering the next-tick prune path after max_total_turns exhaustion with no budget_exhausted_state configured.

Type

  • Bug fix
  • Feature
  • Docs
  • Tests or tooling
  • Refactor

Verification

/tmp/symphony-validate-venv/bin/python -m pytest tests/test_orchestrator_dispatch.py -q
# 87 passed in 1.55s

PATH="/tmp/symphony-test-bin:$PATH" /tmp/symphony-validate-venv/bin/python -m pytest -q
# 798 passed, 5 skipped, 2 warnings in 26.94s

PATH="/tmp/symphony-test-bin:$PATH" /tmp/symphony-validate-venv/bin/symphony doctor ./WORKFLOW.md
# FAIL: agent.kind=claude missing from PATH in this container
# FAIL: tracker.board_root /workspace/kanban does not exist in this checkout

Risk Notes

  • Minimal in-memory guard change: stale _claimed entries still prune, but _turn_budget_exhausted remains sticky for the orchestrator process as intended by the budget guard.
  • symphony doctor failures are environment/check-out prerequisites unrelated to this patch.

Checklist

  • This PR targets dev.
  • I added or updated tests for behavior changes.
  • I updated docs/examples for user-facing changes.
  • I did not commit secrets, logs, local run state, virtualenvs, or generated artifacts.
  • CI is green or I explained any expected failure above.
Open in Web View Automation 

Co-authored-by: Agentic-Worker <cskwork@users.noreply.github.com>
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.

1 participant