session-peer 0.2.1 → 0.3.1

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/RELEASING.md CHANGED
@@ -7,15 +7,117 @@ remain independent. The npm Trusted Publisher for `abruption/session-peer-ts`,
7
7
  uses OIDC and no npm token. The protected GitHub environment requires a reviewer
8
8
  and permits deployments from `main` only.
9
9
 
10
- ## Current public release — 0.2.0
10
+ ## 0.3.1 stable release procedure
11
+
12
+ 0.3.1 is a source candidate for the [reliability fixes](PARITY.md#031-reliability-fixes),
13
+ not a claim of public publication. Previous stable 0.3.0 integrity is pinned:
14
+ `sha512-mdtikUMrGmMrdVSvPXdJcZeouTeuixOTzGwFKPhN66ATZqTohu9HKbejgOwXJe0/zrO+nt9asCAzAEhiHWDYGA==`.
15
+ The public attestation metadata URL is
16
+ `https://registry.npmjs.org/-/npm/v1/attestations/session-peer@0.3.0`.
17
+ The script enforces the integrity, tags and registry origin of attestation URLs;
18
+ provenance contents and full URLs require separate manual comparison with the
19
+ dated public records. Preserve `preview=0.1.0-preview.1` and its pinned integrity.
20
+
21
+ 1. Merge the reviewed 0.3.1 preparation PR and require successful exact-main CI,
22
+ including Windows Node 22/24, CodeQL and the release gate.
23
+ 2. Confirm npm environment reviewers/main-only deployment policy, package
24
+ ownership/2FA and stage-only Trusted Publisher mapping. Inspect authenticated
25
+ `npm stage list session-peer`; stop on a conflicting stage.
26
+ 3. Require 0.3.1 absent, `latest=0.3.0` and `preview=0.1.0-preview.1`, and compare
27
+ the pinned integrity and public provenance records before approval.
28
+ 4. Obtain final approval naming the exact merged 40-character main SHA,
29
+ **0.3.1**, **stable-stage** and `latest` promotion to 0.3.1. Release preparation
30
+ does not authorize dispatch, and historical approvals cannot be replayed.
31
+ 5. Dispatch `publish.yml` with `mode=stable-stage`, `version=0.3.1`,
32
+ `source_sha=<approved main SHA>` and
33
+ `confirmation=session-peer@0.3.1 stable-stage`.
34
+ 6. Download the prepare job's `npm-release-<SHA>` artifact and apply the
35
+ documentation gate below before the separate protected npm environment approval.
36
+ 7. Record the stage ID and compare staged bytes with the retained artifact.
37
+ Separate final npm 2FA approval publishes 0.3.1 and promotes `latest`.
38
+ 8. On the exact source/artifact, run `release.mjs artifact` and `verify`, then
39
+ append dated public evidence to VALIDATION.md.
40
+
41
+ SSH endpoints must use the same TS version. 0.3.0 and 0.3.1 refuse each other;
42
+ coordinate upgrades. Preserve the known #20/#23 and Windows update-notice
43
+ validation limitations documented in PARITY.md. Do not claim fleet upgrades,
44
+ GitHub tags/releases or live-agent ACK from packaging or CI fixtures.
45
+
46
+ ## Public release checkpoint — 0.3.0 (2026-10-03 KST)
47
+
48
+ `session-peer@0.3.0` is public with `latest=0.3.0` and unchanged
49
+ `preview=0.1.0-preview.1`; see the [dated verification and documentation
50
+ discrepancy](VALIDATION.md#public-030--2026-10-03-kst). The published source is
51
+ `05418b21fcdef890826325d56b07bb3dabce3bb0`, not the later #91 documentation
52
+ correction. The completed steps below are history. Do not replay them or stage
53
+ 0.3.0 again; a later release requires a newly reviewed version, registry
54
+ baseline and exact source approval.
55
+
56
+ <a id="current-public-release--021"></a>
57
+
58
+ ## Public release checkpoint — 0.2.1 (2026-09-29 KST)
59
+
60
+ `session-peer@0.2.1` was published on 2026-09-29 KST. Public verification passed
61
+ with `latest=0.2.1` and unchanged `preview=0.1.0-preview.1`; see the
62
+ [dated 0.2.1 verification record](VALIDATION.md#public-021--2026-09-29-kst).
63
+ 0.2.0 was published on 2026-09-28 KST
64
+ ([record](VALIDATION.md#public-020--2026-09-28-kst)). The completed 0.2.1 and
65
+ 0.2.0 procedures below are history, not repeatable dispatches. A future release
66
+ requires a new reviewed version and baseline preparation PR.
67
+
68
+ <a id="030-stable-release-procedure"></a>
69
+
70
+ ## Completed 0.3.0 stable release procedure
71
+
72
+ The reviewed stable target is 0.3.0, the remote usability and maintenance
73
+ release ([changes and known limitations](PARITY.md#030-remote-usability-and-maintenance)).
74
+ Its preparation PR pins previous stable 0.2.1 integrity:
75
+ `sha512-bPjriJZf7OQ5niZafwxNgMYo0DVpZldELEjp640xAfBMjBCAJatT2hPMTG9oV7xDX2ULCPUmox9+vFWc5nw0Mg==`
76
+ (recorded attestation URL
77
+ `https://registry.npmjs.org/-/npm/v1/attestations/session-peer@0.2.1`; the script
78
+ checks only its registry origin).
79
+ The preview integrity remains pinned as a preservation check. No existing tag is
80
+ removed. These historical steps alone do not constitute public evidence; see
81
+ the [dated verification record](VALIDATION.md#public-030--2026-10-03-kst) for
82
+ the actual outcome and archive documentation discrepancy.
83
+
84
+ 1. Merge the reviewed 0.3.0 preparation PR into main and require successful
85
+ exact-main CI (including Windows Node 22/24, CodeQL and the release gate).
86
+ 2. Check npm environment reviewers and main-only deployment policy, package
87
+ ownership/2FA and stage-only Trusted Publisher mapping. Inspect pending stages
88
+ with authenticated `npm stage list session-peer`; stop on a conflicting stage.
89
+ 3. Require 0.3.0 absent, `latest=0.2.1` and `preview=0.1.0-preview.1`. The script
90
+ enforces these tags, the exact 0.2.1 and preview integrity values, and that their
91
+ attestation metadata URLs are on the npm registry origin. It does not pin
92
+ provenance contents or the full attestation URL; compare those manually with
93
+ the dated public records before approval.
94
+ 4. Obtain final approval naming the **exact merged main SHA** (40 characters),
95
+ **0.3.0**, **stable-stage** and `latest` promotion to 0.3.0. An instruction to
96
+ prepare the release does not identify a future merged SHA. Do not replay any
97
+ historical approval.
98
+ 5. Dispatch `publish.yml` on main with `mode=stable-stage`, `version=0.3.0`,
99
+ `source_sha=<approved 40-character main SHA>`, and
100
+ `confirmation=session-peer@0.3.0 stable-stage`.
101
+ 6. Before approving the protected npm environment, download the prepare job's
102
+ `npm-release-<SHA>` artifact and apply the documentation gate below, including
103
+ `docs/shorthand.md` and `docs/design/remote-deployment.md`.
104
+ 7. Staging uses Node 24/npm 11.15.0 (release-tool requirements in [Sources](#sources))
105
+ and OIDC with upload retries disabled. Record the stage ID, compare the staged
106
+ tarball with the retained artifact, and obtain the separate final npm 2FA
107
+ approval, which publishes 0.3.0 and promotes `latest`.
108
+ 8. After approval, run `node scripts/release.mjs artifact` and
109
+ `node scripts/release.mjs verify` on that exact source/artifact and append dated
110
+ public evidence to VALIDATION.md.
11
111
 
12
- `session-peer@0.2.0` was published on 2026-09-28 KST. Public verification passed
13
- with `latest=0.2.0` and unchanged `preview=0.1.0-preview.1`; see the
14
- [dated 0.2.0 verification record](VALIDATION.md#public-020--2026-09-28-kst).
15
- The 0.2.0 procedure below is completed history, not a repeatable dispatch.
16
- A future release requires a new reviewed version and baseline preparation PR.
112
+ Release notes must state that SSH requires the same version on both ends, so
113
+ 0.2.1 and 0.3.0 hosts refuse each other at preflight; upgrade endpoints together.
114
+ They must also list the known limitations: `--ssh-jump` is refused on Windows
115
+ clients (#20 Partial); the remote deployment design (#23) is a proposal whose
116
+ Windows cell and newest receipt/recovery rules are unvalidated; update notices
117
+ are opt-in, and their Windows refresh, failure and forged-field cells are
118
+ unverified.
17
119
 
18
- ## 0.2.1 stable release procedure
120
+ ## Completed 0.2.1 stable release procedure
19
121
 
20
122
  The reviewed stable target is 0.2.1, a reliability and hardening update
21
123
  ([changes](PARITY.md#021-reliability-and-hardening)). Previous stable 0.2.0
package/SECURITY.md CHANGED
@@ -14,7 +14,7 @@ homes, SQLite DBs, transcripts, browser profiles or .env files. Rotate exposed
14
14
  secrets with their provider; deleting a comment does not revoke a secret.
15
15
 
16
16
  Review is manual and best-effort, with no response or fix deadline. The project is
17
- a published npm client, with 0.2.0 release evidence in [VALIDATION.md](VALIDATION.md#public-020--2026-09-28-kst).
17
+ a published npm client, with 0.3.0 release evidence in [VALIDATION.md](VALIDATION.md#public-030--2026-10-03-kst).
18
18
  Reports on published versions and source commits are welcome; no maintenance
19
19
  window or backport promise exists. English and Korean reports are welcome. Disclosure
20
20
  is coordinated with the reporter; private reports are not automatically public.
package/VALIDATION.md CHANGED
@@ -1,11 +1,270 @@
1
- # Validation record — updated 2026-09-28 KST
1
+ # Validation record — updated 2026-10-04 KST
2
2
 
3
- This dated record covers public 0.2.0 verification and historical 0.1.0 public
4
- verification, candidate checks and live-agent observations. Older sections
3
+ This dated record covers the 0.3.1 source candidate and public 0.3.0, 0.2.1 and 0.2.0 verification, historical 0.1.0
4
+ public verification, candidate checks and live-agent observations. Older sections
5
5
  describe their stated checkpoint rather than current feature availability.
6
6
  It does not claim complete Python parity.
7
7
  Python reference: v1.0.2, commit `47c23713d0a2a3c11ebde6186afd8c43489b8b65`.
8
8
 
9
+ ## 0.3.1 candidate checks — 2026-10-04 KST
10
+
11
+ Source candidate on merged main `cb661ff4f323f637673d528f05992a2bb275fefc`
12
+ after #103, #101, #96, #95 and #102. The local runtime and fixture checks below
13
+ ran at checkpoint `71668d112929576d22a83b2dd269cfb98d3f567a`; later candidate
14
+ changes only add this dated record. See the [patch contracts](PARITY.md#031-reliability-fixes).
15
+ This section records preparation, not public 0.3.1 publication.
16
+
17
+ - macOS arm64, Node 24.16.0/npm 11.15.0; `npm ci --ignore-scripts`, build,
18
+ `test:types` and `npm test` passed: 151 tests, 146 passed, 5 Windows-only
19
+ skipped, 0 failed. Python conformance used the pinned 1.0.2 reference above.
20
+ The full suite includes `test/transport.test.ts`; a Windows command is not
21
+ evidence that this POSIX transport suite ran on Windows.
22
+ - The inactive storage fixture starts without a writer or lock holder. Its
23
+ valid saved-thread DB reports `activity=inactive`, `writerLock=absent` before
24
+ and after testing. Without opt-in it refuses before the storage guard; with
25
+ opt-in, dry-run validates without calling Codex and send queues exactly once.
26
+ Root bare and escaped `sqlite_home` settings and malformed configuration then
27
+ refuse without another queue call. Nested-only root/non-root doctor tests
28
+ use the normal diagnostic DB schema and do not authorize sending.
29
+ - Reply-To tests cover nested URI/agent confusion with zero SSH/queue calls,
30
+ and normal Claude names/Codex routes. SSH fixtures cover unnamed Claude PID
31
+ targets and malformed per-host outcomes without retry. Registry tests include
32
+ POSIX FIFO/race/size handling and healthy rows; UID 0 is simulated through
33
+ controlled identity observations with a real held native lock, not a root login.
34
+ - `test:package` passed the 51-file allowlist, reproducible packaging, clean
35
+ installation/removal and Bash/zsh shorthand contract/lifecycle. Repository
36
+ metadata, four-language docs/links and `git diff --check` passed. `npm audit`
37
+ reported 0 vulnerabilities. The exact runtime dependency `smol-toml@1.9.0`
38
+ is locked; it is installed as a dependency, not bundled into the allowlist.
39
+ - `release.mjs pack` and `artifact` passed at the checkpoint, including identical
40
+ repeated pack bytes and isolated `--ignore-scripts` install/version/list/removal.
41
+ The final documentation-only candidate is repacked and compared with source
42
+ in the preparation PR; its local artifact is not a future merged-main artifact.
43
+ - Registry preparation baseline: `latest=0.3.0`, `preview=0.1.0-preview.1`,
44
+ 0.3.1 absent. The helper pins the public 0.3.0 integrity recorded below and
45
+ retains the preview pin. No dispatch, npm stage/promotion, tag or fleet change
46
+ follows from these checks.
47
+
48
+ Windows evidence for the fixes is CI fixtures. Existing Windows-client jump,
49
+ remote deployment and update-notice validation gaps remain. Live-agent delivery
50
+ or ACK was not exercised by these fixture tests. Publication still requires the
51
+ new exact merged SHA/version/mode approval and runbook gates in RELEASING.md.
52
+
53
+ ## Public 0.3.0 — 2026-10-03 KST
54
+
55
+ `session-peer@0.3.0` was published at `2026-10-03T05:14:44.917Z`
56
+ (14:14:44.917 KST). The registry reports `latest=0.3.0` and unchanged
57
+ `preview=0.1.0-preview.1`.
58
+
59
+ - Published source: `05418b21fcdef890826325d56b07bb3dabce3bb0`, the #89 merge.
60
+ Its [exact-main CI](https://github.com/abruption/session-peer-ts/actions/runs/37096923337)
61
+ and [CodeQL](https://github.com/abruption/session-peer-ts/actions/runs/37096922981)
62
+ passed. The [stage-only publication run](https://github.com/abruption/session-peer-ts/actions/runs/37098738865)
63
+ completed prepare/publish; GitHub records `abruption` approving environment `npm`.
64
+ - Stage ID: `cc0797c4-fbde-4cb0-a01b-806ff8409b39`. The authenticated stage
65
+ download, retained Actions artifact and public registry tarball were compared
66
+ byte for byte. All were the same 184,811-byte, 51-file package.
67
+ - SHA-256: `96315c907339ed7f2def7ac3a02c40b621ca385448884eb69b7d2d975771b797`.
68
+ - Registry integrity:
69
+ `sha512-mdtikUMrGmMrdVSvPXdJcZeouTeuixOTzGwFKPhN66ATZqTohu9HKbejgOwXJe0/zrO+nt9asCAzAEhiHWDYGA==`.
70
+ - Public SLSA provenance matches the package SHA-512, source SHA, repository,
71
+ `.github/workflows/publish.yml` and run `37098738865/attempts/1`.
72
+ - From the exact published source/artifact, `release.mjs artifact` and `verify`
73
+ passed on macOS arm64, Node 24.16.0/npm 11.15.0. A fresh public install with
74
+ `--ignore-scripts` printed `session-peer 0.3.0 (typescript)`, listed no Claude
75
+ sessions in its isolated home, and uninstalled with its launcher removed.
76
+ `npm audit signatures` cryptographically verified registry signatures for
77
+ **3 packages** and attestations for **2 packages**; these are package counts.
78
+
79
+ ### Released documentation and scope
80
+
81
+ The released archive retains a stale migration sentence in PARITY.md claiming
82
+ that multi-host aggregation is absent, although its 0.3.0 feature contract and
83
+ runtime support ordered repeated `--host` results. [PR #91](https://github.com/abruption/session-peer-ts/pull/91)
84
+ corrected the source at `f6fedfc08c0f374eec1a3b5e2e6bfd09bc98dd71`.
85
+ That correction is **not in the immutable public 0.3.0 archive**; it will be
86
+ included when a later version is packaged. The corrected local candidate was
87
+ not the published artifact. No replacement stage or same-version republication
88
+ was executed after the public release was confirmed.
89
+
90
+ SSH still requires the same TS version on both ends: 0.2.1 and 0.3.0 refuse each
91
+ other at preflight. Coordinate endpoint upgrades. #20 remains partial for
92
+ Windows-client jump routing; #23's Windows deployment cell and newer Linux
93
+ receipt/recovery rules remain unvalidated. Update notices' Windows refresh,
94
+ failure and forged-field cells also remain unverified. Public installation
95
+ evidence above is local macOS evidence; Windows evidence is CI fixtures. No
96
+ fleet upgrade or GitHub tag/release is claimed by this record. The demo's actual
97
+ 0.2.1 ACK remains its own historical evidence.
98
+
99
+ ## 0.3.0 candidate checks — 2026-10-03 KST
100
+
101
+ Candidate source: main after #79, #84, #86, #85, #75 and #83 plus the 0.3.0
102
+ preparation PR. Changes and known limitations are listed in
103
+ [PARITY.md](PARITY.md#030-remote-usability-and-maintenance). The local checks
104
+ below ran at checkpoint `ed2548cda56f369a9d46fecf8c0c4ddbff2e5e78` on base
105
+ `b910cca6ba2f84d5ca6e4d5c234cafcaf3fcbd58`; later commits on the preparation PR
106
+ changed documentation only. Local macOS arm64,
107
+ Node 24.16.0/npm 11.15.0, with the pinned Python reference: 121 tests, 116
108
+ passed, 5 Windows-only skipped, 0 failed; `test:types`, package smoke (including
109
+ the Bash/zsh shorthand contract and lifecycle), repository checker and
110
+ `npm audit` (0 vulnerabilities) passed. Release `pack` and `artifact` validated
111
+ the 51-file allowlist, and an isolated `--ignore-scripts` install of the local
112
+ tarball into a temporary prefix printed `session-peer 0.3.0 (typescript)` and
113
+ uninstalled cleanly. The packaged READMEs and guides were read from that tarball.
114
+ Each included PR passed the full macOS/Linux/Windows Node 22/24 matrix,
115
+ CodeQL and the release gate on its head. These are fixture results, not
116
+ live-TUI ACKs and not public release evidence. At this candidate checkpoint,
117
+ publication still required the procedure in
118
+ [RELEASING.md](RELEASING.md#030-stable-release-procedure) and a dated public
119
+ record. Completed public evidence is recorded [above](#public-030--2026-10-03-kst).
120
+
121
+ ## Remote deployment workflow, POSIX cell (#23 F5) — 2026-10-02 KST
122
+
123
+ The operator workflow in
124
+ [docs/design/remote-deployment.md](docs/design/remote-deployment.md) was run by
125
+ hand on a user-provided Linux host (label `linux-x64-sandbox`). All work was
126
+ confined to a new, dedicated test directory that was removed afterwards; the
127
+ host itself is not disposable. Host egress could not be disabled, so offline
128
+ install flags were used and nothing was downloaded on the host. This covers
129
+ the **POSIX cell only**. The Windows cell has not been run, so the
130
+ F5 criterion of #23 remains open. Nothing outside a single test root on the
131
+ destination was written. No agent session was contacted, and no message was
132
+ submitted.
133
+
134
+ ### Environment
135
+
136
+ | Item | Value |
137
+ | --- | --- |
138
+ | Destination | Debian 13 (trixie), Linux 6.18, x86_64, glibc 2.41, non-root account without sudo, umask 0077 |
139
+ | SSH | Server OpenSSH_10.0p2 Debian-7+deb13u4. Client OpenSSH_10.3p1 with `BatchMode=yes`, `StrictHostKeyChecking=yes`, `ConnectTimeout=10`, the pre-pinned host-key alias, and no control socket. No host key was accepted or edited |
140
+ | Destination Node | None on PATH. Official `node-v24.21.0-linux-x64` (npm 11.19.0, ABI 137) and `node-v22.23.3-linux-x64` (npm 10.9.9, ABI 127) were unpacked inside the test root |
141
+ | Operator | macOS arm64, Node 24.16.0. `session-peer` 0.2.1 was installed from the verified tarball into a private temporary prefix, not globally |
142
+
143
+ ### Integrity (step 1, on the operator)
144
+
145
+ All of the following were verified on the operator before any upload.
146
+
147
+ - **`session-peer-0.2.1.tgz`**
148
+ - SHA-256 `6bf3c99d12260ce2e9421909b27326f1663ce6945aa798bc90ca1e17da675e43`, equal to the [0.2.1 record](#public-021--2026-09-29-kst).
149
+ - Integrity `sha512-bPjriJZf…5nw0Mg==`, equal to the registry value.
150
+ - SLSA provenance names commit `a9c42334da8f7faf83f0b9bb1fe52f1c695dfe8d` and `.github/workflows/publish.yml`.
151
+ - **Dependencies, pinned to that commit's `package-lock.json`**
152
+ - `fs-ext-extra-prebuilt-2.2.14.tgz`: SHA-256 `1a2b5bf6…a712`; SHA-512 matches the lockfile.
153
+ - `nan-2.29.0.tgz`: SHA-256 `038073cb…8af6`; SHA-512 matches the lockfile.
154
+ - **Registry signatures:** `npm audit signatures` in a scratch offline install reported 2 verified registry signatures and 1 verified attestation.
155
+ - **Node tarballs** (downloaded from nodejs.org): SHA-256 matched `SHASUMS256.txt` for v22.23.3 and v24.21.0. The OpenPGP signature on `SHASUMS256.txt` was **not** verified, because no `gpg` was available.
156
+ - **After upload:** the destination's `sha256sum` matched for every uploaded file.
157
+
158
+ ### Installs produced
159
+
160
+ All installs used `<node> <npm-cli.js> install --offline --ignore-scripts`
161
+ with an empty per-run cache, an empty `--userconfig` and an isolated `HOME`.
162
+ Each added 3 packages, and the staging `package-lock.json` integrity values
163
+ equal the release lockfile.
164
+
165
+ | Install | Recorded Node | id16 | Manifest SHA-256 | Files |
166
+ | --- | --- | --- | --- | --- |
167
+ | A | v24.21.0, ABI 137 | `3220dc6bc02772f0` | `65da80c7…f7f3f` | 153 |
168
+ | B (Node path change) | v22.23.3, ABI 127, different path | `d323791c5632ed2e` | `5e12598a…6aea5` | 153 |
169
+ | S (swap path) | v24.21.0 at a path later swapped | `111e7af6bc1de967` | — | 153 |
170
+
171
+ The identity JSON contained `package`, `version`, `sha256`, `lockIntegrity`,
172
+ `platform:"linux"`, `arch:"x64"`, `libc:"glibc"`, `nodeMajor`, `modules` and
173
+ the Node realpath (redacted here).
174
+
175
+ ### Results
176
+
177
+ | Step or case | Outcome |
178
+ | --- | --- |
179
+ | 2. Root trust | `lstat` from the account home down to the root: real directories, owned by the user, mode 700, no symlinks |
180
+ | 3. Staging | Created exclusively, mode 700; destination SHA-256 equal to the operator's |
181
+ | 5–6. Staging probe, with no final directory present | The self-locating wrapper printed `session-peer 0.2.1 (typescript)` under `env -i PATH=/usr/bin:/bin`. The native `flock` probe loaded from staging (Node 24 ABI 137; Node 22 ABI 127) |
182
+ | 7. Activation under lock | `mkdir` lock taken, target `absent`, `fs.renameSync` succeeded |
183
+ | 8. Post-activation checks | Real directory, owned, mode 700; staging gone; marker hash and name match; manifest matches; wrapper banner exact; native probe ok. The receipt was written, then the lock released |
184
+ | 8. Operator `doctor --host --remote-bin <absolute path> --json` (A, B and S) | `ok:true`, `diagnosticCompleted:true`, `implementation:"typescript"`, `version:"0.2.1"`, `ready:false` (no agents in the isolated home). Only A ran it **before** its receipt and lock release (see the order deviation below) |
185
+ | 8. Operator `send --host … --to 999999 --dry-run --json` (A and B) | `ok:false`, `error:"no_reachable_target"`, `status:"refused"`, `submitted:false`, exit 2. Not run for S |
186
+ | Same identity already installed | `already_provisioned`; this run's staging was discarded. Abbreviated: staging was created and classified without a second install |
187
+ | Foreign directory at the target | `foreign` (`no_valid_marker`). Activation refused with `target_exists`; retention removal refused with `foreign_refused`; the foreign file's SHA-256 was unchanged |
188
+ | Empty directory at the target | `empty`. Activation refused with `target_exists` |
189
+ | `rename(2)` on this kernel | Non-empty `ENOTEMPTY`; **empty replaced**; file `ENOTDIR`; symlink `ENOTDIR`; absent ok. This matches the ADR's stated POSIX scope |
190
+ | Python-style stub on a test-only PATH | Preflight with it as `--remote-bin` gave `remote_version_mismatch`. Its SHA-256 `19b6aab2…fec0` was identical before and after all cases |
191
+ | Lock contention | A second acquire gave `EEXIST` (`lock_held`) |
192
+ | Failed activation | A staging tree altered after its manifest was written activated, then post-activation checks failed (`manifest:false`). It was rolled back through `.failed-*` and deleted; the target was absent afterwards |
193
+ | Run died after activation (no receipt) | Lock `held`, `autoStale:false`; target `owned_no_receipt`. Break-lock naming another run was refused. After the operator journal confirmed that the run had ended, break-lock rolled back the unreceipted target. This was the rule at that date; the current ADR instead releases the old lock and recovers under a fresh lock, which is unvalidated |
194
+ | Run died after its receipt | Break-lock kept the install (`kept`) and removed only the lock; the install then classified as `already_provisioned` |
195
+ | Lock without `owner.json` | `held_unowned`, `autoStale:false`. A break naming a run was refused, and a new acquire was refused. It was removed only by an explicit unowned break |
196
+ | Same-path Node major swap 24→22 (install S) | **Undetected**, as the ADR states: the wrapper exited 0 with the exact banner, and the native probe loaded the Node 22 binary. The harness's existing-target check still reported `already_provisioned`. A runtime-identity comparison (the logic proposed for `launch.mjs`) reported `differs:["nodeMajor","modules"]`. Recomputing step 2 produced a new identity (`f4f323b466c56e60`) |
197
+ | Rollback to a previous directory | After callers were switched back from B to A, operator `doctor` via A returned `ok:true` |
198
+ | Retention | Removing A while it was configured was refused (`configured_for_caller`). B was removed together with its receipt. The foreign fixture was refused |
199
+ | Cleanup | Markers and receipts were listed, then the whole test root was deleted and confirmed absent |
200
+
201
+ ### Deviations and limits
202
+
203
+ - **Root location:** the root was `<test-root>/data/session-peer-ts`, which is
204
+ the ADR layout with `XDG_DATA_HOME=<test-root>/data`.
205
+ - **Network:** destination egress could not be disabled. Offline npm flags
206
+ were used instead, and nothing was downloaded on the destination.
207
+ - **Execution:** the steps were driven by a test harness script, uploaded and
208
+ hash-checked, and run with the recorded Node. This is not the proposed F6
209
+ helper; the identity launcher, manifest and lock exist only in that harness.
210
+ - **Isolation shim:** the operator `doctor` and `send` runs went through a
211
+ test-only shim (`env -i`, with `HOME`, `CLAUDE_CONFIG_DIR` and
212
+ `SESSION_PEER_CODEX_HOMES` inside the test root, and `PATH=/usr/bin:/bin`)
213
+ in front of the install wrapper. This kept discovery from reading the
214
+ account's real agent directories. Version preflight still executed the
215
+ install wrapper.
216
+ - **Initial npm check:** the first `npm --version` checks ran with the
217
+ account's real `HOME`. npm's user configuration was therefore readable to
218
+ that process. No writes outside the test root were observed, but this was
219
+ not independently verified, and the account's npm directories were
220
+ deliberately not inspected. All later npm runs used the isolated `HOME`,
221
+ which remained empty.
222
+ - **Operator-check order (harness deviation):** in the original execution
223
+ order of the private log, only install A ran the operator `doctor` and
224
+ dry-run before writing its receipt and releasing the lock, as step 8
225
+ required. B (run B3) wrote its receipt and released the lock first, and ran
226
+ the operator checks afterwards. S wrote its receipt and released the lock
227
+ before an operator `doctor`, and had no dry-run. For B and S, step 8 is
228
+ therefore only partially evidenced. Their remote activation, verification,
229
+ native-lock and lock results stand as recorded. This is based on the
230
+ original command order and timestamps in the private log, which is
231
+ chronological and was not rearranged.
232
+ - **Rule version:** the run used the ADR rules at the PR's fifth commit.
233
+ Recovery, receipt and trust rules added later were not exercised here.
234
+ - **Harness gap:** the existing-target check did not recompute runtime
235
+ identity, which is why it reported `already_provisioned` after the swap.
236
+ - **Not covered:** Windows (the F5 cell is still open), arm64, musl, macOS
237
+ destinations, glibc older than 2.28, and the empty-directory race window.
238
+
239
+ ## Public 0.2.1 — 2026-09-29 KST
240
+
241
+ `session-peer@0.2.1` is public. Registry publication time is
242
+ `2026-09-28T23:45:16.923Z` (08:45:16 KST). Verified `latest=0.2.1` and
243
+ unchanged `preview=0.1.0-preview.1`.
244
+
245
+ - Source: `a9c42334da8f7faf83f0b9bb1fe52f1c695dfe8d`, release PR #67.
246
+ - Exact-main CI: [36498904152](https://github.com/abruption/session-peer-ts/actions/runs/36498904152), successful.
247
+ - Staging run: [36499231956](https://github.com/abruption/session-peer-ts/actions/runs/36499231956), successful (`prepare` and `publish`).
248
+ - Artifact: `session-peer-0.2.1.tgz`; SHA-256 `6bf3c99d12260ce2e9421909b27326f1663ce6945aa798bc90ca1e17da675e43`.
249
+ - Registry integrity: `sha512-bPjriJZf7OQ5niZafwxNgMYo0DVpZldELEjp640xAfBMjBCAJatT2hPMTG9oV7xDX2ULCPUmox9+vFWc5nw0Mg==`, identical to the retained artifact manifest.
250
+ - SLSA provenance names source `a9c42334…` and run 36499231956 attempt 1, workflow `.github/workflows/publish.yml`.
251
+
252
+ The user approved the exact main SHA/0.2.1/stable-stage, separately approved the
253
+ protected GitHub npm environment, and reported final npm 2FA promotion complete.
254
+ Before environment approval, the retained Actions artifact was reviewed against
255
+ the exact source: all four READMEs, the four guides, `docs/api.md`, PARITY,
256
+ RELEASING, VALIDATION, SECURITY and CONTRIBUTING matched byte for byte; package
257
+ version, `VERSION` and the packaged CLI banner were 0.2.1. After promotion,
258
+ `release.mjs artifact` and `release.mjs verify` passed registry integrity/tag/
259
+ attestation checks, npm signature audit, fresh version-specific installation and
260
+ uninstall on macOS Node 22.14.0.
261
+
262
+ Not independently recorded here: the stage ID, a byte comparison of the staged
263
+ tarball, the authenticated pending-stage list and the Trusted Publisher UI; the
264
+ reviewing workstation had no npm session. The registry integrity equals the
265
+ retained artifact. This record adds no live-agent ACK claim. No republishing, tag
266
+ deletion, GitHub release/tag creation or fleet installation was performed.
267
+
9
268
  ## 0.2.1 candidate checks — 2026-09-29 KST
10
269
 
11
270
  Candidate source: main after #62, #63, #64 and #66 plus the 0.2.1 preparation PR.
@@ -16,7 +275,7 @@ passed, 4 Windows-only skipped; package smoke, repository checker, `npm audit`
16
275
  included fix PR passed the full macOS/Linux/Windows Node 22/24 matrix, CodeQL and
17
276
  the release gate on its head. These are fixture results, not live-TUI ACKs and not
18
277
  public release evidence; 0.2.1 publication requires the procedure in
19
- [RELEASING.md](RELEASING.md#021-stable-release-procedure) and a dated public record.
278
+ [RELEASING.md](RELEASING.md#completed-021-stable-release-procedure) and a dated public record.
20
279
 
21
280
  ## Public 0.2.0 — 2026-09-28 KST
22
281
 
@@ -78,9 +337,20 @@ Windows test files run serially so concurrent PowerShell compilation does not
78
337
  consume the native inspector's fixed timeout; assertions and production deadlines
79
338
  are unchanged. Separately (#65), the compiling `Add-Type` owner inspection now has
80
339
  a 20000 ms deadline after a slow runner exceeded 8000 ms on main (CI run
81
- 36419550921, attempt 1); the compile-free creation-time probe keeps 8000 ms, and
82
- timeouts still refuse. Each native subtest cleans its children even after assertion
83
- failure. Package smoke verifies unified empty discovery without executables on PATH.
340
+ 36419550921, attempt 1). The compile-free creation-time probe moved from 8000 ms
341
+ to 15000 ms (#78) after CI run 36542897023 (`windows-native (24)`) killed it at its
342
+ 8000 ms deadline (observed 8024 ms including termination; the probe's actual
343
+ completion time is unknown). 15000 ms is a mitigation margin, not proof that slow
344
+ machines or CI never exceed it. Probes run sequentially, once per probe-eligible
345
+ Claude session record (N, including stale records), so a full scan's worst-case
346
+ probe budget is roughly 15 × N seconds plus I/O and termination overhead, an
347
+ increase of 7 × N seconds over the former 8 × N; the compiling path's 20000 ms
348
+ deadline is per call, not a scan bound. A Claude dry-run scans once and returns
349
+ after selection. A real Claude send scans during selection and, only if selection
350
+ succeeds, again during revalidation, so its worst case is about 15 × (N1 + N2)
351
+ seconds for the two scans' record counts; a refusal at selection has no second scan.
352
+ Timeouts still exclude the process. Each native subtest
353
+ cleans its children even after assertion failure. Package smoke verifies unified empty discovery without executables on PATH.
84
354
  These are fixture contracts, not new live-TUI ACKs. CI evidence belongs to the
85
355
  issue's PR-head checks; publication requires separate release preparation.
86
356
 
package/dist/cli.d.ts CHANGED
@@ -1,9 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import { type Done } from './process.js';
3
+ import { type SshJump, type SshOptions } from './ssh.js';
3
4
  type Options = {
4
- command: 'list' | 'send' | 'doctor';
5
+ command: 'list' | 'send' | 'doctor' | 'update';
5
6
  values: Map<string, string>;
6
7
  flags: Set<string>;
8
+ hosts: string[];
9
+ ssh: SshOptions;
10
+ jump?: SshJump;
11
+ address?: {
12
+ uri: string;
13
+ transport: 'local' | 'ssh';
14
+ implicit: boolean;
15
+ };
7
16
  };
8
17
  export declare function parse(args: string[]): Options;
9
18
  export declare function sshPreflightFailure(result: Done, expected: string): string | undefined;