@twinsearth/w2m-dsh-plugin 0.9.3 → 0.9.4

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 CHANGED
@@ -4,6 +4,49 @@ 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.9.4] — 2026-10-14
8
+
9
+ **A note that promised a verdict the relay no longer delivers, and the test that had locked the promise in.**
10
+
11
+ ### What v0.9.3 left behind
12
+
13
+ v0.9.3 made the relay skip an anchor nobody declared, so an unanchored dispatch now aggregates normally —
14
+ the live relay returns `state: consistent`, `counts.ok: 1` for a command that used to come back
15
+ `unverifiable`. The plugin, however, still opened every such dispatch with:
16
+
17
+ > this machine's working tree could not be fingerprinted, so peers have no anchor to match and
18
+ > **the aggregate will be unverifiable**
19
+
20
+ which was true when it was written and is now false. The fixed mechanism had been left with a sentence
21
+ telling operators to doubt a verdict that is correct, so the note now says what is actually the case:
22
+
23
+ > this machine's working tree could not be fingerprinted, so no anchor was declared: peers are compared
24
+ > with each other, not against a named tree
25
+
26
+ ### The test had encoded the promise
27
+
28
+ `test/tools.test.mjs` asserted `assert.match(value.note, /unverifiable/)`, so fixing the wording broke
29
+ the suite — and the tempting repair is to put the sentence back and keep the suite green. That would have
30
+ been the wrong way round: **the test was guarding a claim, not a behaviour.** It now asserts the claim:
31
+
32
+ - the note must state that no anchor was declared;
33
+ - it must state what that costs — agreement between peers, not with a named tree;
34
+ - and `assert.doesNotMatch(value.note, /unverifiable/)`, so the stale promise cannot be written back in.
35
+
36
+ The third is the one that earns its place. A positive match on a *new* sentence would have passed too and
37
+ guarded nothing; the negative case is what stops the old sentence returning.
38
+
39
+ ### Verified
40
+
41
+ - `test/relay.test.mjs` — 152 tests, 0 failures.
42
+ - `test/claims.test.mjs` — 47 pass. It caught this release's own omission on the first run: the version
43
+ was bumped to 0.9.4 while the newest CHANGELOG entry still said 0.9.3, and it refused with *"One of them
44
+ is the release; the other is a mistake."* Correct, and the reason this entry exists.
45
+ - `test/tools.test.mjs` — 90 pass, 1 failure: `w2m_run computes base_commit and base_tree from a real git
46
+ work tree`, which fails with `spawn git ENOENT` because **git is not installed on this host**. That is
47
+ the same environmental cause as the 38 `declared suite` failures, not a regression.
48
+ - `eslint .` — 0 errors, 127 warnings.
49
+
7
50
  ## [0.9.3] — 2026-10-14
8
51
 
9
52
  **An undeclared anchor was compared against the literal `null`, so every dispatch from a non-git machine was `unverifiable` — including the ones that succeeded.**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twinsearth/w2m-dsh-plugin",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
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",
@@ -180,7 +180,7 @@ const MAX_STAGES = 16;
180
180
  * `package.json` during `scripts/pack.mjs` rather than hand-maintained, and `W2M_PLUGIN_VERSION`
181
181
  * overrides it at runtime for tests and packagers.
182
182
  */
183
- const PLUGIN_VERSION = '0.9.3';
183
+ const PLUGIN_VERSION = '0.9.4';
184
184
 
185
185
  /** How long any single HTTP call may take before it is aborted, in milliseconds. */
186
186
  const DEFAULT_REQUEST_TIMEOUT_MS = 15_000;
@@ -3874,8 +3874,21 @@ export async function apply(ctx, config = {}) {
3874
3874
  session: sessionKey,
3875
3875
  ...selectionReason,
3876
3876
  },
3877
+ /**
3878
+ * The note has to match what the relay will actually do.
3879
+ *
3880
+ * It used to read "...and the aggregate will be unverifiable", which was true when the relay
3881
+ * compared an absent anchor against the literal `null`: every machine with a real commit
3882
+ * violated it, so an unanchored dispatch could never aggregate. v0.9.3 made the relay skip a
3883
+ * check nobody declared (`base_commit` now behaves like `base_tree` always did), so the same
3884
+ * dispatch reaches a real verdict -- and the old wording would have told an operator to doubt
3885
+ * an `ok` result that is correct.
3886
+ *
3887
+ * What is still true, and is the thing worth saying: without an anchor there is no answer to
3888
+ * "did these machines run the same tree", so consistency here is agreement between machines.
3889
+ */
3877
3890
  note: anchors.base_tree === null
3878
- ? 'this machine\'s working tree could not be fingerprinted, so peers have no anchor to match and the aggregate will be unverifiable'
3891
+ ? 'this machine\'s working tree could not be fingerprinted, so no anchor was declared: peers are compared with each other, not against a named tree'
3879
3892
  : 'peers are checked against base_commit + base_tree + command_hash',
3880
3893
  },
3881
3894
  null,