Four ways a task ends
Four cards, one per terminal state from the kit. Completed: test-runner task 3d8f7801, chosen by the agent because the suite ran, status message 1 failed, 11 passed, with test-log.txt and summary.json. Failed: task 8ae21dcb, chosen by the agent because commit deadbee does not exist, no artifacts. Canceled: task f22ed7af, chosen by the client with CancelTask, two log chunks kept. Rejected: deployer task 23cf3710, refused by policy, no artifacts. Below, a message to the canceled task gets UnsupportedOperationError and a second cancel gets TaskNotCancelableError.
FOUR TERMINAL STATES FROM THE KIT
TASK_STATE_COMPLETED
test-runner, task 3d8f7801
chosen by the agent: the suite ran
status message
1 failed, 11 passed
artifacts: test-log.txt, summary.json
TASK_STATE_FAILED
test-runner, task 8ae21dcb
chosen by the agent: no such commit
status message
Commit deadbee does not exist in
payments-api.
artifacts: none
TASK_STATE_CANCELED
test-runner, task f22ed7af
chosen by the client: CancelTask
status message
Canceled at the client's request.
artifacts: test-log.txt, two chunks
TASK_STATE_REJECTED
deployer, task 23cf3710
chosen by the agent: its policy
status message
Production deploys are outside this agent's
policy. Use the release train.
artifacts: none
AFTER THE END
calls to the canceled task f22ed7af, from 10-cancel.http
SendMessage, taskId f22ed7af
UnsupportedOperationError, -32004
CancelTask, a second time
TaskNotCancelableError, -32002