Inside Alchemy PR #3260: invariants-as-code, 27 commits bringing Z3 proofs to domain models

samgoodwin89 · x · 2026-11-19

samgoodwin89 shares the merged alchemy-run/alchemy PR #3260 (27 commits) implementing formal verification. Invariants and transition rules are declared directly on Aggregate/Model definitions (NeverOverdrawn, AClosedAccountStaysClosed, OnlyAnAgentChangesTheOwner, cross-aggregate relations like NoTransferLeftPending). Core idea per the PR: write down what must always be true, and one test proves it or finds the breaking command sequence.

Related event: Alchemy lands formal verification: invariants as code, automated proofs and counterexamples(6 posts)→

Original post →

More from coding & agent

coding & agent channel →