bynk.history.restates_invariant
Error A history property merely re-checks a guarantee a declared invariant/transition already enforces on every reached state (testing track slice 7, ADR 0155).
Every state a driven run reaches has already passed the agent's invariant and transition checks, so a history property that only asserts the same thing over run cannot fail. The compiler flags it, and the check is deliberately narrow, so a near-copy may pass. Assert something the per-state rules do not say, such as a protocol across steps: a spend is accepted only after a top-up.
Example
invariant nonneg: balance >= 0
// tests/t.test.bynkfor all run: History[Wallet] { expect run.all((s) => s.new.balance >= 0) } // ✗ the invariant says thisfor all run: History[Wallet] { expect run.all((s) => (s.call is Spend && s.accepted) implies run.upTo(s).any((p) => p.call is TopUp && p.accepted)) } // ✓ a protocol across stepsIn the Book
See also
- Every code in its category, History properties, on the diagnostic index.
bynk explain bynk.history.restates_invariantshows the same from the installed toolchain, without a network.