Skip to content

Add a waiting state for work handed off to external review#83

Merged
MJohnson459 merged 1 commit into
mainfrom
worktree-waiting-state
Jul 16, 2026
Merged

Add a waiting state for work handed off to external review#83
MJohnson459 merged 1 commit into
mainfrom
worktree-waiting-state

Conversation

@MJohnson459

Copy link
Copy Markdown
Contributor

Add a waiting task state for work handed off to external review (DESIGN.md §6).

What changed

Adds a new waiting state: work blocked on an external party (a PR awaiting someone else's review or merge) that asks nothing of the operator. It earns no state bonus and is excluded from the queue and voro next like parked, surfacing only in the task browser and state counts.

  • State machine (voro-core): new TaskState::Waiting; new Action::HandOff (review → waiting) and Action::Reclaim (waiting → review); Accept/RejectWork/Abandon now also apply from waiting. waiting keeps its session open like review (so a change-requested reject reuses the same agent session), and reconcile leaves it untouched; Accept/Abandon close the session exactly as from review.
  • Scoring (scheduler.rs): waiting earns no state bonus and is excluded from candidates(); new StateCounts.waiting field.
  • Migration 0010: widens the tasks.state CHECK to admit waiting (additive table rebuild, no data changes).
  • CLI: voro wait <id> and voro reclaim <id>; accept/reject/abandon/stats help and rendering updated to include waiting.
  • TUI: w key hands a selected review row off to waiting (with key-line hint and status-line refusal for non-review rows); browser ordering, state counts, detail-pane session lines, and the transition menu all handle waiting.
  • Docs: DESIGN.md §6 (state row + transitions + deliberately-deferred generalisation and return-path automation), §7 (scoring exclusion), §8 (session lifecycle) updated in the same change.

Verification

cargo test --workspace (190 + 202 tests) and cargo clippy --workspace --all-targets -- -D warnings clean; cargo fmt --all applied. New tests cover every new transition (legal and refused), the review→wait→reject-with-feedback same-session continuation, the scheduler proving waiting never surfaces in the queue and earns no bonus, and migration 0010 upgrading an existing pre-0010 database. Also ran the built binary end-to-end through wait/reclaim/accept and confirmed stats/next/list behave.

Branch: worktree-waiting-state (committed locally; not pushed — bg session). Run voro pr 132 to open the PR.

Once the operator runs `pr` and the PR is up awaiting someone else's
review or merge, the task sat in `review` — an attention state with a
state bonus — permanently occupying a queue row while there was nothing
the operator could do. Add a `waiting` task state (DESIGN.md §6) for
work blocked on an external party: it earns no state bonus, is excluded
from the queue and `next` like `parked`, and appears only in the task
browser and state counts.

Entry is `review → waiting` via a new `HandOff` action (`voro wait`,
TUI `w` on review rows). Exits are all manual: `Accept → done`,
`RejectWork(feedback) → running` (reusing the feedback-continuation
path), `Reclaim → review` ("my move again"), and `Abandon → rejected`.
Like `review`, `waiting` keeps its session open so a change-requested
reject reuses the same agent session; `Accept`/`Abandon` close it
exactly as from `review`, and reconcile leaves it untouched.

Migration 0010 widens the `tasks.state` CHECK. Return-path automation
(polling `gh pr view`) and waiting-before-work-starts are deferred and
noted in §6. Updates DESIGN.md §6/§7/§8.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEiuR8dCQQhk3nwmu5HscX
@MJohnson459
MJohnson459 merged commit 408ceb6 into main Jul 16, 2026
6 checks passed
@MJohnson459
MJohnson459 deleted the worktree-waiting-state branch July 16, 2026 09:40
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