diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-03 21:15:01 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-03 21:15:01 +0000 |
| commit | 704d007a26cac804148a51d35e129beaea382fb0 (patch) | |
| tree | 5061ca129ea033e8689d0a5bdc9d7ddbb9c09f56 /internal/task/task_test.go | |
| parent | 58f1f0909b8329b1219c5de9d0df2b4c6c93fec9 (diff) | |
Add subtask support: parent_task_id, ListSubtasks, UpdateTask
- Task struct gains ParentTaskID field
- DB schema adds parent_task_id column (additive migration)
- DB.ListSubtasks fetches children of a parent task
- DB.UpdateTask allows partial field updates (name, description, state, etc.)
- Templates table added to initial schema
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/task/task_test.go')
| -rw-r--r-- | internal/task/task_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/task/task_test.go b/internal/task/task_test.go index 96f5f6f..a8e0a84 100644 --- a/internal/task/task_test.go +++ b/internal/task/task_test.go @@ -21,6 +21,7 @@ func TestValidTransition_AllowedTransitions(t *testing.T) { {"running to cancelled", StateRunning, StateCancelled}, {"running to budget exceeded", StateRunning, StateBudgetExceeded}, {"failed to queued (retry)", StateFailed, StateQueued}, + {"timed out to queued (retry)", StateTimedOut, StateQueued}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -43,6 +44,7 @@ func TestValidTransition_DisallowedTransitions(t *testing.T) { {"completed to running", StateCompleted, StateRunning}, {"completed to queued", StateCompleted, StateQueued}, {"failed to completed", StateFailed, StateCompleted}, + {"timed out to completed", StateTimedOut, StateCompleted}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { |
