pub async fn ack_never_confirms_a_non_durable_event<F: SyncFixture>(
open: impl AsyncFn() -> F,
) -> Result<RuleOutcome, Violation>Expand description
SY-31: an Ack confirms only what the far side still holds once the
handle that acknowledged is gone.
SY-31’s confirmation watermark is advanced to Ack::confirmed, “what
the far side has now durably seen”, and SY-24’s forwarding never offers
anything at or below it again. So a confirmation sent before the write
is durable loses that write for good: the spoke’s watermark has passed
it, and nothing re-sends it.
The rule pushes one batch of two groups from two origins, at origin
positions 3 and 7 and 2, drops the handle that pushed, reopens the
fixture when it can, connects a fresh handle onto it and pulls
everything. Then every pushed event at or below the confirmed mark for
its origin is held, byte for byte, and every confirmed mark names an
event the fresh handle holds. confirmed is read as a high-water mark,
never as everything up to: no position below a mark that the rule did
not push is assumed held.
“Not durable” is observed as “gone once the acking handle is dropped”,
and, when the fixture declares SyncFixture::REOPEN, as “gone once
the fixture is reopened”, the process crash CF-17 lets a fixture stage.
The reopen must answer Reopened::Discarded; a fixture that declares
the capability and keeps the provided reopen is a violation here. A
fixture that declines it is run as before, and a peer that buffers in
memory every handle shares, and would lose it to a crash, passes: that
is what the declension costs, and its reason is the fixture’s to state.
A peer whose ack confirms none of the pushed events has given the rule
nothing to check, so the rule reports
Skipped with
NO_CONFIRMATION rather than a pass.
§Rejects
A write-behind cache that acknowledges a push on admission and commits
it later, so a handle dropped in between has confirmed what the peer
never held. tests/wrong_peers.rs carries it, and the peer that
confirms nothing, which this rule must skip. tests/wrong_reopens.rs
carries the same cache in memory every handle shares, which only a
reopen can show.
§Errors
A Violation of SY-31 if the peer refuses the push or a pull, if a
fixture declaring SyncFixture::REOPEN reopened nothing, if a
confirmed event is not held by a fresh handle, or if a confirmed mark
names no event the fresh handle holds.