Skip to main content

two_handles_observe_each_others_appends

Function two_handles_observe_each_others_appends 

pub async fn two_handles_observe_each_others_appends<F: Fixture>(
    open: impl AsyncFn() -> F,
) -> RuleOutcome
Expand description

Two handles onto one backing store see each other’s writes, on both the read side and the append-condition side.

This is the rule racing_conditional_appends_elect_one_winner looks like and is not: that one is sequential and single-handle, so it pins the semantics of a race without ever crossing a connection.

It rejects three adapters that pass every other rule in this suite: a cached max(position) fast path, a per-connection repeatable-read snapshot, and an advisory lock scoped to one pool member. All three are per-session correctness, and all three are strategies the decision ledger defers rather than rules out.

The condition is tagged, not type-only, on purpose: the type-only probe returns an identical verdict here while being the join an adapter drops first, so it would test strictly less for no saving.

The first of those three is written down, compiled and registered: CachedHeadFixture in tests/mutation_coverage/mutants.rs reads correctly through a second handle and evaluates its condition against a cache its own appends refresh, which is what makes the rule’s second assertion something an implementation can fail rather than something no implementation would attempt. Two more mutants fail this rule for unrelated reasons — AfterDefaultsToFirstStore and ViolationAsStoreErrorStore — and the registry names all three.