pub async fn every_refusal_states_its_class<F: SyncFixture>(
open: impl AsyncFn() -> F,
) -> Result<RuleOutcome, Violation>Expand description
SY-36: every error a peer reports states its failure class, and the class is the one its adapter says it is.
The fixture drives a fresh handle into every refusal it can produce and
declares each one’s class (SyncFixture::refusals); the rule checks
that each provocation was refused, and that the error’s
[Classify::class] answers what was declared. The class is read twice
from the same value, because SY-36 makes it a function of the error
alone.
§Rejects
A peer that reports every failure as one class — the opaque error
ADR-0026 rejected, with a trait impl bolted on so it compiles.
tests/wrong_peers.rs carries it, as Transient for everything, which
retries a batch that can only ever be split.
The rule’s other three refusals each have a mutant there too: a fixture that declares no refusal, a peer that accepts the push its fixture says it refuses, and an error whose class changes between two reads.
§Errors
A Violation of SY-36 if the fixture declares no refusal, if a
provocation succeeds, or if a refusal’s class is not the declared one or
changes between two reads.