make: content-keyed test-commit tier caches the 10 pure gates (test-perf T1)

The 990-997/950/989_lib_byteid gates are pure functions of (stage
binaries, tracked sources, fixtures, harness, Makefile) and eat 87% of
full-test wall (measured, .ai/testperf-baseline.md). test-commit hashes
exactly those inputs; a match with the last green full run reports the
gates as 'cached' (counted separately, never silently) and runs
everything else - 25s vs 212s on a hit, full run on any miss. A red
run never records the key; make test itself is never cached and stays
the pre-push bar (rule 14 updated). Key gap caught in review:
examples/ feeds 996_dyn_ww - included.
This commit is contained in:
2026-06-10 16:10:20 +09:00
parent f940072623
commit 9b99d0883f
3 changed files with 107 additions and 4 deletions

View File

@@ -2556,6 +2556,16 @@ test: all sizelint peellint $(TESTS)
test-unit: all sizelint peellint $(TESTS)
@WW=$(BIN)/ww BIN=$(BIN) UNIT=1 sh test/run
# ---- test-commit: per-commit default (task #10 T1) ---------------------
# Full suite, but content-key-SKIPS the expensive wwstage byte-id /
# self-compile gates (950/989_lib_byteid/990-997) when their input set is
# byte-identical to the last green run — reported as `cached`, never a
# silent skip. NOT a substitute for the push bar: `make test` stays the
# no-skip bootstrap gate. Cache lives in out/.testcache (gitignored, wiped
# by `make clean`); a green `make test` primes it. See test/run.
test-commit: all sizelint peellint $(TESTS)
@WW=$(BIN)/ww BIN=$(BIN) COMMIT=1 sh test/run
# ---- smoke: inner-loop cross-stage byte-id check on a SMALL input ------
# Compiles one self-contained fixture through cstage w6c AND wwstage
# w6c_ww and diffs the emitted .s. Catches a cs!=ww emission divergence
@@ -2723,4 +2733,4 @@ nocc:
@echo
@echo "NOCC OK: $(STAGE0)/* reproduces itself from source. cc not invoked."
.PHONY: all cstage wwstage test test-unit smoke sizelint peellint install clean bootstrap nocc bootstrap-snapshot
.PHONY: all cstage wwstage test test-unit test-commit smoke sizelint peellint install clean bootstrap nocc bootstrap-snapshot