ci(client): fail the count ratchets on an entry above the tree

lint:size, lint:layers, lint:rtl (both baselines), lint:skips and
lint:warnings only failed a count that passed its entry. A count that
fell below its entry was logged and nothing more, so a file that shrank
could grow back to its old entry unseen, and the entry of a deleted
file stayed behind for the next file at that path. lint:format and
lint:offline already fail on such a stale entry, and the docs said
these counts may only shrink.

Each of them now fails on an entry that lowerCounts would lower or
drop, naming its count or saying the file is gone, and tells to run
--update, which still only lowers. staleCounts and reportStale in
lib/ratchet.mjs hold the shared part. Every baseline matches the tree
today, so none needed lowering. The client CLAUDE.md says so, and that
CI lints through lint:warnings rather than lint:check.
This commit is contained in:
Maurice
2026-10-08 13:56:19 +02:00
parent 4344dbe923
commit bd267c67f8
18 changed files with 210 additions and 37 deletions
+4 -1
View File
@@ -10,7 +10,10 @@
* that were already larger are listed in scripts/size-baseline.json with the
* size they had, and the check fails when one of them grows past its entry. A
* file that needs to grow is split by concern instead (the trip planner hook,
* page and road trip sidebar are the precedent).
* page and road trip sidebar are the precedent). An entry above the file's
* size now, or for a file that is gone, fails as well until --update lowers
* it: otherwise the file could grow back unseen, and a new file at a deleted
* path would inherit its allowance.
*
* npm run lint:size check against the baseline (CI)
* npm run lint:size -- --update lower the baseline to what the files hold now;