The self-verifying ledger
Claim: Recurso’s double-entry books reconcile to zero discrepancies after every billing operation. Receipts:- The randomized invariant harness runs real billing sequences — subscriptions, upgrades, downgrades, coupons, refunds, recognition, cancels — against real Postgres in CI on every commit, and fails if the reconciler finds a single missing ledger leg, unbalanced book, wrong-sign balance, or deferred revenue below its recognition schedule.
- The reconciler itself ships in the product (Finance → Reconciliation): the same checks, on demand, against your live books.
- The E2E suite ends with a zero-discrepancy gate — a release cannot ship with unexplained money.
- This harness has caught real high-severity bugs before any customer saw them — including bugs its own authors introduced. The public CI history is the record.
The accounting-scenario corpus
Claim: money-path fixes in Recurso ship with a failing-first oracle — a test proven to fail on the old behavior before the fix lands. Receipts: the repository carries a corpus of Postgres-backed accounting scenarios grown one real bug at a time — downgrade proration against recognized revenue, coupon-aware plan changes, refund tax reversal, cross-exponent currency conversion, gift and quote ledger legs, credit-note tax breakdowns, and more. Browse them:*_pg_test.go in the service layer.
Each test’s comment explains the exact failure it locks out.
Exact money math
Claim: usage billing is priced with exact rational arithmetic — no float drift — and rounded exactly once, on the final amount. Receipt: the rating engine usesbig.Rat end-to-end across all seven charge models; the round-once
discipline is documented and tested at each model.
API honesty
Claim: the published OpenAPI spec matches the running API. Receipt: CI fails on drift — every registered route must exist inopenapi.yaml,
enforced on every commit. The SDKs are generated from the same spec.
Performance claims
Claim: hot-path queries are index-served, verified — not assumed. Receipt: the schema-wide audit (releases v0.12.0) EXPLAIN-verified every hot query shape; migrations 000161–000163 document each shape and the worker/webhook/dashboard path it serves.Restorability
Claim: a backup of your books can be restored and proven complete — not assumed restorable. Receipt:scripts/restore_drill.sh
restores a live dump into a fresh database and then proves four properties:
row-count parity per table, order-independent invoice content fidelity
(md5 over id|total|tax|paid|status), and double-entry conservation
(Σdebits = Σcredits) globally and per tenant — exiting non-zero on any
failure. The first published drill
(2026-08-03 report)
restored 97 tenants and 3,119 ledger transactions in under a second, all
checks PASS.
Migration safety
Claim: a migration into Recurso is proven before you cut billing over — not assumed correct. Receipt: the Compare gate — for Stripe, Chargebee, and RevenueCat (POST /v1/import/<source>/compare) — re-diffs your committed export against
live Recurso data, read-only, and reports per record: coverage (every
importable source record exists), fidelity (plan amount, currency, and
interval exact; customer identity), and continuity (a subscription whose
period end drifted more than an hour is flagged — the double-billing /
billing-gap risk). ready: true means zero issues. It runs from the Import
wizard’s final step — “Before you cut over: run the Compare gate” — and every
run persists as a printable receipt
(GET /v1/import/compare-reports/:id/document): a dated, self-contained
document stating what was checked, what matched, and the verdict, like the
restore-drill report above.
What’s not here yet — and is coming
We hold ourselves to the same standard for absence: when a proof artifact doesn’t exist, we say so rather than imply otherwise. Everything promised on this page so far has shipped; new claims will appear here first, marked as not-yet-proven, until their receipts exist.Next steps
Double-entry, for engineers
The model these tests protect
The Ledger
The invariants in production