Skip to main content

ingest_never_rejects

Function ingest_never_rejects 

Source
pub async fn ingest_never_rejects<F: SyncFixture>(
    open: impl AsyncFn() -> F,
) -> Result<RuleOutcome, Violation>
Expand description

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.

Two origins each claim the same seat under byte-identical, position-free guards: each decision was valid where it was made, and together they conflict. The rule pushes both, as the two origins would, and then pulls the peer’s whole log. Both claims must be there.

§Rejects

A peer that evaluates the travelling guard against what it holds and refuses — or silently drops — the second claim. It is the natural first cut, because the guard arrives on the wire already, and it produces a peer set that never converges. tests/wrong_peers.rs carries both spellings: one that acknowledges the dropped claim as nothing appended, which the ack check catches, and one that acknowledges it as appended and drops it anyway, which only the pull of the whole log can see.

§Errors

A Violation of SY-1 if the peer refuses either push, reports either claim as anything but newly appended, or does not hand both back.