fix(catalog): release gate can no longer be green without measuring anything
check-versions.mjs reported "12 SKIP, exit 0" on a fresh clone with no sibling plugin repos — a run that verified nothing was indistinguishable from a clean run. Any SKIP now fails the gate by default (--allow-skip opts in explicitly), and the summary always reports "verified N/M". Also adds a homepage-resolves check on plugin.json (dead-link ERROR, verified live against voyage's stale pre-polyrepo URL); the field stays optional since 11 of 12 plugins don't carry it yet. gateOutcome is split out as a pure function so both directions (all-SKIP fails, fully-verified-clean still passes) are unit-tested without needing a real sibling-repo layout on disk.
This commit is contained in:
parent
4509bb6096
commit
0b0bf24137
3 changed files with 210 additions and 13 deletions
24
CLAUDE.md
24
CLAUDE.md
|
|
@ -92,10 +92,28 @@ their own Forgejo repositories under `https://git.fromaitochitta.com/open/`.
|
|||
change. For each plugin it checks (against the sibling repo) that the catalog `ref` resolves to a
|
||||
real git tag (ERROR if dangling — breaks install), that `plugin.json` version == README
|
||||
version-badge (ERROR), that the catalog README's per-plugin `` `vX.Y.Z` `` label == the catalog
|
||||
`ref` (ERROR — the human-facing doc must not misstate the installed version), and that the catalog
|
||||
`ref` matches `plugin.json` version (WARN — catalog lags or an unreleased bump). Exit 1 on any
|
||||
ERROR; `--strict` also fails on WARN. Pure-function core covered by
|
||||
`ref` (ERROR — the human-facing doc must not misstate the installed version), that the catalog
|
||||
`ref` matches `plugin.json` version (WARN — catalog lags or an unreleased bump), and that
|
||||
`plugin.json`'s `homepage`, if present, actually resolves (ERROR if dead — a live `curl` check,
|
||||
synchronous by design, see the comment at `checkHomepage` for why it must never become async).
|
||||
Exit 1 on any ERROR; `--strict` also fails on WARN. Pure-function core covered by
|
||||
`scripts/check-versions.test.mjs` (`node --test scripts/check-versions.test.mjs`).
|
||||
- **`homepage` is OPTIONAL, not required** (decided 2026-08-26): measured that 11 of 12
|
||||
plugins omit the field. Requiring it would flip those 11 to ERROR and, via
|
||||
`release-plugin.mjs`'s ERROR-set pre-flight (catalog-wide), block every release in the
|
||||
marketplace until each of those 11 sibling repos re-tags — a marketplace-wide freeze
|
||||
delivered by a script fix. The gate only fires when the field is present AND resolves
|
||||
to a definitive 4xx/5xx; a network failure (timeout/DNS) reads as "not checked", never
|
||||
as a confirmed dead link.
|
||||
- **SKIP is UNVERIFIED, not clean, and now blocks the gate by default.** Measured 2026-08-18: a
|
||||
fresh clone with zero sibling repos printed `12 plugins — 0 OK, 0 WARN, 0 ERROR, 12 SKIP` at
|
||||
**exit 0** — a run that verified nothing was indistinguishable from a run that verified
|
||||
everything and found it clean (Verifiseringsloven ansikt 4, in the org's own release gate).
|
||||
Any SKIP now fails the run unless `--allow-skip` is passed explicitly, and the summary line
|
||||
always reports the denominator: `— verified N/M`. `runGate`'s `hasError`/`hasWarn`/`failed`
|
||||
fields are unchanged in meaning; the new SKIP-based failure is a separate `unverified` field
|
||||
folded into `failed` — `release-plugin.mjs`'s pre-flight (`preflightErrors`) reads the
|
||||
ERROR set directly off `results`, never `failed`, so it is untouched by this.
|
||||
- **Stat-badge mirroring (part of the same gate):** each plugin block in the catalog README ends in a
|
||||
stat line (`7 agents · 16 scanners · 21 commands · 1398 tests · [Full documentation →]`). The gate
|
||||
compares every number on that line against the plugin's own shields badge for the same axis, and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue