Execution Lifecycle
How executions and attempts become authoritative work records while workers process chunk cases.
Notes
- Executions are inserted or upserted only while the owning run is
running; workers use a shared run-state guard so chunks for the same run can proceed concurrently. - Within a claimed chunk, workers can process multiple cases concurrently; each case still receives an authoritative attempt id and attempt number.
- A new worker attempt marks any previous running attempt
stale. - Terminal transitions require the execution's current attempt id and attempt number to match the worker's transition.
- Completed executions require an aggregate row; failed transitions upsert an error aggregate.