Skip to content

Wire Run orchestrator for sequential Ticket Iterations#23

Merged
maxBRT merged 1 commit into
mainfrom
wrap/run-orchestrator
Jul 19, 2026
Merged

Wire Run orchestrator for sequential Ticket Iterations#23
maxBRT merged 1 commit into
mainfrom
wrap/run-orchestrator

Conversation

@maxBRT

@maxBRT maxBRT commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add run.Orchestrator that drives the Run loop: empty Ready for Agent queue exits cleanly with no branch work; otherwise prepare the Run branch and process Tickets one Iteration each (Claim → Implement → Review → Done) up to max iterations.
  • Implement must produce commit(s) since a restore point (gitops.HasCommitsSince); Review may be commitless; Final is a stop-point stub (full Final/PR and Abort polish are follow-up Tickets).
  • Wire the orchestrator into cmd/ship and cover the highest test seam with fake Ticket + Agent ports over a temp git repo. Also includes the built-in phase prompts commits not yet on main (prerequisite for the loop).

Closes #10

Test plan

  • go test ./...
  • Confirm empty-queue path: message, exit 0, no branch checkout
  • Confirm one Iteration path: Claim → Implement (with commit) → Review → Done
  • Confirm max-iterations stop leaves remaining Ready for Agent Tickets and reports partial outcome
  • Confirm Implement without commits fails the Run

Made with Cursor

Add run.Orchestrator to drive the Run loop over the ticket, agent, and
gitops ports. An empty Ready for Agent queue reports and exits without
touching the branch; otherwise the branch is prepared and Tickets are
processed one Iteration each (Claim, Implement Phase, Review Phase, Done)
up to the max-iterations limit, stopping when the queue drains or the
limit is hit.

The Implement Phase must produce commit(s) since a recorded restore
point (new gitops HasCommitsSince); the Review Phase may be commitless.
A failed Phase or missing side effect stops the Run. The Final Phase is
a clean stop-point stub, wired in a later Ticket.

Wire the orchestrator into cmd/ship, replacing the standalone branch
preparation. Cover the loop with fake ticket and agent ports over a
temp git repo.
@maxBRT
maxBRT merged commit 89e7e2d into main Jul 19, 2026
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.

Run loop: sequential Claim, Implement, Review, Done

1 participant