Complete Task
Mark a task as done (or refused) from a worker terminal payload.
Structured payloads (body.payload or a JSON object embedded in result_summary) are validated against the worker completion contract (#2244): an invalid payload is a typed contract_violation failure carrying the schema error path, and a validated refusal lands the task in the terminal REFUSED state instead of DONE. Legacy prose summaries are accepted unchanged.
If result_summary is empty the task is auto-transitioned to FAILED with reason='completion missing summary' and a 422 is returned with the failed task payload so the client knows the slot was released.
post/tasks/{task_id}/complete
Path parameters
task_idstring required
Request body
Response
Successful Response