Runlane
ReferenceVocabulary

Run Lifecycle

Stable run states, replay events, sources, and actor types.

Run lifecycle vocabulary appears in durable run records and append-only run events. Storage, operator tools, and dashboards can branch on these values.

RunStatus

EnumValueMeaning
RunStatus.CancellationRequestedcancellation_requestedCancellation was requested for a leased running run; the owner may stop cooperatively, and maintenance can finalize after lease expiry.
RunStatus.CancelledcancelledTerminal cancellation outcome.
RunStatus.FailedfailedTerminal failure outcome after retry budget is exhausted, retry is not allowed, or a cancellation-requested attempt fails.
RunStatus.QueuedqueuedWaiting for worker acquisition or dispatch; runnable when runAt ?? updatedAt is due and queue capacity or an existing dispatch reservation allows it.
RunStatus.ReleasedreleasedBusiness waiting; runnable again when runAt is due.
RunStatus.RetryingretryingFailure-driven retry; runnable again when runAt is due.
RunStatus.RunningrunningA worker owns an active lease; the attempt is about to start or is executing.
RunStatus.ScheduledscheduledDelivery has been requested for a future runAt.
RunStatus.SucceededsucceededTerminal success outcome.

RunStatusClassification

EnumValueMeaning
RunStatusClassification.ActiveactiveThe run can still move through lifecycle transitions.
RunStatusClassification.TerminalterminalThe run does not reactivate; rerun and manual retry create linked child runs.

Use runStatusValues.isActive() and runStatusValues.isTerminal() instead of duplicating classification lists.

Status classification is broader than worker eligibility. cancellation_requested is active because it can still move to cancelled or failed, but it is not a runnable candidate. Terminal runs never accept more lifecycle events; rerun and manual retry create linked child runs instead.

Scan candidate status groups

Storage scans use narrower status groups than active/terminal classification. These groups are status-only gates; time and lease eligibility still come from getRunRunnableAvailableAt(), getRunDeliveryRecoveryAvailableAt(), and getRunCancellationFinalizationAvailableAt().

GroupValuesMeaning
runStatusValues.runnableCandidatesqueued, released, retrying, running, scheduledStatuses that listRunnableRuns() may return when the run is due or its lease has expired.
runStatusValues.deliveryRecoveryCandidatesreleased, retrying, running, scheduledStatuses that listRunsNeedingDelivery() may return when maintenance needs to append a fresh delivery request.
runStatusValues.cancellationFinalizationCandidatescancellation_requestedStatuses that listRunsNeedingCancellationFinalization() may return after the current lease expires.

queued is excluded from delivery recovery candidates because it already has durable delivery intent and outbox state.

Use the matching predicates, such as runStatusValues.isDeliveryRecoveryCandidate(), instead of duplicating status switches in adapters.

Dispatch Reservation Predicate

Bounded queues reserve capacity before publishing a delivery wakeup. Use this helper anywhere storage code needs to reason about that reservation window.

HelperConditionMeaning
isRunDispatchReservation({ run, at, condition: RunDispatchReservationCondition.Active })activeThe queued run still owns a dispatch slot at at.
isRunDispatchReservation({ run, at, condition: RunDispatchReservationCondition.Expired })expiredThe queued run had a dispatch slot, but it expired at or before at.

RunCounters

RunRecord.counters is materialized from replayed events. It is durable run state, not a derived dashboard-only summary.

FieldIncremented byMeaning
attemptsrun.startedCount of started execution attempts.
failuresrun.failed, run.retry_scheduledFailure pressure recorded for terminal failures and retry-scheduled failures.
releasesrun.releasedBusiness waits that did not count as failure pressure.
retriesrun.retry_scheduledFailed attempts that scheduled another try.

run.succeeded and run.cancelled do not increment counters by themselves. They close an existing attempt or, for waiting-run cancellation, finish a run that may have no attempts.

RunAttemptStatus

RunAttemptStatus appears in runlane.runs.attempts(runId) summaries. It is derived from replayed run events; it is not stored as a separate durable run field.

EnumValueMeaning
RunAttemptStatus.CancelledcancelledThe attempt ended after cooperative cancellation.
RunAttemptStatus.FailedfailedThe attempt failed without scheduling another try.
RunAttemptStatus.ReleasedreleasedThe attempt released the run to resume later.
RunAttemptStatus.RetryingretryingThe attempt failed and scheduled another try.
RunAttemptStatus.RunningrunningThe attempt has started and has no terminal attempt event yet.
RunAttemptStatus.SucceededsucceededThe attempt completed successfully.

Only run.started creates an attempt summary. A later run.cancelled marks the latest still-running attempt as cancelled; cancelling queued, released, retrying, or scheduled work without a started attempt does not create an attempt row.

RunEventType

EnumValueMeaning
RunEventType.CancellationRequestedrun.cancellation_requestedOperator or system requested cooperative cancellation of a leased running run.
RunEventType.Cancelledrun.cancelledWaiting work, a cancellation-requested run, or the latest running attempt completed with terminal cancellation.
RunEventType.Createdrun.createdFirst durable event for a run.
RunEventType.DeliveryRequestedrun.delivery_requestedRuntime recorded durable wakeup intent and storage creates the matching outbox row.
RunEventType.Failedrun.failedCurrent started attempt ended in terminal failure.
RunEventType.LeaseClaimedrun.lease_claimedWorker or inline execution claimed ownership for execution.
RunEventType.LeaseHeartbeatrun.lease_heartbeatWorker extended the current lease with the same worker id and token.
RunEventType.Releasedrun.releasedAttempt chose business waiting without counting a failure.
RunEventType.RetryScheduledrun.retry_scheduledCurrent started attempt failed and scheduled another try.
RunEventType.Startedrun.startedExecution attempt started.
RunEventType.Succeededrun.succeededAttempt completed successfully.

RunSourceType

EnumValueMeaning
RunSourceType.ManualRetrymanual_retryOperator-created child retry linked to a failed source run.
RunSourceType.RerunrerunOperator-created child rerun linked to a terminal source run.
RunSourceType.SchedulescheduleSchedule materialization created the run.
RunSourceType.TriggertriggerApplication trigger created the run.

TriggerOutcomeType

TriggerOutcomeType appears in TriggerRunResult from runlane.trigger(). It describes the result of the trigger call, not the run lifecycle status.

EnumValueMeaning
TriggerOutcomeType.CreatedcreatedThe trigger call persisted a new run.
TriggerOutcomeType.ReturnedExistingreturned_existingIdempotency returned the active or retained run already owning the selected key.

ActorType

EnumValueMeaning
ActorType.OperatoroperatorHuman or operator action.
ActorType.SchedulescheduleSchedule materializer action.
ActorType.SystemsystemFramework/system action.
ActorType.WorkerworkerWorker execution action.

contractDefaults.actor.system and contractDefaults.actor.operator provide the canonical actor records for framework and operator actions that do not carry a more specific actor id.

On this page