From d119b058a08b1e813c91082e0bd34740749453f8 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Thu, 21 May 2026 18:10:18 +0900 Subject: [PATCH] =?UTF-8?q?CLAUDE.md:=20rule=2014=20=E2=80=94=20test-unit?= =?UTF-8?q?=20(inner-loop)=20vs=20test=20(bootstrap=20gate)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds rule 14 documenting the test target split. test-unit (~3.8s) is the inner-loop fast path; full make test (~8:30) is the bootstrap-correctness gate. Never push without test green. The skip set (950, 990-997) lives in test/run; new wwstage-driver tests added in that range automatically participate. Phase split background cited: ww_ww writes intermediates adjacent to traversed sources (task #15), so concurrent wwstage-driver tests would race. --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 4ad1ebe9..608b3e5c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,3 +11,4 @@ 11. Split commits when they bundle unrelated concerns. Bisect-cleanliness is the default. Multi-fix commits need a body paragraph explaining why they couldn't split. 12. Simple data, simple algorithms. Sea-of-stars style. Mirror Hare's structural choices over clever alternatives. 13. No hardcoded size literals in size-computation contexts. Always route through the type table (tinfo.size / Type.size / ty_*->size / size(T) / primtypesize / tyslicesize). Per Drew's framing of Hare's discipline. `make sizelint` enforces and runs as a dep of `make test`. Exemptions documented inline with `// sizelint-ok: ` (ww) or `/* sizelint-ok: */` (C). Optional local enforcement: `ln -s ../../tools/sizelint .git/hooks/pre-commit`. +14. Test targets. Inner-loop dev runs `make test-unit` (~3.8s, skips wwstage-driver tests: 950, 990–997). Pre-commit / pre-push runs full `make test` (~8:30, all 132 incl. byte-id gates). The `test` target is the bootstrap-correctness gate — never push without it green. test-unit is a fast confidence check on unit-level code (stages, stdlib, smoke); a green test-unit doesn't prove bootstrap, only that the unit set is intact. Don't add new wwstage-driver tests outside the 950/990–997 range (the test/run skip set is keyed by NNN prefix). Phase split background: ww_ww writes intermediates next to every traversed source (filed bug), so concurrent wwstage-driver tests would race on `selfhost/cmd//main.{s,combined.ww,o}` fixtures.