Proof Tiers: Property Tests, Then Dafny, Then Lean
Every rule gets property tests. A high-stakes pure core gets a verified implementation. A theorem prover is for designs, not for shipped code. We measured why.
Testing
Property tests, proofs, real databases and gates that actually gate
8 guides in this collection
Every rule gets property tests. A high-stakes pure core gets a verified implementation. A theorem prover is for designs, not for shipped code. We measured why.
Put retention, limits and permission rules in a module with no I/O, then state what must never happen and let a generator hunt for the case that breaks it.
A hand-written database mock agrees with whatever the code expects. Run tests through a thin D1 shim over real SQLite, with the real migrations applied.
A threshold written in the docs and not in the config protects nothing. Put the floor in the test tool, run that exact command in CI, and delete checks that cannot fail.
Five setup faults that make a suite pass alone and fail together, or pass while testing nothing. Each has a one-line fix in the config or the setup file.
Check a screen with a headless browser that takes screenshots at phone and desktop width in light and dark, and collects every console error on the way.
A test that types keys, deletes files or writes to a real state file checks where it is first, and stops with a clear message if the place is not disposable.
A command with one bad argument changes nothing and says why. Validate everything before acting, and report a refusal as a refusal, not as silence.