@twinsearth/w2m-dsh-plugin 0.9.3 → 0.9.5

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,80 @@ 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.5] — 2026-10-14
8
+
9
+ **Same code as v0.9.4; published because v0.9.4's npm and GitHub bytes cannot be made to agree.**
10
+
11
+ ### Why this version exists
12
+
13
+ v0.9.4 was published, then amended minutes later to replace a comment that quoted a retired message
14
+ verbatim. GitHub's tag and assets were moved to the corrected commit. **npm could not follow**: a
15
+ published version cannot be overwritten, and this account's token cannot unpublish either, so npm keeps
16
+ the pre-amendment bytes permanently.
17
+
18
+ The difference is one comment. It is recorded here rather than papered over because a divergence that is
19
+ discovered later and unexplained costs more than a version number:
20
+
21
+ | Where | v0.9.4 | Carries |
22
+ |---|---|---|
23
+ | npm | `sha256:570f5175…` (870353 b) | the comment that quotes the retired sentence |
24
+ | GitHub | `sha256:ab7b60dc…` (870448 b) | the corrected comment |
25
+
26
+ Both run **identically** — the changed bytes are inside a `/** */` block. `latest` on npm now points at
27
+ 0.9.5, which is byte-consistent with its GitHub release, so the divergence is confined to a superseded
28
+ patch of one patch version.
29
+
30
+ ### Verified
31
+
32
+ - `test/relay.test.mjs` 152 pass, `test/claims.test.mjs` 47 pass, `test/chatops-account.test.mjs` pass —
33
+ 242 tests, 0 failures, 0 cancelled.
34
+ - `eslint .` — 0 errors.
35
+ - The precise check on the shipped tree: the retired sentence appears **0 times in code and 0 times in
36
+ comments**; the corrected sentence appears once, at the assignment.
37
+
38
+ ## [0.9.4] — 2026-10-14
39
+
40
+ **A note that promised a verdict the relay no longer delivers, and the test that had locked the promise in.**
41
+
42
+ ### What v0.9.3 left behind
43
+
44
+ v0.9.3 made the relay skip an anchor nobody declared, so an unanchored dispatch now aggregates normally —
45
+ the live relay returns `state: consistent`, `counts.ok: 1` for a command that used to come back
46
+ `unverifiable`. The plugin, however, still opened every such dispatch with:
47
+
48
+ > this machine's working tree could not be fingerprinted, so peers have no anchor to match and
49
+ > **the aggregate will be unverifiable**
50
+
51
+ which was true when it was written and is now false. The fixed mechanism had been left with a sentence
52
+ telling operators to doubt a verdict that is correct, so the note now says what is actually the case:
53
+
54
+ > this machine's working tree could not be fingerprinted, so no anchor was declared: peers are compared
55
+ > with each other, not against a named tree
56
+
57
+ ### The test had encoded the promise
58
+
59
+ `test/tools.test.mjs` asserted `assert.match(value.note, /unverifiable/)`, so fixing the wording broke
60
+ the suite — and the tempting repair is to put the sentence back and keep the suite green. That would have
61
+ been the wrong way round: **the test was guarding a claim, not a behaviour.** It now asserts the claim:
62
+
63
+ - the note must state that no anchor was declared;
64
+ - it must state what that costs — agreement between peers, not with a named tree;
65
+ - and `assert.doesNotMatch(value.note, /unverifiable/)`, so the stale promise cannot be written back in.
66
+
67
+ The third is the one that earns its place. A positive match on a *new* sentence would have passed too and
68
+ guarded nothing; the negative case is what stops the old sentence returning.
69
+
70
+ ### Verified
71
+
72
+ - `test/relay.test.mjs` — 152 tests, 0 failures.
73
+ - `test/claims.test.mjs` — 47 pass. It caught this release's own omission on the first run: the version
74
+ was bumped to 0.9.4 while the newest CHANGELOG entry still said 0.9.3, and it refused with *"One of them
75
+ is the release; the other is a mistake."* Correct, and the reason this entry exists.
76
+ - `test/tools.test.mjs` — 90 pass, 1 failure: `w2m_run computes base_commit and base_tree from a real git
77
+ work tree`, which fails with `spawn git ENOENT` because **git is not installed on this host**. That is
78
+ the same environmental cause as the 38 `declared suite` failures, not a regression.
79
+ - `eslint .` — 0 errors, 127 warnings.
80
+
7
81
  ## [0.9.3] — 2026-10-14
8
82
 
9
83
  **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.5",
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.5';
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,23 @@ 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 end by promising that the aggregate would be unverifiable, which was true when
3881
+ * the relay compared an absent anchor against the literal `null`: every machine with a real
3882
+ * commit violated it, so an unanchored dispatch could never aggregate. v0.9.3 made the relay
3883
+ * skip a check nobody declared (`base_commit` now behaves like `base_tree` always did), so the
3884
+ * same dispatch reaches a real verdict -- and the old wording would have told an operator to
3885
+ * doubt an `ok` result that is correct. The sentence is deliberately not reproduced here: a
3886
+ * verbatim copy of retired output is indistinguishable from live output to anything that
3887
+ * searches rather than reads, including the check that verified this change.
3888
+ *
3889
+ * What is still true, and is the thing worth saying: without an anchor there is no answer to
3890
+ * "did these machines run the same tree", so consistency here is agreement between machines.
3891
+ */
3877
3892
  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'
3893
+ ? '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
3894
  : 'peers are checked against base_commit + base_tree + command_hash',
3880
3895
  },
3881
3896
  null,