Squidie.Runtime.DispatchProtocol.Projection (squidie v0.1.2)

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 Squidie 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()
}

string_set()

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

t()

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