Skip to main content

Module dispatch

Module dispatch 

Source
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:

Structs§

ClaimLease
One exact effect claim.
DispatchGate
The durable facts a dispatch gate reads. All of them are persisted before the decision is taken.
DispatchIntent
The durable record committed before an effect leaves the host.
EffectCompletion
A completion reported by an owner of one exact effect attempt.
SuccessorEdge
One successor edge whose target may be released by a settled effect.
SuccessorGate
The durable facts fencing one successor release.

Enums§

ClaimVerdict
The outcome of trying to take one effect claim.
CompletionVerdict
The verdict on one reported completion.
DispatchDecision
The verdict of the dispatch gate.
DispatchRecipient
Who performs one dispatched effect. The recipient is frozen into the dispatch intent so routing cannot drift between admission and execution.
DispatchRefusal
Why a dispatch was refused before any effect was attempted.
EffectProgress
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.
RecoveryVerdict
What a recovering host may conclude about one persisted claim.
SuccessorAdmission
The verdict on releasing the successors of one settled effect.
SuccessorRefusal
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.