Expand description
Pure durable-dispatch decisions for the strategy engine.
Dispatch is the boundary between durable intent and an external effect. The store commits authority and the dispatch intent first; only then may an adapter leave the host. This module owns the decisions taken at that boundary so every host reaches the same verdict from the same durable facts, without SQLite, a clock of its own, or a process identity.
§What this module refuses to know
A previous host process disappearing is not an input to any decision
here. There is deliberately no host_restarted, process_exited or
previous_pid field anywhere in this module, because process exit alone is
not lease revocation, not effect loss, and not authority to repeat an
external effect. Recovery is decided only from the persisted lease clock and
the persisted effect progress:
- an unexpired claim is
RecoveryVerdict::Held— the claimant still owns it, whoever that claimant was and whatever happened to its process; - an expired claim whose effect never started is
RecoveryVerdict::Reclaimable; - an expired claim whose effect was already in flight is
RecoveryVerdict::InDoubtand is never blindly repeated; - a settled claim is
RecoveryVerdict::AlreadyCompleted.
Structs§
- Claim
Lease - One exact effect claim.
- Dispatch
Gate - The durable facts a dispatch gate reads. All of them are persisted before the decision is taken.
- Dispatch
Intent - The durable record committed before an effect leaves the host.
- Effect
Completion - A completion reported by an owner of one exact effect attempt.
- Successor
Edge - One successor edge whose target may be released by a settled effect.
- Successor
Gate - The durable facts fencing one successor release.
Enums§
- Claim
Verdict - The outcome of trying to take one effect claim.
- Completion
Verdict - The verdict on one reported completion.
- Dispatch
Decision - The verdict of the dispatch gate.
- Dispatch
Recipient - Who performs one dispatched effect. The recipient is frozen into the dispatch intent so routing cannot drift between admission and execution.
- Dispatch
Refusal - Why a dispatch was refused before any effect was attempted.
- Effect
Progress - How far the effect behind a claim actually got. This is persisted by the adapter at its own safe boundary; it is the only progress authority.
- Recovery
Verdict - What a recovering host may conclude about one persisted claim.
- Successor
Admission - The verdict on releasing the successors of one settled effect.
- Successor
Refusal - Why a successor release was refused.
Functions§
- claim_
effect - Take the claim for one dispatch intent, or report why it cannot be taken.
- recover_
claim - Recover one persisted claim from its lease clock and effect progress.
- settle_
effect - Decide one reported completion against the exact claim that owns it.