CLAUDE.md: rule 14 — test-unit (inner-loop) vs test (bootstrap gate)

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.
This commit is contained in:
2026-05-21 18:10:18 +09:00
parent 46d303f7e1
commit d119b058a0

View File

@@ -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: <reason>` (ww) or `/* sizelint-ok: <reason> */` (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, 990997). 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/990997 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/<tool>/main.{s,combined.ww,o}` fixtures.