docs: the Lens pass runs each suite before its sensors

Same shape in both apps now that coverage is wired: one suite run exports the
coverage, then the sensors read it. AGENTS.md said "sensors ... and finally both
test suites" and told sensor authors only to list targets in VERIFY_SENSORS; add
the export dependency and the "a check must fail when its input is missing" rule,
since `mix test.coverage` exits 0 when it finds no export.
This commit is contained in:
Willem van den Ende
2026-10-26 18:41:02 +00:00
parent abb712f8a2
commit cb13ccecab
2 changed files with 13 additions and 8 deletions
+8 -4
View File
@@ -87,9 +87,10 @@ no coverage, about a second. `make precommit` is the same target. Per app,
warnings fatal, format, test. Run these as often as you like while working. warnings fatal, format, test. Run these as often as you like while working.
**Lens pass (every push, and before handing off).** `make verify` runs `check` **Lens pass (every push, and before handing off).** `make verify` runs `check`
first (cheapest), then each app's heavy sensors - sobelow, coverage, CRAP, first (cheapest), then per app: one suite run that exports its coverage, then
mutation, as those yaks land - and finally both test suites. Measured 2026-10-26: that app's sensors (sobelow, coverage, CRAP, mutation, as those yaks land), which
~10s wall (app 178 tests + blogex 156 tests). run cheapest-first and read the export rather than re-running the suite. Measured
2026-11-01: ~11s wall (app 178 tests + blogex 156 tests + coverage floor).
`.githooks/pre-push` runs `make verify` and blocks the push when anything fails. `.githooks/pre-push` runs `make verify` and blocks the push when anything fails.
Install it once per clone: Install it once per clone:
@@ -115,7 +116,10 @@ work mid-feature: finish and commit what you are building, then run it.
- Adding a sensor: implement it as its own make target, add it to that app's - Adding a sensor: implement it as its own make target, add it to that app's
`VERIFY_SENSORS` in `app/Makefile` / `blogex/Makefile` (cheapest first), and `VERIFY_SENSORS` in `app/Makefile` / `blogex/Makefile` (cheapest first), and
update the slot comments there. A gate that reports a check it did not run is update the slot comments there. A gate that reports a check it did not run is
worse than no gate - the `VERIFY_SENSORS` list is what gets echoed. worse than no gate - the `VERIFY_SENSORS` list is what gets echoed. Sensors run
*after* the app's `test.coverage` step, because the coverage export they read is
produced by that suite run; if a check can pass without its input, make it fail
loudly (see the `coverage` target's guard).
### Triage classes ### Triage classes
+5 -4
View File
@@ -17,10 +17,11 @@ check:
# Precommit target for CI/pre-commit hooks # Precommit target for CI/pre-commit hooks
precommit: check precommit: check
# The Lens pass: everything `check` does, plus the heavy sensors and both test # The Lens pass: everything `check` does, plus, per app, one suite run (which
# suites, cheapest first. `.githooks/pre-push` runs this before every push (see # exports its coverage) and that app's sensors reading the export. Sensors run
# `make hooks`); run it yourself before handing off. Bypass deliberately with # cheapest-first among themselves. `.githooks/pre-push` runs this before every
# `git push --no-verify`. # push (see `make hooks`); run it yourself before handing off. Bypass
# deliberately with `git push --no-verify`.
verify: check verify: check
@echo "==> verify: app" @echo "==> verify: app"
@$(MAKE) -C app MISE_BIN=$(MISE_BIN) verify @$(MAKE) -C app MISE_BIN=$(MISE_BIN) verify