Pure application of a validated Task event to a revisioned snapshot.
The reducer emits :applied only when durable state changes and advances the
revision exactly once. :unchanged represents a valid no-op. Stores may use
:duplicate when replaying a previously committed event; pure application
does not emit that outcome because event history belongs to the store.
Summary
Functions
Applies one event at the store-assigned commit timestamp.
Types
@type outcome() :: :applied | :unchanged | :duplicate
@type t() :: %Snodo.Extensions.Tasks.Transition{ committed_at: String.t(), effects: map(), event_revision: non_neg_integer(), outcome: outcome(), snapshot: Snodo.Extensions.Tasks.Snapshot.t() }
Functions
@spec apply( Snodo.Extensions.Tasks.Snapshot.t(), Snodo.Extensions.Tasks.Event.t(), String.t() ) :: {:ok, t()} | {:error, term()}
Applies one event at the store-assigned commit timestamp.