Shared append and completion policy for a durable Domain command.
Command modules still own planning, conflict re-planning and recovery checks. This helper owns the mechanical boundary they all share: obtain an operational batch identity, append once, recover after a CAS conflict, and classify fatal durability failures. Ordinary adapter errors are returned; exhausted or ambiguous commits stop the Sequencer so supervision can recover from ledger truth.
Summary
Functions
Appends payloads and invokes command-specific recovery or re-planning callbacks.
Repairs derivable Duties before a command observes or changes Domain state.
Types
@type command_result(value) :: {:ok, ExGAM.Domain.Sequencer.State.t(), value} | {:ok, ExGAM.Domain.Sequencer.State.t(), ExGAM.Act.t(), ExGAM.Attempt.t(), ExGAM.Secret.CheckoutReceipt.t()} | {:error, ExGAM.Domain.Sequencer.State.t(), term()}
Functions
@spec append( ExGAM.Domain.Sequencer.State.t(), [map()], non_neg_integer(), non_neg_integer(), (term() -> command_result(term())), (ExGAM.Domain.Sequencer.State.t(), non_neg_integer() -> command_result(term())) ) :: command_result(term())
Appends payloads and invokes command-specific recovery or re-planning callbacks.
@spec preflight(ExGAM.Domain.Sequencer.State.t()) :: {:ok, ExGAM.Domain.Sequencer.State.t()} | {:error, ExGAM.Domain.Sequencer.State.t(), term()}
Repairs derivable Duties before a command observes or changes Domain state.