Runs keep the protections the task lifecycle had #2036
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#2036
Reference in new issue
Block a user
The old task lifecycle (
internal/taskstate,internal/daemon/park.go, the State Store's guarded transitions) handled cases the single binary's run engine (modules/runs) doesn't. Cross-checked 2026-11-16 against the code and the fix history; MIGRATION.md row "Task lifecycle and states".Missing for every run:
taskstate.PlanRecovery,e75d5c8ad). A run whose step crashes the process is reclaimed after every lease expiry, forever:attemptscounts claims and nothing caps it.internal/webui/task_recovery.go). A run can only fail.taskstate.TransientRetryDue,860b2c85e). Runs retry only model calls, inside a step.RetryTask,resumeResults). The runs API has no retry.daemon/running.go,7d6f22d22). A run checks for cancellation only between steps, so a long agent step runs to its end, and a cancelled run can't be resumed.taskstate.Actions,5734e194c).bcbd09fc0). A run has no ask-to-continue path.StalestLoop). Readiness checks the database and connectors, not that workers are moving (#2010).Done when: each of the nine either works for runs, with a test where it touches a listed seam, or has a recorded decision to drop it.
Maintainer requirement: each protection here must be available to whoever writes the workflow, Archie or a person, as a property or parameter of the document, with defaults that match today's behaviour. Today's vocabulary already carried several of them (
retrywith attempts and backoff,on_failurepark or continue,workflow.finishwith a parked or waiting-for-approval status, retry from a top-level step), and #2037 brings that vocabulary onto the durable engine. The rest (the restart cap, park classes and blockers, transient backoff, ask to continue at the budget) get document properties alongside them.