ktg-plugin-marketplace/scripts
Kjell Tore Guttormsen ac7ad424d1 fix(scripts): run check-versions BEFORE release-plugin writes, not after
release-plugin.mjs --write wrote marketplace.json and the catalog README label
first, and only THEN ran check-versions via execFileSync (which throws on exit
1). A red catalog therefore left a half-applied release in the working tree —
exactly the state a parallel session has already been observed carrying to the
public remote.

Adds applyRelease() with an injected io seam so the ORDER is testable: runGate()
runs first, and any ERROR aborts with nothing written. The pre-flight reads the
ERROR set only, never failed/--strict — pre-bump the released plugin is SUPPOSED
to be WARN (catalog ref behind plugin.json), so a WARN gate would brick every
release. Verified against the real classifier, not synthetic data.

The post-write gate stays: pre-flight validates the old state, that one
validates the new state.

Known remaining hole, documented not built: --create-tag mints and pushes the
plugin tag before the pre-flight runs.

Tests 14 -> 19 (120 -> 125 across the six suites); check-versions 12 OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Ga5tZ3AgUxAcdLtWB8Kig
2026-08-10 20:34:38 +02:00
..
build-rollup-register.mjs fix(rollup): discover git worktrees - .git tested for existence, not directory-ness 2026-07-31 15:48:41 +02:00
build-rollup-register.test.mjs fix(rollup): discover git worktrees - .git tested for existence, not directory-ness 2026-07-31 15:48:41 +02:00
check-nav-golden.mjs test(okf): consume nav-golden fixtures + thin STEG 0 corpus gate 2026-07-24 20:35:44 +02:00
check-nav-golden.test.mjs test(okf): consume nav-golden fixtures + thin STEG 0 corpus gate 2026-07-24 20:35:44 +02:00
check-okf-parity.mjs feat(okf): enforce §3 okf_version shape, bump convention 0.1 -> 0.2 2026-07-25 20:32:30 +02:00
check-okf-parity.test.mjs feat(okf): enforce §3 okf_version shape, bump convention 0.1 -> 0.2 2026-07-25 20:32:30 +02:00
check-versions.mjs docs(catalog): re-measure badge coverage at pinned refs (27 gated / 15 ungated across 12 plugins) 2026-08-04 21:43:52 +02:00
check-versions.test.mjs fix(check-versions): mirror stats against the pinned ref, not the working tree [skip-docs] 2026-08-02 21:26:27 +02:00
okf-check.mjs docs(okf-check): body-text emitters are now ZERO — okr migrated too 2026-08-02 21:22:05 +02:00
okf-check.test.mjs fix(okf-check): required and recommended fields are read at top level only 2026-08-01 19:57:29 +02:00
okf-frontmatter.mjs test(catalog): flip red-nested-key -> green-nested-key (okr's checker converged) 2026-08-09 20:49:32 +02:00
release-plugin.mjs fix(scripts): run check-versions BEFORE release-plugin writes, not after 2026-08-10 20:34:38 +02:00
release-plugin.test.mjs fix(scripts): run check-versions BEFORE release-plugin writes, not after 2026-08-10 20:34:38 +02:00