You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found in a modularity review of main @ 8e8970a. Tracking issue — this one is unusual in that the project has already paid for the defect twice, in a test-runner mechanism and a standing CLAUDE.md prohibition.
What
Makefile:23 sets BINARY := $(SRC_DIR)/eigenscript, and every variant emits to it from a single whole-program gcc invocation: build (:54), full (:63), http (:72), zlib (:87), gfx (:97), asan (:185), tsan (:197), valgrind (:211), poison (:228), pgo (:246, :254). Only lib (:163) and coverage (:271) ever produce .o files. There are no pattern rules and no header dependency tracking; build is .PHONY (:42).
Consequences, all currently being absorbed
Two variants cannot coexist, so an ASan run and a release run must serialize. This is a live constraint on any review or CI parallelism — I hit it directly this session and had to sequence builds around in-flight suite runs.
The test runner carries a workaround for it.tests/run_all_tests.sh:29-60 computes a SHA fingerprint of the binary and re-checks it at ~10 section seams (lines 159, 192, 211, 491, 706, 958, 991, 1008, 1025) purely to detect a mid-run clobber (Test runner should fail loud when the binary is rebuilt mid-run, not silently grade against it #681). There is even a self-test section [99d] proving the guard fires.
CLAUDE.md carries a prohibition for it — "never rebuild one while a suite run against another is in flight."
Any edit costs a full 22-TU rebuild, since nothing is incremental.
Suggested fix
A build/$(VARIANT)/ objdir with -o $(BINARY)-$(VARIANT), plus -MMD -MP dependency tracking and a pattern rule. That makes variants coexist, makes rebuilds incremental, and lets both the fingerprint guard and the CLAUDE.md rule be retired rather than maintained — the guard becomes unnecessary rather than merely redundant.
Worth keeping a src/eigenscript symlink or copy to the last-built variant so existing scripts and docs keep working.
Found in a modularity review of
main@8e8970a. Tracking issue — this one is unusual in that the project has already paid for the defect twice, in a test-runner mechanism and a standing CLAUDE.md prohibition.What
Makefile:23setsBINARY := $(SRC_DIR)/eigenscript, and every variant emits to it from a single whole-programgccinvocation:build(:54),full(:63),http(:72),zlib(:87),gfx(:97),asan(:185),tsan(:197),valgrind(:211),poison(:228),pgo(:246, :254). Onlylib(:163) andcoverage(:271) ever produce.ofiles. There are no pattern rules and no header dependency tracking;buildis.PHONY(:42).Consequences, all currently being absorbed
tests/run_all_tests.sh:29-60computes a SHA fingerprint of the binary and re-checks it at ~10 section seams (lines 159, 192, 211, 491, 706, 958, 991, 1008, 1025) purely to detect a mid-run clobber (Test runner should fail loud when the binary is rebuilt mid-run, not silently grade against it #681). There is even a self-test section [99d] proving the guard fires.Suggested fix
A
build/$(VARIANT)/objdir with-o $(BINARY)-$(VARIANT), plus-MMD -MPdependency tracking and a pattern rule. That makes variants coexist, makes rebuilds incremental, and lets both the fingerprint guard and the CLAUDE.md rule be retired rather than maintained — the guard becomes unnecessary rather than merely redundant.Worth keeping a
src/eigenscriptsymlink or copy to the last-built variant so existing scripts and docs keep working.