Skip to main content

refused_reset_changes_nothing

Function refused_reset_changes_nothing 

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

A refused reset leaves the read model and the checkpoint exactly as they were, and is never reported as success.

PS-18. The refusal mechanism is the port’s and the policy is the domain’s — the projection knows that fgas_ledger is a hash chain a regulator already holds, and the store does not — but a policy with no port-level mechanism is bypassed by anyone holding the store, which is every operator with a runbook.

The operative half is “changes nothing”, not the error variant. A rule that stopped at matches!(err, ResetError::Refused) would certify the mirror-image defect: a refusal reported perfectly, after the rows have gone.

Rejects: RefusalAsSuccessStore — a store whose protection policy is consulted somewhere other than the write path, so reset returns Ok; RefusalAfterTheFactStore — a store that issues its deletes and then checks the policy, refusing honestly over a read model already gone; and NoopProtectFixture, a fixture that declares it and protects nothing.

§Why this rule is capability-gated, and the gate is the fixture’s

Nothing a caller holds can make a conformant reset answer Refused; that is the property under test. So the protection belongs to the store, RESET_REFUSAL is where a fixture says whether it has any, and protect_from_reset is how this rule names the projection to protect. A store with no protection policy declines and this rule reports a skip carrying its own stated reason — which is what MemoryProjectionStore does, so the reference run prints that line rather than a pass nobody earned.