Repository navigation
Commit 6f731c8
fix(plugin): repoint the stable plugin link with unlinkSync, which Node 25.0-25.3's rmSync cannot do
ensureSymlink removed the old link with `rmSync(link, { force: true })`. On Node 23.0-24.13.0 and
25.0-25.3.x, rmSync's C++ port checks the path with std::filesystem::status(), which FOLLOWS symlinks
(nodejs/node#61040, merged 2025-12-23, shipped in 24.13.1 and 25.4.0; 22.x was never affected). So
on this machine's Node v25.2.1:
- a link to a directory throws ERR_FS_EISDIR, so the primitive could never repoint the stable
worker-plugin path — the case the whole stable-path design rests on (a live worker's reload
observing a new build);
- a DANGLING link (its build cleaned away) is reported missing, `force` swallows that, the link
stays, and the symlinkSync after it throws EEXIST.
Scope: ensureSymlink / stageStablePluginDir have NO production caller yet — 4857ee8 added the
module as "not yet wired into either launcher" and that is still true. So no shipped Frizz ever hit
this; it is a bug in the primitive that would have shipped the day it is wired in, on any Node the
engines field (`^22.13.0 || >=23.4.0`) admits in the affected ranges. Not WSL-specific, as first
suspected.
Measured 2026-10-02 with the same probe on every Node installed here: v20.20.0, v22.18.0 and
v24.14.1 remove the link; v25.2.1 throws EISDIR, and leaves a dangling link in place silently.
lstat has already proved the path is a symlink, so unlinkSync is exact: it removes the link on
every Node and every platform (libuv's unlink handles Windows directory links and junctions).
Tests: the two failing stable-plugin-path tests pass again; a new one pins the dangling-link
repoint. Negative control: restoring rmSync fails three tests (two EISDIR, the new one EEXIST).
The fixed file passes 10/10 on Node 22.18.0, 24.14.1 and 25.2.1.
project-root.test.ts "home reached through a symlink" failed for the same reason, but only in
its finally block, after every assertion had passed — and the throw skipped removing the temp
home too, so each run leaked a link and a directory into /tmp. Its cleanup now unlinks the link.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 5f3adff commit 6f731c8
3 files changed
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
44 | 61 | | |
45 | 62 | | |
46 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
0 commit comments