Repository navigation
2.0.9 — BOM-safe records, a real re-exec fallback, and doc fixes
Fixed
scripts/setup.mjsread JSON records without stripping the UTF-8 BOM. The shim already did, so the samemirror.jsonmeant "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.jsonwas read as "nothing is provisioned" for the same reason. Both files now use the samereadJson().- 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
nodestartup now falls back instead of leaving a dead MCP row. - Mojibake in user-visible output — 16 em-dashes in
bin/rea-shim.mjshad 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.
systemReaCandidatesdedupes on theplatformargument (test seam only; no production change).
Docs / CI
- Both READMEs pin the current version, and the pin is checked against
package.jsonlocally and in CI. docs/bundle-design.mdcovers 2.0.7's launch mode and 2.0.8's mirror self-healing.- New guards: the READMEs must quote
engines.dshverbatim; neither JSON reader may parse a file without stripping the BOM.
Verification
- 71 tests (68 pass + 3 platform skips),
verify-branch.ps144/44,audit-manifestclean,host-compat10 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).