Skip to content

2.0.9 — BOM-safe records, a real re-exec fallback, and doc fixes

Choose a tag to compare

@czcdr czcdr released this 18 Oct 07:35
· 30 commits to main since this release

Fixed

  • scripts/setup.mjs read JSON records without stripping the UTF-8 BOM. The shim already did, so the same mirror.json meant "there is a checkout" to the shim and "there is none" to setup — a mirrored setup re-mirrored the previous manifest and provisioned from it. bundle.json was read as "nothing is provisioned" for the same reason. Both files now use the same readJson().
  • The re-exec fallback was a silent exit 0. When the plugin's launcher could not be started, the promise resolved as if it had taken over: the process ended with status 0 and the row looked healthy with no tools behind it. It now settles only when the child cannot be started (or dies with the source file already gone), and main() continues with the mirrored copy.
  • An upgrade race that node sees but spawn does not — a launcher replaced between the hash comparison and node startup now falls back instead of leaving a dead MCP row.
  • Mojibake in user-visible output — 16 em-dashes in bin/rea-shim.mjs had been written as 鈥? by a GBK editor in 2.0.7; two of them were stderr messages every operator sees.
  • A checkout copy no longer hops into the installed plugin, so a developer tests the edit in front of them instead of another copy.
  • systemReaCandidates dedupes on the platform argument (test seam only; no production change).

Docs / CI

  • Both READMEs pin the current version, and the pin is checked against package.json locally and in CI.
  • docs/bundle-design.md covers 2.0.7's launch mode and 2.0.8's mirror self-healing.
  • New guards: the READMEs must quote engines.dsh verbatim; neither JSON reader may parse a file without stripping the BOM.

Verification

  • 71 tests (68 pass + 3 platform skips), verify-branch.ps1 44/44, audit-manifest clean, host-compat 10 covered / 5 outside.
  • npm payload: 21 files, 285,492 B.

Upgrading

From 2.0.0–2.0.7 run node scripts/setup.mjs once after the upgrade — the mirror self-healing that makes later upgrades automatic arrived in 2.0.8, so an older mirror cannot carry it.

The mirrored scripts/setup.mjs is not self-healing either: it is still the copy made when the bundle was created. Running setup from the plugin directory once refreshes it (and from 2.0.9 that copy strips a UTF-8 BOM from mirror.json / bundle.json, like the shim already did).