Expand description
Reusable checks over the artefacts a turn produces.
Every helper returns a typed AssertionFailure instead of panicking, so
it composes inside a proptest, inside an exploration model, or inside a
production self-check. Call sites in #[test] code usually end in
.expect(...); call sites in library code can branch on the failure.
The checks cover the properties spec §27.2 asks for by name:
- no high-risk command executes without a trusted origin (I12);
- no receipt claims an outcome the ledger does not back (I16);
- a projection carries exactly one phase (§8.4);
- one case resolves to the same phase in two projections, which is what “one phase” means for a case rather than for a view (I3);
- two renderings of the same turn produce the same ordered blocks, which is what “reload returns the same blocks” means (§27.4, scenario 18).
Enums§
- Assertion
Failure - A check did not hold.
Functions§
- identical_
blocks - Checks that two assistant turns carry identical blocks in identical order.
- no_
high_ risk_ without_ trusted_ origin - Checks that no command in
batchexecutes aboveRiskClass::ReversibleLowRisk, or under any confirmation policy, without a trusted origin. - origin_
satisfies_ policy - Checks one envelope against one policy (I12).
- receipts_
backed_ by_ events - Checks that every receipt cites at least one event and only events the commit really produced (I16).
- same_
phase_ in - Checks that one case resolves to the same phase in two projections (I3).
- single_
phase - Checks that a projection carries exactly one phase (§8.4).