Spectre.Invocation (Spectre v0.3.4)

Copy Markdown View Source

A concrete, revision-fenced request to execute one nondeterministic boundary.

Invocations describe work without embedding executable clients or callbacks. Effect and inference attempts share the same lifecycle vocabulary. A direct Runtime caller may resume an effect descriptor explicitly; a Spectre.Instance retains the owning Run, dispatches work outside its mailbox, and accepts only a correlated worker receipt before applying the returned continuation.

Summary

Types

t()

@type t() :: %Spectre.Invocation{
  attempt: pos_integer(),
  attempt_id: String.t() | nil,
  control_revision: non_neg_integer(),
  id: String.t(),
  idempotency_key: String.t(),
  inference_id: String.t() | nil,
  kind: :effect | :inference,
  metadata: map(),
  operation: {atom(), atom() | String.t() | nil},
  owner: module() | nil,
  ref: Spectre.Run.Ref.t(),
  run_id: String.t(),
  run_revision: non_neg_integer(),
  scope: Spectre.Definition.scope() | nil,
  status: :pending,
  stream_epoch: String.t() | nil,
  subject_id: String.t()
}