diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-26 09:36:30 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-26 09:36:30 +0000 |
| commit | 759396855a967a3d509498cc55faa3b4d8cadfba (patch) | |
| tree | 339845073da2bb6b1dc5765932570d5716773f61 /internal/task/task.go | |
| parent | 3f9843b34d7ae9df2dd9c69427ecab45744b97e9 (diff) | |
When a story is approved with pre-created subtasks, parent tasks are
QUEUED but never run. Their subtasks complete, but:
- maybeUnblockParent only handled BLOCKED parents, not QUEUED ones
- checkStoryCompletion required ALL tasks (incl. subtasks) to be done
Fixes:
- maybeUnblockParent now also promotes QUEUED parents to READY when all
subtasks are COMPLETED
- checkStoryCompletion only checks top-level tasks (parent_task_id="")
- RecoverStaleBlocked now also scans QUEUED parents on startup and
triggers checkStoryCompletion if it promotes them
- Add QUEUED→READY to valid state transitions (subtask delegation path)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/task/task.go')
| -rw-r--r-- | internal/task/task.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/task/task.go b/internal/task/task.go index ba87360..0d1026f 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -128,7 +128,7 @@ type BatchFile struct { // BLOCKED may advance to READY when all subtasks complete, or back to QUEUED on user answer. var validTransitions = map[State]map[State]bool{ StatePending: {StateQueued: true, StateCancelled: true}, - StateQueued: {StateRunning: true, StateCancelled: true}, + StateQueued: {StateRunning: true, StateCancelled: true, StateReady: true}, // READY: parent task completed via subtask delegation StateRunning: {StateReady: true, StateCompleted: true, StateFailed: true, StateTimedOut: true, StateCancelled: true, StateBudgetExceeded: true, StateBlocked: true}, StateReady: {StateCompleted: true, StatePending: true}, StateFailed: {StateQueued: true}, // retry |
