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.
**Lens pass (every push, and before handing off).** `make verify` runs `check`
first (cheapest), then each app's heavy sensors - sobelow, coverage, CRAP,
mutation, as those yaks land - and finally both test suites. Measured 2026-10-26:
~10s wall (app 178 tests + blogex 156 tests).
first (cheapest), then per app: one suite run that exports its coverage, then
that app's sensors (sobelow, coverage, CRAP, mutation, as those yaks land), which
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.
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
`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
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