ExGAM.Attempt.Reconciler (ExGAM v0.1.0)

Copy Markdown View Source

Internal pure planner for missing Duty and dispatch-expiration records.

Plans derive from the verified prefix and trusted time. They contain payloads, not executed repairs: the Domain must commit and recover the planned batch before relying on it. The planner never retries an external executor, treats timeout as proof of no effect, or independently disposes of an open Duty.

Summary

Functions

Returns unmaterialized Duty causes at the supplied time without writing history.

Plans one atomic repair batch for a verified prefix and explicit trusted time.

Types

plan()

@type plan() :: %{payloads: [map()], batch_id: String.t() | nil}

Functions

missing_openings(state, time)

@spec missing_openings(ExGAM.GovernedAct.State.t(), integer()) :: [
  ExGAM.Duty.Derive.cause()
]

Returns unmaterialized Duty causes at the supplied time without writing history.

repair_plan(projection, time)

@spec repair_plan(ExGAM.Domain.Projection.t(), integer()) ::
  {:ok, plan()} | {:error, term()}

Plans one atomic repair batch for a verified prefix and explicit trusted time.

Pending, never-attempted dispatches may be cancelled on expiry or disputed Evidence. Started attempts instead retain uncertainty and their resources. The batch identity binds the prefix and exact payloads; an empty plan has batch_id: nil. The Domain transaction driver must commit the plan and may need bounded follow-up rounds as new causal records become visible.