Stop Calling an Agent Run “Done”: Model Delivery, Acceptance, Merge, and Deployment Separately
An agent says the task is finished. A branch exists. CI is green. The ticket moves to Done. Those four facts often arrive close together, but they are not the same fact. Treating them as one creates an avoidable ambiguity: did the agent finish an attempt, did a person accept the result, did the code land, or did users receive it? A safer workflow gives each question its own state transition,…
The task being finished often happens simultaneously with other facts, but they are distinct. Treating them as one creates ambiguity. This article proposes a workflow with separate states for each question.
Two kinds of truth exist: the work tracker knows about intent and review, while the repository and release system handle integration and deployment. Do not combine them into a single status field.
Named actors define the lifecycle: requester, task owner, runner, reviewer, repository maintainer, and release owner. Each role has a specific permission check. Higher-risk tasks require the reviewer to be different from the runner. For self-verification, explicitly record it as independent acceptance.
The main workflow remains simple: draft - open - claimed - delivered - accepted. Each transition answers one question: draft → open checks if the task is safe, open → claimed identifies the owner, claimed → delivered verifies the runner's result, delivered → accepted evaluates if the result meets the task requirements.
The state machine rejects shortcuts: a runner cannot accept their own delivery, and a repository webhook cannot move the work item to Accepted status. Deployment cannot create a missing delivery report. Every transition requires validation of both the current state and the actor.
A ticket object tracks its ID, state, owner ID, runner ID, active attempt ID, and revision number. The assertCanDeliver function ensures only claimed work can be delivered, the active attempt exists, and the runner is the one delivering. The assertCanAccept function ensures only delivered work can be accepted, the actor has reviewer permission, and the runner is not the same person as the reviewer.
Delivery reports are append-only and linked to the active attempt, not a verdict. Treating delivery as a report, not a verdict, clarifies its purpose.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.