From 068911b4e82c349ba0e90c7ad4a1ef7292dd5415 Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Mon, 26 Oct 2026 17:58:42 +0000 Subject: [PATCH] make verify: add the Lens pass container (both apps, cheapest first) Root verify runs check first, then a per-app verify in each Makefile: sensor slots hooked to VERIFY_SENSORS (empty today, so nothing is claimed that is not run) and then that app's suite. Measured: 9.9s wall, app 178 + blogex 156 tests. --- Makefile | 12 +++++++++++- app/Makefile | 27 +++++++++++++++++++++++++-- blogex/Makefile | 19 ++++++++++++++++++- 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 425043f..208caf1 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ MISE_BIN ?= mise -.PHONY: check precommit deps compile test test-elisp format +.PHONY: check precommit deps compile test test-elisp format verify # Cheap static gate over both apps, cheapest first. No database, no coverage: # this is the loop you run freely while working and before every commit. @@ -17,6 +17,16 @@ check: # Precommit target for CI/pre-commit hooks precommit: check +# The Lens pass: everything `check` does, plus the heavy sensors and both test +# suites, cheapest first. `.githooks/pre-push` runs this before every push (see +# `make hooks`); run it yourself before handing off. Bypass deliberately with +# `git push --no-verify`. +verify: check + @echo "==> verify: app" + @$(MAKE) -C app MISE_BIN=$(MISE_BIN) verify + @echo "==> verify: blogex" + @$(MAKE) -C blogex MISE_BIN=$(MISE_BIN) verify + # Sync dependencies deps: @make -C app deps diff --git a/app/Makefile b/app/Makefile index 1c8369c..1cd2372 100644 --- a/app/Makefile +++ b/app/Makefile @@ -3,7 +3,7 @@ MISE_BIN ?= mise MISE_EXEC = $(MISE_BIN) exec -- -.PHONY: check precommit deps compile test format credo +.PHONY: check precommit deps compile test format credo verify # Run all static analysis checks (no database required) check: credo format @@ -94,4 +94,27 @@ playwright-full: playwright-docker-start # Run Credo static analysis credo: - $(MISE_EXEC) mix credo --strict \ No newline at end of file + $(MISE_EXEC) mix credo --strict + +# ============================================================================= +# Lens pass (heavy checks; root `make verify` runs this before every push) +# ============================================================================= +# +# Sensor slots, cheapest first. Credo is cheap enough that it lives in +# `check`, not here. Add a sensor as its yak lands, both as a target and to +# VERIFY_SENSORS — that variable is the single source of truth for what this +# target reports as wired. +# - sobelow (yak: sobelow in the Lens pass) +# - coverage (yak: coverage floors + framework-glue exclusions policy) +# - crap (yak: CRAP scores with ex_crap (both apps)) +# - mutation (yak: mutation testing with muex — a sensor, not a gate) +# +# Runtime note: the coverage yak should make this export coverage from a single +# suite run (test --cover --export-coverage) that CRAP reuses, instead of +# running the suite twice. +VERIFY_SENSORS := + +verify: + @echo "==> verify(app): sensors [$(if $(VERIFY_SENSORS),$(VERIFY_SENSORS),none wired yet)]" + @for sensor in $(VERIFY_SENSORS); do $(MAKE) $$sensor || exit 1; done + @$(MAKE) test diff --git a/blogex/Makefile b/blogex/Makefile index 88dc22b..3667b13 100644 --- a/blogex/Makefile +++ b/blogex/Makefile @@ -3,7 +3,7 @@ MISE_BIN ?= mise MISE_EXEC = $(MISE_BIN) exec -- -.PHONY: check precommit deps compile test format +.PHONY: check precommit deps compile test format verify # Cheap static gate for this library (no database, no coverage). Runs from the # root `make check`, which loops app then blogex. @@ -33,3 +33,20 @@ test: deps # Format code format: $(MISE_EXEC) mix format + +# ============================================================================= +# Lens pass (heavy checks; root `make verify` runs this before every push) +# ============================================================================= +# +# Sensor slots, cheapest first. Add a sensor as its yak lands, both as a target +# and to VERIFY_SENSORS — that variable is the single source of truth for what +# this target reports as wired. +# - coverage (yak: coverage floors + framework-glue exclusions policy) +# - crap (yak: CRAP scores with ex_crap (both apps)) +# - mutation (yak: mutation testing with muex — a sensor, not a gate) +VERIFY_SENSORS := + +verify: + @echo "==> verify(blogex): sensors [$(if $(VERIFY_SENSORS),$(VERIFY_SENSORS),none wired yet)]" + @for sensor in $(VERIFY_SENSORS); do $(MAKE) $$sensor || exit 1; done + @$(MAKE) test