Jizoku.Runtime.DispatchProtocol.Projection (jizoku v0.4.0)

Copy Markdown View Source

Rebuildable projection over durable dispatch journal entries.

The projection is deliberately pure. Storage adapters can rebuild it from Jido thread journals, backend lease lifecycle signals, or from a single append-only Jizoku journal table without changing the runtime invariants.

Summary

Types

anomaly()

@type anomaly() :: %{
  :reason => atom(),
  :entry_type => atom(),
  optional(:runnable_key) => String.t(),
  optional(:run_id) => String.t(),
  optional(:idempotency_key) => String.t(),
  optional(:claim_id) => String.t(),
  optional(:claim_token_hash) => String.t()
}

continuation_abort_reason()

@type continuation_abort_reason() :: :predecessor_changed | :predecessor_terminal

string_set()

@type string_set() :: MapSet.t(String.t()) | %MapSet{map: term()}

t()

@type t() :: %Jizoku.Runtime.DispatchProtocol.Projection{
  anomalies: [anomaly()],
  attempts: %{
    optional(String.t()) => Jizoku.Runtime.DispatchProtocol.ActionAttempt.t()
  },
  continuation_aborts: %{optional(String.t()) => map()},
  continuation_fences: %{optional(String.t()) => map()},
  continuation_repairs: %{optional(String.t()) => map()},
  queued_run_ids: string_set(),
  terminal_runs: string_set()
}