Solutions
Every business has rules that can’t break.
The rules change by industry. The way they break doesn’t: a deploy, a retry or a cache, and a number that should never happen.
01
Fintech and payments
Money moves in more places than your tests do.
wallet.balance == sum(ledger.amount)payout <= settled - refunds - feescount(transfer by idempotency_key) == 1
Read the full breakdown →
02
E-commerce and marketplaces
Every promotion is a rule waiting to be broken.
coupon.uses <= coupon.max_usesinventory.on_hand >= 0order.total == sum(items) - discounts + shipping
Read the full breakdown →
03
B2B SaaS
Plans, seats and tenants are business rules too.
org.active_seats <= org.plan.seatsorg.features ⊆ org.plan.featuresrow.org_id == parent.org_id
Read the full breakdown →
04
Usage-based billing
If you meter it, the invoice has to match.
count(usage_event by event_id) == 1invoice.amount == sum(usage × price)account.credits >= 0
Read the full breakdown →
05
Logistics and inventory
One order, one shipment, one truth.
shipments_per_order <= 1 unless order.splitinventory.reserved <= inventory.on_handshipment.delivered ⇒ shipment.proof_id != null
Read the full breakdown →
06
Health and regulated data
Who saw what, and were they allowed to?
access.user_id ∈ record.care_teamcount(reads) == count(audit where action = read)share.created_at >= consent.granted_at
Read the full breakdown →
Not on the list?
If your product has a number that must never be wrong, it has an invariant. Tell us where it lives.