diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-10 17:16:49 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-10 17:16:49 +0000 |
| commit | 3226af322cb7c7f7a93a91e98651538b1bec54ee (patch) | |
| tree | 2e1efc4304c97f60ee36e669eb8357145efba691 /internal/task/task_test.go | |
| parent | 65c7638bbb5819b9997cb6cb1b0fb54f3361347f (diff) | |
task: promote validTransitions to package-level var; fix ADR
Hoists the map out of ValidTransition so it's not reallocated on every
call. Adds missing CANCELLED→QUEUED and BUDGET_EXCEEDED→QUEUED entries
to the ADR transition table to match the implemented state machine.
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/task/task_test.go b/internal/task/task_test.go index 637baf5..9873084 100644 --- a/internal/task/task_test.go +++ b/internal/task/task_test.go @@ -26,6 +26,7 @@ func TestValidTransition_AllowedTransitions(t *testing.T) { {"blocked to queued (answer resume)", StateBlocked, StateQueued}, {"blocked to ready (parent unblocked by subtasks)", StateBlocked, StateReady}, {"budget exceeded to queued (retry)", StateBudgetExceeded, StateQueued}, + {"cancelled to queued (restart)", StateCancelled, StateQueued}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { |
