@twinsearth/w2m-dsh-plugin 0.10.4 → 0.10.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 +60 -0
- package/FLEET-RULES.md +146 -0
- package/package.json +2 -1
- package/src/plugin/tools.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,66 @@ 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.10.5] — 2026-10-15
|
|
8
|
+
|
|
9
|
+
**FLEET-RULES.md enters the tree, with this host's reachability measured and written down.**
|
|
10
|
+
|
|
11
|
+
### What was actually wrong
|
|
12
|
+
|
|
13
|
+
The 1.0.0 objective starts with *"local Windows and MacMini jointly"*, and on inspection the Windows host
|
|
14
|
+
had never been a git participant at all: its working copy was not a repository, and every release so far had
|
|
15
|
+
been published through the GitHub REST API rather than through git. That is a real gap and it was recorded
|
|
16
|
+
as one rather than glossed over.
|
|
17
|
+
|
|
18
|
+
### Why it was that way, measured rather than assumed
|
|
19
|
+
|
|
20
|
+
`github.com:443` is unreachable from this host while every other GitHub endpoint answers. Three consecutive
|
|
21
|
+
`git fetch` attempts failed after ~21 s each, and from the same process minutes apart:
|
|
22
|
+
|
|
23
|
+
| Endpoint | Result |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `github.com:443` | **TIMEOUT** |
|
|
26
|
+
| `api.github.com:443` | OPEN 73 ms |
|
|
27
|
+
| `codeload.github.com:443` | OPEN 77 ms |
|
|
28
|
+
| `ssh.github.com:443` | OPEN 95 ms |
|
|
29
|
+
| `objects.githubusercontent.com:443` | OPEN 228 ms |
|
|
30
|
+
|
|
31
|
+
The blocking is **per hostname, not per port** — `ssh.github.com` answers on the same 443 that `github.com`
|
|
32
|
+
does not. It is also **intermittent at the TCP layer**: a raw `net.connect` to `20.205.243.166:443` timed out
|
|
33
|
+
while a `tls.connect` to the same IP with `servername: 'github.com'` completed `authorized: true` on TLS 1.3.
|
|
34
|
+
An intermittent block is worse than a solid one, because a single success is not evidence the path works.
|
|
35
|
+
|
|
36
|
+
The first two attempts at this treated the failure as a configuration problem and tried proxy settings and
|
|
37
|
+
retries. Both were wrong, and both cost a round. The measurements are cheaper to read than to repeat, which
|
|
38
|
+
is why they are now rule 8 of `FLEET-RULES.md` rather than a note in a session log.
|
|
39
|
+
|
|
40
|
+
### What now works, and what the evidence is
|
|
41
|
+
|
|
42
|
+
The repository is materialised from a `codeload` tarball (the one path that is reachable), giving a real git
|
|
43
|
+
work tree containing exactly `main` — verified by hashing both trees: **227 files, 0 differences,
|
|
44
|
+
`IDENTICAL`**. `scripts/fleet-sync.mjs` then ran against a real repository for the first time, having only
|
|
45
|
+
ever been tested against a temporary one:
|
|
46
|
+
|
|
47
|
+
| Step | Result |
|
|
48
|
+
|---|---|
|
|
49
|
+
| initial | `state=up-to-date action=none` |
|
|
50
|
+
| local commit | `state=ahead action=push ahead=1` |
|
|
51
|
+
| `--write` | `performed: true - pushed 1 commit(s)`; mirror and HEAD agree |
|
|
52
|
+
| peer commit arrives | `state=behind action=fast-forward behind=1` |
|
|
53
|
+
| `--write` | `performed: true - now at d42d5c0`; 228 files, peer file present |
|
|
54
|
+
| final | `state=up-to-date action=none` |
|
|
55
|
+
|
|
56
|
+
The same run also demonstrated the refusal path for free: when a fast-forward was rejected by git, the
|
|
57
|
+
result was `performed: false`, the tree was **left untouched**, and the state stayed `behind` — an automatic
|
|
58
|
+
sync that fails must not half-apply.
|
|
59
|
+
|
|
60
|
+
### Stated plainly rather than implied
|
|
61
|
+
|
|
62
|
+
This host can *pull* the truth and can *run* the sync machinery, but it **cannot push over git**. A round
|
|
63
|
+
that needs a commit published must use the API, and a round that exercises `fleet-sync` must do it against a
|
|
64
|
+
local bare remote. That is a real test of the state machine and **not** a test of the network, and the
|
|
65
|
+
difference is written into the rule so it is not mistaken for one.
|
|
66
|
+
|
|
7
67
|
## [0.10.4] — 2026-10-15
|
|
8
68
|
|
|
9
69
|
**A result channel over exit codes, for machines whose text cannot be read back.**
|
package/FLEET-RULES.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Fleet working rules
|
|
2
|
+
|
|
3
|
+
Standing rules for every machine and every session in this fleet. These are **rules**, not notes: a
|
|
4
|
+
session that finds itself working around one of these is either misreading it or should be proposing an
|
|
5
|
+
amendment, not quietly making an exception.
|
|
6
|
+
|
|
7
|
+
Established 2026-10-14/15. Amended by appending with a date and a reason — never by deleting, because
|
|
8
|
+
*"we believed X until we measured Y"* is itself knowledge, and it is what stops the same wrong conclusion
|
|
9
|
+
being reached twice.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Broadcast, sync, merge — automatically, in the same fleet
|
|
14
|
+
|
|
15
|
+
**Added 2026-10-15 at the operator's instruction.**
|
|
16
|
+
|
|
17
|
+
Any machine that is in the same fleet **broadcasts its state, syncs from the fleet, and merges without
|
|
18
|
+
being asked**. This is not an optimisation; it is the rule that removes the class of work that produced
|
|
19
|
+
2026-10-14's largest time sink — a session holding one copy of the truth on one machine while another
|
|
20
|
+
machine held a different copy, and a human having to notice.
|
|
21
|
+
|
|
22
|
+
### What the rule means concretely
|
|
23
|
+
|
|
24
|
+
| Verb | Obligation |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Broadcast** | Before finishing a unit of work, publish what changed to the shared record — commit to the remote, not to a local branch nobody else can see. |
|
|
27
|
+
| **Sync** | On starting a unit of work, fetch. A machine that has not fetched does not know what it is working on. |
|
|
28
|
+
| **Merge** | Reconcile rather than choose. Two machines that both changed something must end with one tree, not with one machine's version silently winning. |
|
|
29
|
+
|
|
30
|
+
### The shared record is the remote
|
|
31
|
+
|
|
32
|
+
One repository, one remote, `main` as the integration point. Local-only work is not broadcast, and a
|
|
33
|
+
branch that is not pushed is a branch no other machine can sync from — which is why a work-in-progress
|
|
34
|
+
reaches another machine as a **pushed branch**, never as a file copied by hand.
|
|
35
|
+
|
|
36
|
+
### What must never be merged
|
|
37
|
+
|
|
38
|
+
- **A tree that has not passed its own tests.** Merge is not the place to discover a failing suite. The
|
|
39
|
+
rule is: run the suite where the change will land, and merge after it is green.
|
|
40
|
+
- **Generated or machine-local state.** `dist/`, `node_modules/`, `memory.jsonl`, state directories and
|
|
41
|
+
credentials are per-machine facts; broadcasting them would spread one machine's local state over
|
|
42
|
+
another's. The repository already excludes these at the release boundary, and the same list applies
|
|
43
|
+
here.
|
|
44
|
+
- **Anything a machine could not itself verify.** An unverified claim is broadcast as *unverified*, never
|
|
45
|
+
as a fact — see rule 4.
|
|
46
|
+
|
|
47
|
+
### Why the rule is safe to apply automatically
|
|
48
|
+
|
|
49
|
+
Git's fast-forward is the common case: one machine ahead, everyone else behind. A genuine divergence is
|
|
50
|
+
the case that needs judgement, so the automation is: **fast-forward automatically, rebase automatically
|
|
51
|
+
when the local work is not yet published, and stop and report when both sides have published** — because
|
|
52
|
+
that is the only case where merging could discard someone's verified work.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 2. Do not claim a mechanism works from a scheduling record
|
|
57
|
+
|
|
58
|
+
Added 2026-10-14, after two mistakes in one session.
|
|
59
|
+
|
|
60
|
+
A dispatch being accepted, a lease being granted, and a verdict arriving are three different
|
|
61
|
+
observations. The reliable evidence is **a side effect on the target machine**, or **an exit code that
|
|
62
|
+
nothing else would produce**. "The relay said `exit_code: 0`" is not evidence that a command ran until
|
|
63
|
+
something else corroborates it.
|
|
64
|
+
|
|
65
|
+
## 3. Run the suite where the change will land
|
|
66
|
+
|
|
67
|
+
Added 2026-10-14. A green suite on the development host and a green suite on the target machine are
|
|
68
|
+
different claims, and only the second one supports a merge. `scripts/` and `test/` are absent from the
|
|
69
|
+
published tarball by design, so "it passes at home" cannot be checked from an installed copy.
|
|
70
|
+
|
|
71
|
+
## 4. Mark what could not be verified
|
|
72
|
+
|
|
73
|
+
Added 2026-10-14. If a check cannot run here — no network, no installation, no credential — it is reported
|
|
74
|
+
as `UNVERIFIED` with the reason, never as a pass. An unverifiable check is not a passing check.
|
|
75
|
+
|
|
76
|
+
## 5. Facts carry their date and how they were measured
|
|
77
|
+
|
|
78
|
+
Added 2026-10-14, from `fleet-memory.md`.
|
|
79
|
+
|
|
80
|
+
A fact without provenance is a rumour that outlives the person who could have checked it. Correct in
|
|
81
|
+
place with a note rather than deleting: the correction is part of the record.
|
|
82
|
+
|
|
83
|
+
## 6. Machine roles are not interchangeable
|
|
84
|
+
|
|
85
|
+
Added 2026-10-14.
|
|
86
|
+
|
|
87
|
+
| Machine | Role | Constraint |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| the Linux relay host | relay, STUN, archive, and the development shell over SSH | no personal data |
|
|
90
|
+
| MacMini | real-machine work: deploy, run, test, verify, report, and now development | no personal data |
|
|
91
|
+
| `ToFuture` (the DSH host) | orchestration | **hard-protected**: nothing outside the session workspace or non-system `C:` folders without the operator typing the password |
|
|
92
|
+
| other Windows hosts | as MacMini | — |
|
|
93
|
+
|
|
94
|
+
## 7. A note about the rule itself
|
|
95
|
+
|
|
96
|
+
Rule 1 says merge automatically. That is a real transfer of authority from the human to the machines, and
|
|
97
|
+
it is only defensible while the checks in rules 2, 3 and 4 hold: **automatic merging is safe exactly to
|
|
98
|
+
the extent that "green" is trustworthy.** If a suite is ever found to pass without testing what it names
|
|
99
|
+
— which happened twice on 2026-10-14, once in a cycle-detection test that asserted nothing — then this
|
|
100
|
+
rule is the thing that spreads the damage. So a test that does not test is not a small defect here; it is
|
|
101
|
+
a hole in the merge gate.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 8. This host's reachability, measured — do not re-derive it
|
|
106
|
+
|
|
107
|
+
**Added 2026-10-15 after round 3 of the 1.0.0 goal, because the same wrong assumption cost three rounds.**
|
|
108
|
+
|
|
109
|
+
The Windows host that writes this file cannot reach `github.com:443`. Measured, not inferred: three
|
|
110
|
+
consecutive `git fetch` attempts each failed after ~21 s with *"Failed to connect ... Could not connect to
|
|
111
|
+
server"*, while the following, probed from the same process minutes apart, all succeeded:
|
|
112
|
+
|
|
113
|
+
| Endpoint | Result |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `github.com:443` | **TIMEOUT** |
|
|
116
|
+
| `api.github.com:443` | OPEN 73 ms |
|
|
117
|
+
| `codeload.github.com:443` | OPEN 77 ms |
|
|
118
|
+
| `ssh.github.com:443` | OPEN 95 ms |
|
|
119
|
+
| `objects.githubusercontent.com:443` | OPEN 228 ms |
|
|
120
|
+
|
|
121
|
+
The blocking is **per hostname, not per port** — `ssh.github.com` answers on the same 443 that
|
|
122
|
+
`github.com` does not. It is also **intermittent at the TCP layer**: a raw `net.connect` to
|
|
123
|
+
`20.205.243.166:443` timed out while a `tls.connect` to the same IP with `servername: 'github.com'`
|
|
124
|
+
completed with `authorized: true` and TLS 1.3. An intermittent block is worse than a solid one, because a
|
|
125
|
+
single success is not evidence that the path works.
|
|
126
|
+
|
|
127
|
+
### What this means in practice, so the next session does not repeat it
|
|
128
|
+
|
|
129
|
+
* **`git clone` / `git fetch` / `git push` over HTTPS do not work on this host.** Do not build a plan
|
|
130
|
+
around them and do not retry them hoping for a different result.
|
|
131
|
+
* **The working path to materialise the repository is a tarball from `codeload`**:
|
|
132
|
+
`https://codeload.github.com/TwinsEarth/dsh-windows2macos/tar.gz/refs/heads/main`, unpacked with
|
|
133
|
+
`tar --strip-components=1` into a directory that is then `git init`-ed. That yields a real work tree
|
|
134
|
+
containing exactly `main`, which is what `fleet-sync` needs.
|
|
135
|
+
* **Publishing from this host goes through the REST API**, not through git. Every release so far was
|
|
136
|
+
pushed that way.
|
|
137
|
+
* **The consequence to state plainly:** this host can *pull* the truth and can *run* the sync machinery, but
|
|
138
|
+
it cannot *push* over git. A round that needs a commit published must use the API, and a round that needs
|
|
139
|
+
`fleet-sync` exercised must do it against a local bare remote — which is a real test of the state
|
|
140
|
+
machine, and is **not** a test of the network.
|
|
141
|
+
|
|
142
|
+
### Why this is a rule and not a note
|
|
143
|
+
|
|
144
|
+
The first two attempts at "make Windows a git participant" assumed the failure was a configuration problem
|
|
145
|
+
and tried proxy settings and retries. Both were wrong, and both cost a round. **The measurements above are
|
|
146
|
+
cheaper to read than to repeat.**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twinsearth/w2m-dsh-plugin",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.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",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"CHANGELOG.md",
|
|
30
30
|
"HANDOFF.md",
|
|
31
31
|
"ROADMAP.md",
|
|
32
|
+
"FLEET-RULES.md",
|
|
32
33
|
"LICENSE",
|
|
33
34
|
"PROTOCOL.md",
|
|
34
35
|
"PROTOCOL-v0.1.2.md",
|
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.10.
|
|
188
|
+
const PLUGIN_VERSION = '0.10.5';
|
|
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;
|