Context passed to observers and processless test sinks alongside each checkpoint.
checkpoint_seq is the committed run fence and graph_step is the
proposed run's committed graph position. active_superstep, when present,
exposes the stable identities of scheduled retry tasks and results awaiting
the barrier. node_attempts describes only the attempt outcomes newly
represented by this moment. These fields let durable drivers and observers
identify retry work without interpreting Docket-owned run state or parsing
task IDs.
application carries the caller-supplied application context from the run
options; Docket does not interpret it.
Summary
Types
@type active_superstep() :: %{ step: non_neg_integer(), tasks: [superstep_task()], pending_attempts: [pending_attempt()] }
@type node_attempt() :: %{ task_id: String.t(), node_id: String.t(), attempted: pos_integer(), outcome: :completed | :failed | :interrupted | :pending_update | :pending_interrupt, next_scheduled_attempt: pos_integer() | nil }
@type pending_attempt() :: %{ task_id: String.t(), node_id: String.t(), attempted: pos_integer(), kind: :update | :interrupt, idempotency_key: String.t() }
@type superstep_task() :: %{ task_id: String.t(), node_id: String.t(), scheduled_attempt: pos_integer(), idempotency_key: String.t() }
@type t() :: %Docket.Checkpoint.Context{ active_superstep: active_superstep() | nil, application: map(), checkpoint_seq: pos_integer() | nil, graph_hash: String.t() | nil, graph_id: String.t(), graph_step: non_neg_integer() | nil, node_attempts: [node_attempt()], run_id: String.t() }