Add orch wait command

This commit is contained in:
2026-03-19 14:02:33 +08:00
parent 1b0cd723d7
commit f1785b314f
7 changed files with 535 additions and 22 deletions
+20 -9
View File
@@ -27,9 +27,10 @@ As of now:
- `orch` now implements `run init/show`, `task add`, `dep add`, `ready`, `dispatch`, `reconcile`, `blocked`, `answer`, and `status`
- `orch` can create runs, gate tasks through dependencies, dispatch work through `inbox`, reconcile worker thread state back into task state, answer blocked tasks, and create per-attempt Git worktrees during strict dispatch
- `orch dispatch` now supports `--repo-path`, `--workspace-root`, and `--strict-worktree`, resolves committed base revisions, records workspace metadata on attempts, and writes that metadata into inbox task payloads
- automated integration tests now cover the main `orch` scheduler slice, including dependency gating, dispatch, blocked-answer flow, reconcile, strict worktree creation, and dirty-repo rejection rules
- `orch wait` now blocks on run-scoped task events and reconciles inbox state while polling so leader waits can wake on worker progress without manual sleep loops
- automated integration tests now cover the main `orch` scheduler slice, including dependency gating, dispatch, blocked-answer flow, reconcile, strict worktree creation, dirty-repo rejection rules, and wait wake/timeout behavior
This means the project now has a working `orch` core scheduler plus strict worktree-backed dispatch, and is ready for leader-side wait/retry/reassign follow-on work.
This means the project now has a working `orch` core scheduler with strict worktree-backed dispatch and leader-side wait support, and is ready for the remaining retry/reassign/cancel/cleanup controls.
## Source Of Truth
@@ -71,9 +72,9 @@ Current implementation status:
- `Milestone 3: Inbox Happy Path` is complete
- `Milestone 4: Orch Core Scheduling` is complete for the current non-worktree scheduler scope
- `Milestone 5: Strict Worktree Support` is complete for the current explicit dispatch worktree mode
- `Milestone 6: Waiting Primitives` is partially complete through `inbox wait-reply`
- `Milestone 6: Waiting Primitives` is complete
The next practical coding target is `Milestone 6: Waiting Primitives`.
The next practical coding target is the remaining leader-side scheduler controls: `retry`, `reassign`, `cancel`, and `cleanup`.
### Milestone 1: Go Skeleton
@@ -241,7 +242,6 @@ Completed so far:
Remaining:
- `orch wait`
- retry, reassign, cancel, and cleanup workflows
### Milestone 5: Strict Worktree Support
@@ -295,6 +295,17 @@ Definition of done:
- leader can block on new task events
- blocked worker can block on reply events
Status:
- completed
Completed so far:
- `orch wait`
- `inbox wait-reply`
- `orch wait` reconciles inbox state while polling and wakes on matching run-scoped `task_*` events
- CLI integration tests cover wait wake and timeout behavior
### Milestone 7: Council Review
Goal:
@@ -318,11 +329,11 @@ Definition of done:
If a new agent is taking over now, the next concrete step should be:
1. start `Milestone 6: Waiting Primitives`
2. implement `orch wait` over the run-scoped event stream
1. implement the remaining leader-side scheduler controls: `retry`, `reassign`, `cancel`, and `cleanup`
2. decide whether task retry should reuse prior task metadata or allow dispatch-time overrides per retry
3. keep the authored inbox test-plan set in `docs/tests/inbox/` synchronized if CLI behavior changes during further `orch` work
The inbox implementation and its human-readable test-plan set are already in place, and `orch` now supports strict worktree-backed dispatch, so the next meaningful project step is to give the leader a blocking wait primitive and finish the remaining scheduler controls.
The inbox implementation and its human-readable test-plan set are already in place, and `orch` now supports strict worktree-backed dispatch plus leader-side waiting, so the next meaningful project step is to finish the remaining scheduler control commands.
## Recommended Driver Choices
@@ -346,11 +357,11 @@ Completed so far:
- orch scheduler lifecycle coverage for run/task/dependency/dispatch/reconcile
- orch blocked-question and answer coverage
- orch strict worktree creation and dirty-repo policy coverage
- orch wait wake and timeout coverage
Still recommended before the codebase grows too much:
- worktree path generation test
- `orch wait` event wake test
- council tally grouping test
## Inbox Test Documentation Roadmap