Skip to content

Fix dispatch guard regressions and safe ticket parsing - #55

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

Fix dispatch guard regressions and safe ticket parsing#55
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-bugs-b432

Conversation

@cursor

@cursor cursor Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve in-memory budget/max-turn exhaustion guards across poll ticks so exhausted active tickets cannot redispatch in a loop when no tracker transition is configured or persistence fails.
  • Carry retry-queued issue snapshots so touched-file conflict checks also block overlaps during continuation/retry delays.
  • Make file-ticket front-matter recovery parse-only on read paths to avoid read-side atomic rewrites racing with agent/operator edits.

Type

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

Verification

Paste the commands you ran and the result.

/tmp/symphony-validate-venv/bin/python -m pytest tests/test_orchestrator_dispatch.py::test_max_total_turns_exhaustion_survives_next_tick_prune tests/test_orchestrator_dispatch.py::test_on_worker_exit_hit_max_turns_survives_next_tick_prune tests/test_orchestrator_dispatch.py::test_conflict_pre_check_blocks_retry_queued_overlap tests/test_tracker_file.py::test_parse_ticket_file_auto_heals_markdown_inside_front_matter -q
# 4 passed

/tmp/symphony-validate-venv/bin/python -m pytest tests/test_orchestrator_dispatch.py tests/test_tracker_file.py -q
# 120 passed

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

For workflow/service/board changes:

PATH="/tmp/symphony-test-bin:$PATH" /tmp/symphony-validate-venv/bin/symphony doctor ./WORKFLOW.md
# FAIL: agent.kind=claude ('claude' not on PATH)
# FAIL: tracker.board_root (/workspace/kanban does not exist)
# other checks PASS

Risk Notes

  • _turn_budget_exhausted remains process-local and requires an operator/service reset or configured terminal transition for recovery; this matches the existing safety guard and prevents unbounded redispatch loops.
  • The front-matter recovery still lets reads parse healable tickets but no longer persists the healed shape unless a write path later updates the ticket.

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