feat(tasks): allow rejecting a task from any non-terminal state
An operator could only reject work that was waiting on a human decision, so a task sitting in review (PR open) or running had no way to be refused even when it was clearly dangerous. - expose reject in taskstate.Actions for every non-terminal state (queued, running, waiting_human, parked, pr_open) so both the dashboard and the chat tool surface it; terminal states still only expose archive - make rejectTask transition from the task's actual status to closed_wont_do and interrupt running execution first, so nothing keeps working against a task being closed out - keep the distinct stop (recoverable → parked) semantics; reject is the terminal escape hatch - update the lifecycle contract tests to the new intent
This commit is contained in:
1 parent
8ef6980fe6
commit
96c82cd4e0
6 files changed
+40
-25
No files matched your search
@@ -121,8 +121,8 @@ func TestChatTaskActorAdapterRefusesDisallowedStateAction(t *testing.T) {
|
||||
attemptAction: taskstate.ActionApprove,
|
||||
},
|
||||
{
|
||||
name: "cannot reject queued task",
|
||||
initialStatus: store.StatusQueued,
|
||||
name: "cannot reject merged task",
|
||||
initialStatus: store.StatusMerged,
|
||||
attemptAction: taskstate.ActionReject,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user