ktg-plugin-marketplace/scripts
Kjell Tore Guttormsen 06ede0ebe9 fix(scripts): a failing README write must surface, not read as "missing"
applyRelease()'s `try` spanned both the catalog README read AND its write, so a
real EACCES/ENOSPC on the write was swallowed and reported as readme:'missing'
("no catalog README to update") with verdict WROTE and exit 0 — a bumped ref
with a stale label, announced as success. Pre-existing form, not a regression.

The `try` now covers the READ only: a catalog without a README stays a tolerated
state, a README that cannot be written throws.

Known narrow guarantee: the throw propagates out of main() AFTER marketplace.json
is written, so the working tree is left half-applied (bumped ref, stale label).
That is the same hazard ac7ad42 closed for gate ordering — but strictly better
than today's silent exit 0, and widening the fix is not in scope here.

Test is path-selective on purpose: a fake that throws for every path dies on the
marketplace write above the try (in both the old and the new code) and would go
green against the unfixed file. Verified red before the fix.

Tests 25 -> 26 (suite total 131 -> 132).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A839v1MGa3Bm8icX8dTHYi
2026-08-10 21:00:40 +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): a failing README write must surface, not read as "missing" 2026-08-10 21:00:40 +02:00
release-plugin.test.mjs fix(scripts): a failing README write must surface, not read as "missing" 2026-08-10 21:00:40 +02:00