From 9a135a43d867e4acc7639d46305a3b175fc8bdee Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 12 Oct 2026 01:15:19 +1100 Subject: [PATCH] docs(agents): forbid database-backed tests --- CLAUDE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index f21da4b63..e8e2d1e7f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -97,7 +97,8 @@ The default for a change is no new test. Write one only when: A test that exists must catch a real regression, survive refactoring, run fast, and be cheap to keep. Never test wiring, constants, defaults, struct shapes, -fakes, or call order. One table-driven test per behaviour; extend the table +fakes, or call order. No test opens a real database or needs Docker; test +SQL semantics at the interceptor or domain level with fakes. One table-driven test per behaviour; extend the table instead of adding a second test. Prefer making an invalid state unrepresentable to testing that it is rejected. Test helpers live in `_test.go` files only.