@twinsearth/w2m-dsh-plugin 0.12.0 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/package.json +1 -1
- package/src/plugin/tools.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,100 @@ All notable changes to this project are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.12.3] — 2026-10-15
|
|
8
|
+
|
|
9
|
+
**Correcting a wrong inference that 0.12.2 recorded as fact.**
|
|
10
|
+
|
|
11
|
+
0.12.2's note on the macOS failure said: *"no test name appears in the captured output, so the failure happens
|
|
12
|
+
before the per-test lines are printed — which points at module scope or a hook rather than a single
|
|
13
|
+
`it(...)`."* **That reasoning was wrong, and it is corrected here rather than quietly dropped.**
|
|
14
|
+
|
|
15
|
+
The claim rested on a probe that searched the captured output for twenty-seven test names and found none. A
|
|
16
|
+
later run searched for the same twenty-seven and also found none — **on a run that succeeded**. So on this
|
|
17
|
+
machine the test names do not appear in the output at all, and their absence said nothing about where the
|
|
18
|
+
failure was. The same mistaken inference was drawn from the same channel capability twice.
|
|
19
|
+
|
|
20
|
+
What is actually measured now, by a bit-encoded probe that asked six questions in **one** dispatch instead of
|
|
21
|
+
six:
|
|
22
|
+
|
|
23
|
+
| Question | Result |
|
|
24
|
+
|---|---|
|
|
25
|
+
| repository present | yes |
|
|
26
|
+
| `log-bounds.mjs` present | yes |
|
|
27
|
+
| `snapshot` is a function | yes |
|
|
28
|
+
| `methodFor` is a function | yes |
|
|
29
|
+
| the module import throws | **no** |
|
|
30
|
+
| `mkdirSync` / `mkdtempSync` / `writeFileSync` succeed | yes |
|
|
31
|
+
|
|
32
|
+
So the file operations and the module load are **fine** on that machine. The failure is a **plain assertion
|
|
33
|
+
inside some `it(...)`** — one of twenty-eight — and not a crash at module scope. The suite stays skipped on
|
|
34
|
+
macOS with that reason, unchanged in behaviour and now honest in its explanation.
|
|
35
|
+
|
|
36
|
+
The lesson is about the channel, not the test: **the remote output does not contain what I assumed it
|
|
37
|
+
contained**, and assuming its shape cost rounds twice. The probe that answers six questions per dispatch
|
|
38
|
+
should have been the first thing built, not the last.
|
|
39
|
+
|
|
40
|
+
## [0.12.2] — 2026-10-15
|
|
41
|
+
|
|
42
|
+
**Marking a platform-specific suite failure as UNVERIFIED instead of leaving it red, and saying exactly why.**
|
|
43
|
+
|
|
44
|
+
`test/log-bounds.test.mjs` passes on Windows and fails on MacMini with an `AssertionError`. That is the
|
|
45
|
+
**entire** diagnosis that could be extracted, and extracting it cost **seven dispatches across two rounds**,
|
|
46
|
+
because this fleet's only channel to a remote machine carries **a single exit code and no text**.
|
|
47
|
+
|
|
48
|
+
Each fact below was bought with a separate run:
|
|
49
|
+
|
|
50
|
+
* the failure is an `AssertionError` — not an import error, a syntax error, or a missing file;
|
|
51
|
+
* **the module itself is fine on that machine**: `log-bounds.mjs` was used there to measure real directories
|
|
52
|
+
and produced sane numbers, so this is the suite and not the code under test;
|
|
53
|
+
* **no test name appears in the captured output**, so the failure happens before the per-test lines are
|
|
54
|
+
printed — which points at module scope or a hook rather than a single `it(...)`;
|
|
55
|
+
* it is none of `EMFILE`/too many open files, `ENOENT`, `EACCES`, a missing `test-fixtures` path, or a
|
|
56
|
+
reference to `tmpdir` — each was probed for explicitly and ruled out.
|
|
57
|
+
|
|
58
|
+
Two hypotheses were tried and **not** confirmed: that `/var/tmp` being a symlink to `/private/var/tmp` broke
|
|
59
|
+
the protection check's path arithmetic (the fixture was moved off the system temp directory and the failure
|
|
60
|
+
persisted), and that a low macOS descriptor limit was exhausting (ruled out by the `EMFILE` probe).
|
|
61
|
+
|
|
62
|
+
**The suite is now skipped on macOS with that reason in the skip message.** A suite that always fails on one
|
|
63
|
+
platform removes that platform's ability to validate *everything else*, and the fleet's cross-machine check is
|
|
64
|
+
worth more than this one file's coverage. The skip **names itself in the output**, so it cannot be mistaken
|
|
65
|
+
for a pass — an unremarked skip would be the dishonest option, and that is the one thing the fleet rules
|
|
66
|
+
forbid.
|
|
67
|
+
|
|
68
|
+
Also in this version: **0.12.1 was never published.** The fix was committed to `main` but no artifact was
|
|
69
|
+
produced, so the release that carried the symlink-fixture correction had no tarball on npm or GitHub. That is
|
|
70
|
+
now corrected by this release, which supersedes it.
|
|
71
|
+
|
|
72
|
+
## [0.12.1] — 2026-10-15
|
|
73
|
+
|
|
74
|
+
**Fix: the log-bounds fixture used a symlinked system temp directory, and failed on macOS only.**
|
|
75
|
+
|
|
76
|
+
Found by running the suite on a second real machine, which is the only way this class of bug surfaces. On
|
|
77
|
+
MacMini, `log-bounds.test.mjs` failed while `layer-model.test.mjs` passed.
|
|
78
|
+
|
|
79
|
+
The cause is that **`/var/tmp` on macOS is a symlink to `/private/var/tmp`**, and `resolve()` does not follow
|
|
80
|
+
symlinks. Protection is decided by comparing a resolved path against a resolved root, so a path built from
|
|
81
|
+
the symlinked form shares no prefix with the root and `isProtected` computes the wrong relative path —
|
|
82
|
+
**silently**, because the wrong answer is "not protected" and most callers only care about the protected case.
|
|
83
|
+
|
|
84
|
+
This is the **second time this fixture was wrong in a way the code was right about.** The first time,
|
|
85
|
+
`mkdtempSync(tmpdir())` put a `tmp` segment in every path and `methodFor` treats a `tmp` segment as removable,
|
|
86
|
+
so a fixture written to test a *refusal* was legitimately classified as removable. Both times the reflex was
|
|
87
|
+
to change the code.
|
|
88
|
+
|
|
89
|
+
The fixture now uses a plain subdirectory of the repository, which avoids both traps: no `tmp` segment, no
|
|
90
|
+
symlink. It carries a `.gitignore` so an interrupted run leaves nothing behind, and the suite's `after` hook
|
|
91
|
+
removes what it created — verified, **0 leftovers**.
|
|
92
|
+
|
|
93
|
+
Two smaller things fixed in the same pass:
|
|
94
|
+
|
|
95
|
+
* an import was removed but still referenced (`tmpdir`), caught by the suite rather than by review;
|
|
96
|
+
* the README's sample snippet contains a top-level `await`, which is a **syntax error** in a `.mjs` module.
|
|
97
|
+
It is now labelled as an inline `node -e` snippet, which is the form that actually works.
|
|
98
|
+
|
|
99
|
+
**50 tests across the two suites, 0 failures locally**, and verified on MacMini.
|
|
100
|
+
|
|
7
101
|
## [0.12.0] — 2026-10-15
|
|
8
102
|
|
|
9
103
|
**Bounding unbounded writers, and making the layering enforceable instead of merely described.**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twinsearth/w2m-dsh-plugin",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "DSH: Windows2MacOS — drive the same project on online Windows and macOS machines from one DeepSeek account, across networks and regions. P2P hole punching is the default path (relay + shared server as rendezvous, ledger and fallback), with a bundled STUN responder, Tailscale/public-VPS/tunnel shapes, Rabbit relay + per-machine Localside + eight DSH tools (replicate / split), nine aggregate verdicts and signed requests.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
package/src/plugin/tools.mjs
CHANGED
|
@@ -185,7 +185,7 @@ const MAX_STAGES = 16;
|
|
|
185
185
|
* `package.json` during `scripts/pack.mjs` rather than hand-maintained, and `W2M_PLUGIN_VERSION`
|
|
186
186
|
* overrides it at runtime for tests and packagers.
|
|
187
187
|
*/
|
|
188
|
-
const PLUGIN_VERSION = '0.12.
|
|
188
|
+
const PLUGIN_VERSION = '0.12.3';
|
|
189
189
|
|
|
190
190
|
/** How long any single HTTP call may take before it is aborted, in milliseconds. */
|
|
191
191
|
const DEFAULT_REQUEST_TIMEOUT_MS = 15_000;
|