Expand description
The sync rules. See the crate documentation for what each covers.
Each rule is an async function taking impl AsyncFn() -> F — not a fixture
but how to make one, as in the event-store family — and returning
Result<RuleOutcome, Violation>.
§What no rule here does
Decode a payload (SY-35). Events are compared whole — identity, recorded
time and the opaque bytes — and never parsed. A suite that parsed data
would certify a peer that does, and ADR-0003’s guarantee is that no peer
needs to.
Hold two peers (SY-8). Where a clause speaks of two peers, the rule plays one of them itself: it is the side that pushes and pulls, and the fixture’s peer is the far side.
Functions§
- ack_
never_ confirms_ a_ non_ durable_ event - SY-31: an
Ackconfirms only what the far side still holds once the handle that acknowledged is gone. - compensation_
is_ atomic_ with_ the_ losing_ event - SY-2, the transport’s half: a losing event and the compensation that answers it travel as one group, and a peer hands them back as one group.
- event_
id_ order_ is_ identical_ on_ every_ peer - SY-23: the order a deployment may rely on peer-independently,
EventIdorder, is the same on this peer as on every other, whatever order the events arrived in. - every_
refusal_ states_ its_ class - SY-36: every error a peer reports states its failure class, and the class is the one its adapter says it is.
- ingest_
never_ rejects - SY-1: a peer appends every replicated event it does not already hold, and never evaluates an append condition — the origin’s or its own — as a precondition.
- nothing_
waiting_ means_ the_ next_ pull_ is_ empty - SY-37: a peer that answers a pull with [
Waiting::Nothing] hands back an empty batch on the next pull from the token that answer carried. - peer_
declares_ its_ own_ limits - SY-18: a peer declares the limits it imposes, synchronously, and the declaration is true: an event it admits lands, so a runner that read it learns of an event that cannot land before pushing, not at ingest.
- peer_
takes_ a_ batch_ at_ its_ declared_ limits - SY-18: a peer’s declared batch limits are the limits it imposes: a push at the declared corner, which the declaration admits, lands whole.
- push_
envelope_ preserves_ group_ boundaries - SY-30: the decomposition into independently conditioned groups is kept end to end. What a peer is pushed as three groups it hands back as those three groups: the same boundaries, the same events in order, and the same guards.
- retention_
gap_ is_ reported_ not_ silent - SY-32: a peer that has forgotten history reports the floor, and
refuses a resume token below it with class
Reseed, so a peer that was offline longer than its retention window is told it cannot converge rather than converging on a strict subset in silence. - round_
trip_ preserves_ the_ whole_ log - SY-28, and SY-27 beneath it: a round trip preserves the whole log. Once
the two sides have pushed and pulled to quiescence, each holds the same
set of
EventIds, each event with byte-identical type, tags, data and metadata, and the recorded time it was pushed with (VT-9).