@fractalsynapse/dsh-chapters 0.2.40 โ 0.2.42
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/README.md +45 -0
- package/docs/contract.md +71 -0
- package/docs/development.md +66 -0
- package/docs/project-state.md +80 -0
- package/docs/superpowers/specs/2026-11-02-chapter-removal-design.md +4 -0
- package/docs/verify.md +143 -0
- package/lib/attach.d.ts +16 -2
- package/lib/attach.js +64 -7
- package/lib/attach.js.map +1 -1
- package/lib/commands.js +11 -0
- package/lib/commands.js.map +1 -1
- package/lib/engine.d.ts +12 -163
- package/lib/engine.js +9 -1
- package/lib/engine.js.map +1 -1
- package/lib/gitops.js +16 -1
- package/lib/gitops.js.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/preset.d.ts +29 -38
- package/lib/preset.js +146 -1
- package/lib/preset.js.map +1 -1
- package/lib/prompt.js +12 -3
- package/lib/prompt.js.map +1 -1
- package/lib/removal.d.ts +3 -0
- package/lib/removal.js +38 -1
- package/lib/removal.js.map +1 -1
- package/lib/sync.d.ts +35 -2
- package/lib/sync.js +198 -9
- package/lib/sync.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,51 @@ source at [fractalsynapse/dsh-chapters](https://github.com/fractalsynapse/dsh-ch
|
|
|
9
9
|
> **All documentation lives on the documentation site โ this README is a doorway, not a duplicate.**
|
|
10
10
|
> ### ๐ https://fractalsynapse.github.io/dsh-chapters/
|
|
11
11
|
|
|
12
|
+
## Supported DSH host versions
|
|
13
|
+
|
|
14
|
+
Every published Deepseek Session Harness version **from 0.2.0 up** gets the real test suites
|
|
15
|
+
run against it, per version: the runner `scripts/matrix-run.mts` swaps the whole
|
|
16
|
+
`@deepseek-ai/dsh-*` family to that version and runs the legs, and the
|
|
17
|
+
`.github/workflows/host-matrix.yml` workflow (nightly + manual dispatch) assembles the table
|
|
18
|
+
below from the executed verdicts โ per version BOTH planes: the deterministic suites
|
|
19
|
+
(unit+integration) AND the compose probe (does a new chapters session actually compose on
|
|
20
|
+
that host, #454), rendered side by side so suite-green never stands alone. Each nightly
|
|
21
|
+
refresh also commits the per-version verdict JSONs under `matrix-verdicts/` as durable
|
|
22
|
+
receipts cross-checked against the table, and a liveness sentinel in CI reddens if the
|
|
23
|
+
sweep nightly itself dies (#455). GitHub registers scheduled workflows only from the default
|
|
24
|
+
branch, so the nightly fires once the next release carries `host-matrix.yml` to `main`; until
|
|
25
|
+
then the table is refreshed by sweep runs of the committed code. Either way the line above the
|
|
26
|
+
table names the plane that actually executed the sweep โ a verdict is only ever as good as the
|
|
27
|
+
run that produced it, and which run that was is part of the record.
|
|
28
|
+
|
|
29
|
+
<!-- versions:begin -->
|
|
30
|
+
|
|
31
|
+
> Regenerated from the verdicts of a three-plane sweep of the 0.2.42 release-candidate base (unit+integration+compose, fresh workspace per version, post-#445) on 2026-11-22 00:28 UTC โ real test-suite legs per version with the whole hat family re-resolved. Verdicts from REAL runs, not compose probes.
|
|
32
|
+
|
|
33
|
+
| DSH host version | Verdict | Real-leg results | Last run (UTC) |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| 0.2.0-rc.1 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
36
|
+
| 0.2.0-rc.2 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
37
|
+
| 0.2.1-alpha.1 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
38
|
+
| 0.2.1-alpha.2 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
39
|
+
| 0.2.1-alpha.3 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
40
|
+
| 0.2.1-alpha.4 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
41
|
+
| 0.2.1-alpha.5 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
42
|
+
| 0.2.1-rc.1 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
43
|
+
| 0.2.1-rc.2 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
44
|
+
| 0.2.1-rc.3 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
45
|
+
| 0.2.1-rc.4 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-21 |
|
|
46
|
+
| 0.2.1-rc.5 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-22 |
|
|
47
|
+
| 0.2.2-alpha.2 | โ fail | unit:โ
integration:โ
compose:โ | 2026-11-22 |
|
|
48
|
+
| 0.2.2-alpha.3 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-22 |
|
|
49
|
+
| 0.2.2-rc.1 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-22 |
|
|
50
|
+
| 0.2.2-rc.2 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-22 |
|
|
51
|
+
| 0.2.2-rc.3 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-22 |
|
|
52
|
+
| 0.2.2-rc.4 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-22 |
|
|
53
|
+
| 0.2.2-rc.5 | โ
supported | unit:โ
integration:โ
compose:โ
| 2026-11-22 |
|
|
54
|
+
|
|
55
|
+
<!-- versions:end -->
|
|
56
|
+
|
|
12
57
|
## Install (the whole setup)
|
|
13
58
|
|
|
14
59
|
```bash
|
package/docs/contract.md
CHANGED
|
@@ -544,6 +544,22 @@ ask (#138) and not a rig bug to fix.
|
|
|
544
544
|
|
|
545
545
|
### Presets are declaration rows now (host โฅ 0.1.7-alpha.1) โ measured, with the incident
|
|
546
546
|
|
|
547
|
+
**Capability edges as EXECUTED by the host matrix (#443, sweep 2026-11-20, per-version isolated
|
|
548
|
+
installs, strict compose = durable header `agentPreset="chapters"`):** 0.1.6-alpha.1 cannot boot
|
|
549
|
+
the rig profile at all (legacy tree abort โ `fail-boot`); 0.1.6-alpha.2 boots and the plugin's own
|
|
550
|
+
`unsupported` line fires, sessions never compose (`fail-unsupported`); 0.1.7-rc.2 COMPOSES โ the
|
|
551
|
+
capability floor in this section's heading is real, and the SUPPORT floor (0.2.0) is a policy
|
|
552
|
+
choice, now with data; every published 0.2.0-rc.1 โ 0.2.1-rc.5 composes (12/12 pass); the whole
|
|
553
|
+
**0.2.2 series (alpha.2 โ rc.5) is RED** โ alpha.2 inside the host's own registration
|
|
554
|
+
(`Cannot read properties of undefined (reading 'parent')`), alpha.3 onward
|
|
555
|
+
`tool-subagent-list-agents (@deepseek-ai/dsh-tool-subagent-control/list-agents): never started`.
|
|
556
|
+
Both causes and the compose symptom (the #437 `new-session click never set dsh.sessions.current`)
|
|
557
|
+
are attributed verbatim in the record at `docs/verify.md`; tracked in the follow-up issue (#445).
|
|
558
|
+
**Maintainer decision 2026-11-20 (#446): the support floor stays 0.2.0 and 0.1.* is DEPRECATED**
|
|
559
|
+
(the project started on it; the matrix evidence that 0.1.7-rc.2 technically composes is kept as
|
|
560
|
+
history, not as a support claim). Cells below 0.2.0 are controls for one-off runs only โ the
|
|
561
|
+
nightly block is 0.2.0 and up, one source: `SUPPORT_FLOOR` in `tests/e2e/host-matrix-support.ts`.
|
|
562
|
+
|
|
547
563
|
A user preset used to be a directory `$DSH_HOME/.agent-presets/<id>/` holding `preset.yml` +
|
|
548
564
|
`agent.cordis.yml`. The host's own migration note is blunt: *"Nothing reads that directory any more."*
|
|
549
565
|
(`@deepseek-ai/dsh-agent-preset/skills/editing-cordis-compositions/SKILL.md`). A preset is now an
|
|
@@ -745,6 +761,61 @@ Two corollaries, both bought once:
|
|
|
745
761
|
`tests/unit/client-doors.test.ts` has a row that fails if `src/client/index.ts` drops
|
|
746
762
|
`uiWorkspace` from `inject` or stops passing it.
|
|
747
763
|
|
|
764
|
+
## The two session LIST surfaces, measured (#180, host 0.2.0-rc.2)
|
|
765
|
+
|
|
766
|
+
Two services list sessions, they return **different shapes**, and neither is a bare array:
|
|
767
|
+
|
|
768
|
+
- **Gateway (what the browser renders and `open()`s against)** โ `ctx.get('sessionController')`
|
|
769
|
+
resolves the host's `SessionController` (`@deepseek-ai/dsh-api-session-controller`, declared in
|
|
770
|
+
`lib/types/index.d.ts` as `list(_request: SessionListRequest, signal): Promise<SessionListValue>`).
|
|
771
|
+
`SessionListValue` is an **object envelope**: `{ items: readonly SessionSummary[] }`
|
|
772
|
+
(`lib/types/types.d.ts`), and each summary row carries **`sessionId`** (plus `updatedAt`,
|
|
773
|
+
`running`, `blank`, `parentSessionId?`, โฆ) โ not `header.id`.
|
|
774
|
+
- **Client roster (what `doors.ts` reads)** โ `ISessions.list` is **not callable at all**: it is an
|
|
775
|
+
`ObservableSnapshot<SessionListState>` property (`lib/types/client/contract/sessions.d.ts`) read
|
|
776
|
+
via `list.getSnapshot() โ { ids: SessionId[], byId: Record<SessionId, SessionSummary>, phase, โฆ }`
|
|
777
|
+
(`lib/types/client/sessions/service.d.ts`).
|
|
778
|
+
|
|
779
|
+
The #180 defect: `src/attach.ts` called `sc.list()` and piped the result straight into `.map`.
|
|
780
|
+
The call itself succeeds โ `list` *is* a function on the gateway service โ but it resolves to the
|
|
781
|
+
`{items}` envelope, a truthy non-array, so `?? []` does not catch it and `.map` throws. The catch
|
|
782
|
+
converted it to `gatewayListed: undefined`, which is why the browser-visibility verification โ
|
|
783
|
+
the exact fact the 0.2.x door hunt needed โ has been unreadable on the real host since it shipped.
|
|
784
|
+
The unit fixtures at the time pinned an *imagined* array shape, which is how the row the issue
|
|
785
|
+
calls "the row that should have existed" never existed: a fixture is only evidence when it was
|
|
786
|
+
measured. The normalizer in `attach.ts` now accepts, in order: a bare array of rows, the
|
|
787
|
+
`{items: rows}` envelope, and an `ObservableSnapshot` (`list` or its call result exposing
|
|
788
|
+
`getSnapshot` โ `{ids}` or `{byId}`); anything else is `gatewayListed: undefined` **with the
|
|
789
|
+
received shape named in the warning**, never a TypeError path and never silence.
|
|
790
|
+
|
|
791
|
+
## Which lineage resolves a plugin's rows โ measured (#437)
|
|
792
|
+
|
|
793
|
+
There are THREE resolution contexts, and only one decides whether a preset child row can
|
|
794
|
+
activate. Measured on the rig machine the day a live DSH self-update published
|
|
795
|
+
`@deepseek-ai/dsh-tool-schedule` (absent at the pinned host 0.2.0-rc.2) into `~/node_modules`:
|
|
796
|
+
|
|
797
|
+
- **The plugin's own lineage** โ `import.meta.resolve` from `lib/*.js`. The rig profile
|
|
798
|
+
SYMLINKS the plugin into the repo checkout, so this walk goes repo `node_modules` โ
|
|
799
|
+
`~/node_modules`. It resolves packages the host has never shipped: the pre-#437 drop-guard
|
|
800
|
+
asked exactly this, kept the row, and the host then reported `DECLARED BUT BROKEN โ
|
|
801
|
+
tool-schedule: never started` and every chapters session refused to compose.
|
|
802
|
+
- **The host tree** โ the first `node_modules` ancestor segment of `process.argv[1]` (the npm
|
|
803
|
+
`.bin/dsh` shim or `node_modules/dsh/bin/*`). Rows are imported by the HOST, so containment
|
|
804
|
+
(`<tree>/@scope/<package>`) is the only keep/drop predicate that cannot be polluted โ every
|
|
805
|
+
filesystem walk-up from any path under `$HOME` reaches the pollution itself. This is
|
|
806
|
+
`makeHostAwareResolver` in `src/preset.ts`; when the entry has no probeable tree (compiled
|
|
807
|
+
single-file hosts) it falls back to the plugin lineage rather than mass-dropping rows.
|
|
808
|
+
- **Dev checks against the pinned host** must require through `dev/dsh-host-lock/package.json`
|
|
809
|
+
first (`createRequire(new URL('../../dev/dsh-host-lock/package.json', โฆ))`), or list the rig
|
|
810
|
+
tree ahead of the PATH probe โ `preset-declaration` and `host-plan-card-shape` both did their
|
|
811
|
+
first-look the other way and turned red the moment HOME updated. `tape-proxy-window.test.ts`
|
|
812
|
+
was already pin-first; it is the pattern.
|
|
813
|
+
|
|
814
|
+
The rig boot itself is NOT polluted the same way: `boot.ts` keeps the home under `os.tmpdir`
|
|
815
|
+
because Node walks up from the PROFILE directory โ but the symlinked plugin drags the host
|
|
816
|
+
process's realpath back into the repo lineage regardless. Isolation of the HOME is not isolation
|
|
817
|
+
of the resolution ancestry.
|
|
818
|
+
|
|
748
819
|
## `ContinuePorts.mutateState` โ the row write seam (#101)
|
|
749
820
|
|
|
750
821
|
`ContinuePorts` exposes **both** `getState`/`putState` and `mutateState(sessionId, fn)`, and the split is
|
package/docs/development.md
CHANGED
|
@@ -1123,3 +1123,69 @@ tonight). Until one lands, the honest release sentence stays: first-attempt coll
|
|
|
1123
1123
|
the recorded rerun is green, and the guard now measures the right thing. The wrong-teardown theory
|
|
1124
1124
|
in the 0.2.37/0.2.38 ship records stands corrected here rather than silently rewritten โ immutable
|
|
1125
1125
|
tags, mutable understanding, one line in the right place.
|
|
1126
|
+
|
|
1127
|
+
## The host-version matrix (#443): supported harness versions as EXECUTED evidence
|
|
1128
|
+
|
|
1129
|
+
The rig pins ONE harness (`dev/dsh-host-lock`), the centrally installed app is a different,
|
|
1130
|
+
moving third thing, and the npm registry carries dozens more. "Support floor 0.2.0" was prose
|
|
1131
|
+
until this sweep existed; it is now an executed claim with per-version attribution.
|
|
1132
|
+
(#451 corrected the plane: the CI job goes live the day this workflow reaches the default
|
|
1133
|
+
branch, and until then refreshes come from sweep runs of committed code โ the README stamp
|
|
1134
|
+
names which one produced the table, because a local run recorded as CI is a provenance bug.)
|
|
1135
|
+
|
|
1136
|
+
```bash
|
|
1137
|
+
bash scripts/host-matrix.sh # every published 0.2.x, isolated
|
|
1138
|
+
bash scripts/host-matrix.sh --versions=0.2.1-rc.4,0.2.2-rc.5 --below=0.1.7-rc.2
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
Design rules, each earned:
|
|
1142
|
+
|
|
1143
|
+
- **One tree per version** (`var/host-matrix/<version>/`, hermetic `npm install` of exactly that
|
|
1144
|
+
`@deepseek-ai/dsh`). Cells boot via `E2E_HOST_DIR` โ the seam #89 built for an external pin โ
|
|
1145
|
+
so the centrally installed app is NEVER on any resolution path; the #437 incident (a newer
|
|
1146
|
+
home harness leaking rows through the plugin's module ancestry) is the cautionary tale, and
|
|
1147
|
+
a matrix cell whose lineage wobbles between versions is the point of the exercise.
|
|
1148
|
+
- **The rig pin is not touched.** The tape corpus stays anchored to its recorded world;
|
|
1149
|
+
the matrix tests PRODUCT-against-HOSTS (install โ boot โ compose probe), never re-interpret
|
|
1150
|
+
tapes against other versions. **The supported block is 0.2.0 and up โ 0.1.* is deprecated by
|
|
1151
|
+
maintainer decision (#446), so the nightly enumerates no 0.1.x cells at all.** `--below=`
|
|
1152
|
+
still accepts controls for one-off runs, and the pre-decision sweep cells (0.1.6 fail-boot /
|
|
1153
|
+
fail-unsupported, 0.1.7 compose) stay recorded in `docs/verify.md` as the measurement that
|
|
1154
|
+
located the capability edge before policy fixed the support edge.
|
|
1155
|
+
- **The verdict IS the attribution.** `fail-broken-preset` names the rows the host cannot
|
|
1156
|
+
activate; `pass` with `rows pruned as unshipped: โฆ` is drift NAMED, not hidden (that is
|
|
1157
|
+
#437's drop-guard reporting through the sweep); `fail-compose` carries the probe's own text
|
|
1158
|
+
(`new-session click never set dsh.sessions.current` โ the exact #437 user symptom). Absence of
|
|
1159
|
+
the quiet `registered` info line is NOT failure: it rides the host's log stream, not the pipe;
|
|
1160
|
+
composition is the user fact and the classifier knows the loud lines from the quiet ones.
|
|
1161
|
+
- **Sequential cells, port band 41900+** โ never two boots at once (the same-home rule), and a
|
|
1162
|
+
band clear of the rig's 41731-41746 so a sweep and a leg can never share home, proxy or sink.
|
|
1163
|
+
- Two planes, two entry points: `scripts/host-matrix.sh` (compose-probe boots, artifacts
|
|
1164
|
+
`var/host-matrix-results.jsonl`) and `scripts/matrix-run.mts` (real unit+integration legs
|
|
1165
|
+
per version, verdict JSONs under `var/matrix-runs/`, README table from `--report`). Since
|
|
1166
|
+
#454 the nightly DEFAULT legs are `unit+integration+compose` โ the compose leg invokes the
|
|
1167
|
+
host-matrix instrument for one version and rides the README as its own column, so a line
|
|
1168
|
+
that tests green but never composes (the #445 class) is visible on every nightly instead
|
|
1169
|
+
of remembered in prose. Cells self-isolate (#454): committed manifests AND lockfile AND
|
|
1170
|
+
an empty `node_modules` per version โ fresh-checkout semantics, the #451 contract.
|
|
1171
|
+
- Evidence and liveness (#455): each verdict JSON is archived with its RESOLVED lockfile as
|
|
1172
|
+
CI artifacts, and the refresh PR commits the verdicts to `matrix-verdicts/` (a unit row
|
|
1173
|
+
cross-checks every committed receipt against the README table). `--report --enumerated=`
|
|
1174
|
+
renders registry versions without a verdict as `โณ enumerated, unverified` โ silence is not
|
|
1175
|
+
a verdict. `scripts/nightly-liveness.mjs`, scheduled inside the REGISTERED `ci.yml` (a
|
|
1176
|
+
sentinel cannot live in the workflow whose death it watches), reddens CI when no successful
|
|
1177
|
+
sweep is younger than 30 h โ the silent-dead-nightly class #451 shipped behind.
|
|
1178
|
+
- **Release-table rule (learned cutting 0.2.41):** cells that fail for ENVIRONMENT reasons
|
|
1179
|
+
(`untestable`, crashes, a depleted tmpfs inode pool mid-sweep) are RE-RUN, never released
|
|
1180
|
+
as-is โ an environmental sample is not a verdict about the version. The first RC pass lost
|
|
1181
|
+
ten cells exactly this way (/tmp inodes hit 100% while bytes stayed at 17%); the ext4 rerun
|
|
1182
|
+
settled all ten, and the shipped table states only settled cells.
|
|
1183
|
+
- The workflow does not gate PRs โ the pinned chain is the PR gate. GitHub only registers
|
|
1184
|
+
scheduled workflows from the DEFAULT branch, so the nightly activates when a release carries
|
|
1185
|
+
the file to `main` (#451). The workflows' own references are guarded on the repo plane by
|
|
1186
|
+
`tests/unit/host-matrix-workflow.test.ts` โ the file shipped once with find/replace casualties
|
|
1187
|
+
and nothing noticed.
|
|
1188
|
+
|
|
1189
|
+
The support BOUNDARY (oldest passing / newest failing version and the seam at each failure) is
|
|
1190
|
+
recorded in `docs/verify.md` per sweep run; the registry list re-bases nightly, so the claim
|
|
1191
|
+
cannot go stale the way a typed version list does.
|
package/docs/project-state.md
CHANGED
|
@@ -1250,3 +1250,83 @@ v24.22.0 rerun is the counted evidence, disclosed not deleted). `corpus:stamp` o
|
|
|
1250
1250
|
ยท gatewayList shape (observed, recorded) ยท host option-(d) todo row ยท five credential-gated TreeDX
|
|
1251
1251
|
live rows. #138's rest-state half is now a CONTRACT fact, not an open question; #429 is closed with
|
|
1252
1252
|
its fix measured in both failure contexts.
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
**7fa3c83-era candidate SHIPPED โ 0.2.40, published and registry-proven โ AND THE 2026-11-19
|
|
1256
|
+
HISTORY REWRITE, DISCLOSED IN FULL.** PR #432 merged `7fa3c83`; four CI gates green at the head
|
|
1257
|
+
(acceptance replayed the twelve-leg chain on the runner); tag `0.2.40`; release run
|
|
1258
|
+
`44606285443` success; `latest` = 0.2.40, tarball manifest + bundled version agree, provenance
|
|
1259
|
+
attestation present.
|
|
1260
|
+
|
|
1261
|
+
**What was rewritten and why:** 33 commits (2026-11-14/15) carried
|
|
1262
|
+
`Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>` โ a vendor attribution no authorized tool
|
|
1263
|
+
of this project wrote. Sessions of that era predate this OpenCode install (whose entire DB runs
|
|
1264
|
+
`qwen3.8-flash` with a single authenticated integration and zero Claude strings in its events);
|
|
1265
|
+
whether the source was a prior install's model selection or a distilled model bleeding its training
|
|
1266
|
+
lineage's attribution habit cannot be proven from here, and the guards cover BOTH theories (the
|
|
1267
|
+
distillation-residue suspicion is recorded in #433 rather than resolved). `git-filter-repo` message
|
|
1268
|
+
rewrites: 185 branches + main + staging force-pushed, tags 0.2.33โ0.2.39 deleted and re-pointed,
|
|
1269
|
+
all verified **tree-identical** per branch (content untouched, messages only) and 0 trailer commits
|
|
1270
|
+
reachable from any ref on the remote.
|
|
1271
|
+
|
|
1272
|
+
**Costs, named:** (1) published versions 0.2.33โ0.2.39 keep their npm packages and attestations,
|
|
1273
|
+
but their attestation-referenced gitHead SHAs are no longer branch-reachable โ the audit chain from
|
|
1274
|
+
those seven versions to repo history is severed; 0.2.40+ run clean. (2) Two stale stashes
|
|
1275
|
+
(`fix/243b-refuse-wording` WIP from the 0.2.2 era; a held `0.2.2-dev.2` version bump โ both long
|
|
1276
|
+
obsolete) were destroyed by the reflog expiry + gc the purge required; disclosed because records
|
|
1277
|
+
stay complete even about their own losses. (3) GitHub may still SERVE the old objects by raw SHA
|
|
1278
|
+
until its network GC โ the purge request (support.github.com, "remove cached/detached commit
|
|
1279
|
+
objects") is filed as the remaining checklist item on #433, together with refreshing any external
|
|
1280
|
+
clone (distillation box). (4) Contributors must `git fetch --prune --prune-tags` + reset (or
|
|
1281
|
+
re-clone); merging old local history forward would resurrect the trailers.
|
|
1282
|
+
|
|
1283
|
+
**Guards shipped (PR #434):** AGENTS ยง Attribution and identity rules; `~/.git-hooks/commit-msg`
|
|
1284
|
+
(global `core.hooksPath`, strips ANY AI-attribution trailer from ANY vendor, chains repo-local
|
|
1285
|
+
hooks, fixture-tested); OpenCode config pins `model`/`small_model` to
|
|
1286
|
+
`alibaba-token-plan/qwen3.8-flash` (no catalog-default or auto-router ambiguity). The vendored
|
|
1287
|
+
names the pinned harness itself ships (`@anthropic-ai/sdk` in the host lock, the claude-code
|
|
1288
|
+
subagent row in `cordis.patch.yml`) stay โ they are dependency facts, and renaming facts is how
|
|
1289
|
+
records start lying.
|
|
1290
|
+
|
|
1291
|
+
**Open after this cut:** #433 (its two maintainer-hand residuals: support purge + external clone
|
|
1292
|
+
refresh) ยท rig-band sysctl ยท gatewayList shape ยท host option-(d) ยท five credential-gated TreeDX
|
|
1293
|
+
rows ยท #138's rest-state half as a host gap (contract-documented). #397, #372, #349, #429, #138,
|
|
1294
|
+
#433's in-repo halves: all closed/shipped.
|
|
1295
|
+
|
|
1296
|
+
## 0.2.41 cut (2026-11-21): version support executed, not asserted
|
|
1297
|
+
|
|
1298
|
+
**What shipped:** the #443โ#456 program end to end โ per-version real-legs + compose sweep in
|
|
1299
|
+
fresh isolated workspaces (#447/#449/#450/#454), the pipeline repair and provenance correction
|
|
1300
|
+
(#451: never-runnable refs, phantom-nightly attribution, committed manifest+lock cells,
|
|
1301
|
+
`--source` plane stamps), committed `matrix-verdicts/` receipts with README cross-check,
|
|
1302
|
+
lockfile archiving, unverified-enumeration rows, the liveness sentinel, the frozen cell-skip
|
|
1303
|
+
roster (#455), the targeted-conversation TOC/enrichment/suggestion tests with measured cut
|
|
1304
|
+
targets and mutation proofs (#456 Tier A), and the quiescence conversion + bare-sleep ratchet
|
|
1305
|
+
(#452). Earlier range: #435/#436/#438/#439/#440/#441 (#180, #222, #437, #317, #256, #260).
|
|
1306
|
+
|
|
1307
|
+
**Support state at this cut:** 12/19 versions green on all three planes (0.2.0-rc.1 โ
|
|
1308
|
+
0.2.1-rc.5); the 0.2.2 line (7) suite-green, compose-FAIL, cause attributed verbatim
|
|
1309
|
+
(list-agents retired by the host; our composition carries it โ #445 OPEN, and now visible on
|
|
1310
|
+
every nightly by design). The RC sweep's first pass lost ten cells to /tmp INODE exhaustion
|
|
1311
|
+
(100% at 17% bytes); rerun on ext4 settled all ten before the table shipped โ the
|
|
1312
|
+
re-run-environmental-failures rule is now in docs/development.md.
|
|
1313
|
+
|
|
1314
|
+
**Open after this cut:** #445 (0.2.2 compose โ THE headline gate; root cause pinned, fix is
|
|
1315
|
+
in our preset assembly/probe path), #456 Tier B (tape re-distillation from the scenario
|
|
1316
|
+
catalog; per-line corpora), #433's two maintainer residuals, rig-band sysctl, host option-(d),
|
|
1317
|
+
five credential-gated TreeDX rows, #138 rest-state half. The sweep nightly + sentinel
|
|
1318
|
+
ACTIVATE when this release lands on the default branch โ this cut is their registration event.
|
|
1319
|
+
|
|
1320
|
+
## 0.2.42 cut (2026-11-22): the 0.2.2 line composes
|
|
1321
|
+
|
|
1322
|
+
**What shipped:** #445's plugin-side fix (export-map keep/drop, PR #461) + the three-plane
|
|
1323
|
+
re-sweep table at the candidate (PR #463). Support state executed: 18/19 green on
|
|
1324
|
+
unit+integration+compose; 0.2.2-alpha.2 attributed-red as the host `impl.fiber` prerelease
|
|
1325
|
+
defect (upstream report filed; fixed by alpha.3). Receipts replaced in `matrix-verdicts/`;
|
|
1326
|
+
the #462 one-sample CI stall documented with its discriminator, decision parked.
|
|
1327
|
+
|
|
1328
|
+
**Open after this cut:** #445 stays open ONLY for the alpha.2 disposition call (maintainer:
|
|
1329
|
+
deprecate-the-prerelease vs name-in-table โ the shipped table already names it) โ plugin-side
|
|
1330
|
+
acceptance fully met; #462 ceiling-vs-artifact decision; #456 Tier B (atomic corpus
|
|
1331
|
+
campaign โ dependency now cleared); the standing residuals (#433 maintainer items, rig-band
|
|
1332
|
+
sysctl, TreeDX gated rows, #138 rest-state). Nightly + sentinel keep activating since 0.2.41.
|
|
@@ -45,6 +45,10 @@ decide whether those referrers need to stay too.
|
|
|
45
45
|
pulled after the deletion commit. A second machine holding a local copy can re-publish it; the
|
|
46
46
|
follow-up is a removal fact carried in the per-session collections JSONL (which already syncs),
|
|
47
47
|
consumed by `planStoreToRepo`. Filed as follow-up at PR time.
|
|
48
|
+
**Landed as #256:** one `{"type":"chapter-removed",โฆ}` fact per deleted chapter rides the
|
|
49
|
+
collections file it names; publish-skip and rehydrate-skip consume it on every machine's next
|
|
50
|
+
sync pass, parse-tolerantly. The registry decision went the documented conservative way:
|
|
51
|
+
a remote fact stops bytes travelling; it never rewrites a local row's status.
|
|
48
52
|
|
|
49
53
|
## Anti-goals (what would make this a failure)
|
|
50
54
|
|
package/docs/verify.md
CHANGED
|
@@ -646,3 +646,146 @@ same tape then replayed MODEL-FREE green: `1 passed` (48.3s), zero MISSes โ #1
|
|
|
646
646
|
not bite; the byte-exact tape reproduces the local relief decisions. The tape is tracked corpus with
|
|
647
647
|
PROVENANCE (11 entries) and the leg is a chain member: composition is pinned against every future
|
|
648
648
|
code change, verified from the discussion itself โ the corpus gap the maintainer named, closed. |
|
|
649
|
+
|
|
650
|
+
## Host-version matrix sweeps (#443, 2026-11-20)
|
|
651
|
+
|
|
652
|
+
Command: `bash scripts/host-matrix.sh [--versions=โฆ] [--below=โฆ]`; per-cell artifacts
|
|
653
|
+
`var/host-matrix-results.jsonl`, boot logs `var/e2e-server-<419xx>.log`; candidate trees
|
|
654
|
+
`var/host-matrix/<version>/` (isolated npm installs; the rig pin and the central app untouched).
|
|
655
|
+
Compose = strict: new session, durable header `agentPreset="chapters"`.
|
|
656
|
+
|
|
657
|
+
| version | verdict | attributed cause |
|
|
658
|
+
|---|---|---|
|
|
659
|
+
| 0.1.6-alpha.1 | fail-boot | the rig profile's declaration-row syntax aborts the legacy plugin tree โ below the capability floor |
|
|
660
|
+
| 0.1.6-alpha.2 | fail-unsupported | boots; the plugin's own loud line: host cannot register preset declaration rows; sessions never compose |
|
|
661
|
+
| 0.1.7-rc.2 | **pass** | declaration rows exist since 0.1.7-alpha.1; composed with `chapters` โ capability floor REAL, support floor (0.2.0) is policy |
|
|
662
|
+
| 0.2.0-rc.1 โฆ 0.2.0-rc.2 | pass ร2 | composed |
|
|
663
|
+
| 0.2.1-alpha.1 โฆ 0.2.1-rc.5 | pass ร10 | composed โ the whole 0.2.1 series, including both #150 candidates (rc.4) |
|
|
664
|
+
| 0.2.2-alpha.2 | fail-broken-preset | host-internal registration crash: `Cannot read properties of undefined (reading 'parent')` โ sessions choosing chapters refuse |
|
|
665
|
+
| 0.2.2-alpha.3, rc.1 โฆ rc.5 | fail-broken-preset ร6 | `tool-subagent-list-agents (@deepseek-ai/dsh-tool-subagent-control/list-agents): never started` โ one preset child the 0.2.2 line cannot activate |
|
|
666
|
+
|
|
667
|
+
**Support boundary executed, not prose:** every published 0.2.0 โ 0.2.1 composes; the ENTIRE
|
|
668
|
+
0.2.2 series does not, with two distinct named causes (the first changed internals, the second
|
|
669
|
+
changed a child row's activatability). The maintainer's home app is 0.2.2-rc.5 โ this is why the
|
|
670
|
+
matrix exists, found on its first day. Follow-up issue tracks the 0.2.2 incompatibility; the
|
|
671
|
+
0.1.7-rc.2 pass reopens the support-floor question as a DECISION with data. Negative controls
|
|
672
|
+
proven live (acceptance 2): the below-floor cells go red for their own named reasons, and the
|
|
673
|
+
0.2.2 cells carry the #437 compose symptom text verbatim. CI: `host-matrix.yml` (daily 04:17 UTC
|
|
674
|
+
+ dispatch), artifacts `host-matrix-results`.
|
|
675
|
+
|
|
676
|
+
**DECIDED SAME DAY (#446, maintainer directive):** 0.1.* is DEPRECATED โ the project started on
|
|
677
|
+
it โ so the nightly enumerates 0.2.0 and up ONLY; the three 0.1.x rows above stand as the
|
|
678
|
+
pre-decision measurement that located the capability edge (they stay: records are records), and
|
|
679
|
+
`--below=` remains for one-off controls. The support floor's single source is now `SUPPORT_FLOOR`
|
|
680
|
+
in the matrix support module, asserted by a unit row (`no default list includes a 0.1 version`).
|
|
681
|
+
|
|
682
|
+
## Version-sweep real-legs plane โ provenance correction and re-run (#447/#449/#451, 2026-11-20)
|
|
683
|
+
|
|
684
|
+
The 19/19 green table merged via #448 was generated by a LOCAL sweep, not by CI, although its
|
|
685
|
+
stamp claimed the workflow. Verified during #451: the verdict artifacts exist and are real โ
|
|
686
|
+
`/tmp/sweep-results/result-*.json` (19 files, 14:33:56โ15:22:33 UTC, sequential, each
|
|
687
|
+
`verdict: pass`, legs `pass 1725 / fail 0 / todo 1` twice) driven by `/tmp/run-sweep.sh` with
|
|
688
|
+
log `/tmp/sweep-full.log` (ends `SWEEP_ALL_DONE`), executed in `/tmp/verify-447-448` whose
|
|
689
|
+
`scripts/matrix-run.mts` and `src/engine.ts` diff BYTE-IDENTICAL against the merged staging
|
|
690
|
+
tip `afa6c9f` โ so the verdicts test the fixed code path (zod alignment + portable Config
|
|
691
|
+
annotation), and the start of the sweep (14:33:56Z) postdates the Config fix (14:29:42Z) and
|
|
692
|
+
the zod cells fix (13:22โ13:28Z). What was false was the PLANE attribution and the nightly:
|
|
693
|
+
`gh workflow list` shows `host-matrix.yml` was never registered (GitHub schedules only default-
|
|
694
|
+
branch workflows), and as committed the file called `scripts/de-de-de.mjs` โ a path mangled out
|
|
695
|
+
of existence by the find/replace pass that also renamed its `name`/`concurrency`/`var/` strings
|
|
696
|
+
โ so it could not have run even if registered. Fixed in #451: workflow refs restored and guarded
|
|
697
|
+
by `tests/unit/host-matrix-workflow.test.ts` (script refs resolve, no mangle tokens, `mkdir -p
|
|
698
|
+
var` ordering, and a BEHAVIOUR row running the real report generator); `matrix-run.mts --report`
|
|
699
|
+
now stamps the executing plane via `--source=`, defaulting to "local". Nightly goes live the day
|
|
700
|
+
a release carries the workflow to `main` (maintainer release authority).
|
|
701
|
+
|
|
702
|
+
**CORRECTED THE SAME NIGHT (#451, isolation re-sweep):** the paragraph above stands on the
|
|
703
|
+
workflow-plane facts, but its opening verdict โ "the 19/19 verdicts themselves are REAL" โ
|
|
704
|
+
needed the isolation test this section's own fix made possible, and the test says the truth is
|
|
705
|
+
narrower: **the executions were real; the verdicts were protocol-bound.** The morning's 19/19
|
|
706
|
+
and the first re-sweep's 11/19 were both produced by SEQUENTIAL cells in one reused workspace,
|
|
707
|
+
where `swap()` reset the committed `package.json` but not the committed `package-lock.json` โ
|
|
708
|
+
a cell's resolution could inherit its neighbour's (proved live: 0.2.1-alpha.3 with an inherited
|
|
709
|
+
lock died TS2379 with no nested zod detected; in a fresh workspace the #449 alignment fired,
|
|
710
|
+
`aligned root zod 4.6.7 -> 4.4.3`, and it compiled). Fixed in `92ed63a` (cells restore the
|
|
711
|
+
committed lock; the runner's reproducibility note now states it) and re-swept under a
|
|
712
|
+
CI-faithful protocol: **one fresh workspace per version** (pristine manifests, root
|
|
713
|
+
`node_modules` removed between cells, `dev/dsh-host-lock` installed as CI installs it).
|
|
714
|
+
Result: **19/19 pass, both legs `pass 1731 / fail 0 / todo 1` per version**, artifacts
|
|
715
|
+
`/tmp/sweep-results-451b/result-*.json` (21:25 UTC), README table regenerated from exactly
|
|
716
|
+
those files with `--source` naming the protocol. Four cells initially redshelled a single row
|
|
717
|
+
under four-stream parallel load โ the fixed-120ms-quiesce flake, isolated to #452 and
|
|
718
|
+
re-run green in a single stream; the failing row is listed there, not papered here.
|
|
719
|
+
The registry enumeration was unchanged by the re-run (same 19 versions as the morning list).
|
|
720
|
+
|
|
721
|
+
## The test-weakness program (#454/#455/#456 Tier A + #452, 2026-11-20, PR #457โstaging)
|
|
722
|
+
|
|
723
|
+
Release-blocking test fixes from the gap audit the maintainer endorsed:
|
|
724
|
+
|
|
725
|
+
- **#454 compose leg VERIFIED end-to-end** (not just wired): `matrix-run --legs=compose
|
|
726
|
+
--version=0.2.1-alpha.1` on a fresh self-isolated cell โ `[compose] PASS (41s) โ pass โ
|
|
727
|
+
composed with no loud preset failure`, verdict JSON `{verdict:"pass",
|
|
728
|
+
legs:[{leg:"compose", ok:true}]}` โ the README renders `compose:โ
` beside `unit:โ
|
|
729
|
+
integration:โ
`. Cells now self-isolate: committed manifest + committed lock + empty
|
|
730
|
+
node_modules per version (CI fresh-checkout semantics as the tool's contract, not the
|
|
731
|
+
operator's hygiene โ the #451 contamination class closes at the source).
|
|
732
|
+
- **#455 receipts**: refresh PR commits `matrix-verdicts/` (initialized with the 19 #451
|
|
733
|
+
isolated-sweep verdicts); `matrix-verdicts-consistency.test.ts` cross-checks every
|
|
734
|
+
committed receipt against its README row (non-vacuous at 19 files). Resolved lockfiles
|
|
735
|
+
archive beside verdicts; `--enumerated=` names unverified registry versions instead of
|
|
736
|
+
omitting them; `nightly-liveness.mjs` (5-state unit-tested) rides the REGISTERED ci.yml
|
|
737
|
+
timer so a dead sweep is yesterday's red check; the DSH_MATRIX_VERSION skip roster is
|
|
738
|
+
frozen (2 named rows, announced reasons).
|
|
739
|
+
- **#456 Tier A (targeted-conversation doctrine)**: `tests/scenarios/
|
|
740
|
+
targeted-conversations.ts` scripts conversations about THIS PROJECT that read REAL repo
|
|
741
|
+
files (existence-checked at import) with DECLARED topic boundaries;
|
|
742
|
+
`toc-targeted-conversation.test.ts` drives deriveRanges with the cut target COMPUTED from
|
|
743
|
+
the transcript's own measurements and asserts splits land at topic changes nowhere else,
|
|
744
|
+
topic attribution with zero bleed, a no-drift control, and a MUTATION row (reordered
|
|
745
|
+
topics move the attribution โ expectations are properties of the input). Enrichment
|
|
746
|
+
inputs carry each chapter's own subject; the suggestion tail + rule ranking follow the
|
|
747
|
+
LAST topic. Tier B (re-distilling the pinned-world tapes from this catalog, per-line
|
|
748
|
+
corpora) stays open under #456.
|
|
749
|
+
- **#452**: all 13 quiescence sites in subagent-auto-save converted to artifact predicates
|
|
750
|
+
(named timeout failures) or loop-flushes for silence assertions; 11/11 green; the
|
|
751
|
+
bare-sleep RATCHET (test-hygiene) freezes the remaining 25 legacy sites per file,
|
|
752
|
+
shrink-only, predicate-loop idiom sanctioned, `// negative-window:` annotation required
|
|
753
|
+
for deliberate silence waits, mutation fixture proves the scanner bites.
|
|
754
|
+
|
|
755
|
+
Suite at the branch head: **1750 pass / 0 fail / 1 todo** (1756 tests). Compose legs for the
|
|
756
|
+
remaining 18 versions run the first time the wired workflow executes (locally reproducible
|
|
757
|
+
with `--legs=compose`); this entry records the leg's mechanism verified on a real host, not a
|
|
758
|
+
19/19 compose table โ that table is the nightly's to fill.
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
## Three-plane RC sweep for 0.2.41 (2026-11-21, candidate base 78b0f52)
|
|
762
|
+
|
|
763
|
+
Every published โฅ 0.2.0 re-verified with the FULL wired protocol at the release-candidate
|
|
764
|
+
base: one fresh workspace per version, committed manifests+lockfile+empty node_modules,
|
|
765
|
+
legs `unit+integration+compose`, sequential boots. **12/19 pass all three planes** (0.2.0-rc.1
|
|
766
|
+
โ 0.2.1-rc.5). **0.2.2 line: 7/7 suite-green, compose FAIL** โ every one attributed,
|
|
767
|
+
`fail-broken-preset โ rows this host cannot activate:
|
|
768
|
+
@deepseek-ai/dsh-tool-subagent-control/list-agents` (0.2.2-alpha.2 additionally carries the
|
|
769
|
+
host-internal 'parent' crash); this is #445 rendered by #454's instrument, now visible in the
|
|
770
|
+
shipped table rather than remembered in prose. Receipts: `matrix-verdicts/` (replaced at this
|
|
771
|
+
table), resolved lockfiles archived beside each verdict.
|
|
772
|
+
|
|
773
|
+
Operational incident, recorded as taught: the FIRST pass lost ten cells at 12:13Z when the
|
|
774
|
+
/tmp tmpfs exhausted its 1,048,576-inode pool (bytes at 17% โ the fresh-workspace protocol
|
|
775
|
+
is inode-hungry). Three cells self-recorded `untestable` with npm's dying words; seven
|
|
776
|
+
crashed pre-write. None shipped: the rerun on ext4 settled all ten, and docs/development.md
|
|
777
|
+
gained the rule (`untestable` never rides a release table). The compose leg's first real
|
|
778
|
+
multi-line run also proved its attribution text rides verdict JSONs verbatim on both outcomes.
|
|
779
|
+
|
|
780
|
+
## Post-#445 three-plane table (2026-11-22, base ddc841b, receipts in matrix-verdicts/)
|
|
781
|
+
|
|
782
|
+
Full registry sweep re-executed at the release-candidate base with the export-map keep/drop
|
|
783
|
+
merged: **18/19 versions green on ALL THREE planes** โ suites AND compose โ including every
|
|
784
|
+
0.2.2 version except **0.2.2-alpha.2, which stands attributed-red**: its registry reads
|
|
785
|
+
`impl.fiber` where cordis 4.x provides `impl.ctx.fiber` (host-side two-line typo, fixed
|
|
786
|
+
upstream in alpha.3 โ byte-diffed evidence on #445, host-bug report at
|
|
787
|
+
var/evidence/445-host-bug-alpha2.md). The compose column flipped 6 versions redโgreen by
|
|
788
|
+
EXECUTION, not extrapolation; alpha.2's detail line carries the host crash text verbatim,
|
|
789
|
+
exactly as the attribution doctrine requires. Registry drift during the run was again
|
|
790
|
+
absorbed by the #449 alignment (rc.5: `aligned root zod 4.6.7 -> 4.6.6`, host's own pin).
|
|
791
|
+
The compose-leg timing stall seen once on CI (#462) did not recur in any of the 19 legs.
|
package/lib/attach.d.ts
CHANGED
|
@@ -20,8 +20,10 @@ export interface AttachPorts {
|
|
|
20
20
|
workspaceRegistry: unknown;
|
|
21
21
|
/** the host's `sessionQuery` service; absent โ listing cannot be verified, said out loud */
|
|
22
22
|
sessionQuery: unknown;
|
|
23
|
-
/** the host's `sessionController` service; its `list
|
|
24
|
-
*
|
|
23
|
+
/** the host's `sessionController` service; its `list` is the surface the BROWSER reads.
|
|
24
|
+
* Measured (#180, docs/contract.md): the gateway's `list(_request, signal)` resolves the
|
|
25
|
+
* `{ items: SessionSummary[] }` envelope; the client face is a NON-callable ObservableSnapshot.
|
|
26
|
+
* Absent or unreadable โ the gateway half of the verification is UNVERIFIED, said out loud. */
|
|
25
27
|
sessionController?: unknown;
|
|
26
28
|
/** the diagnostics seam (`src/diag.ts`): sink + logger, never throws */
|
|
27
29
|
diagnostic(where: string, message: string, error?: unknown): void;
|
|
@@ -43,4 +45,16 @@ export interface AttachOutcome {
|
|
|
43
45
|
/** user-visible words for anything short of attached+listed โ these reach the door result */
|
|
44
46
|
warnings: string[];
|
|
45
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* #180 โ the ONE reader for whatever a session-list surface hands back. Measured shapes
|
|
50
|
+
* (docs/contract.md ยง The two session LIST surfaces): the gateway `SessionController.list`
|
|
51
|
+
* resolves the `SessionListValue` envelope `{ items: [{ sessionId, โฆ }] }`; the client
|
|
52
|
+
* `ISessions.list` is a non-callable `ObservableSnapshot` over `{ ids, byId }`. A bare array
|
|
53
|
+
* stays accepted defensively (old fixtures, other hosts). Anything else is `undefined` =
|
|
54
|
+
* UNREADABLE, which the caller must report as UNVERIFIED with the shape named โ the old
|
|
55
|
+
* `(await sc.list() ?? []).map(...` threw TypeError on the envelope because `?? []` only
|
|
56
|
+
* catches null/undefined, and a truthy non-array sailed into `.map`. That silent degradation
|
|
57
|
+
* cost a whole release of blind browser-visibility verification.
|
|
58
|
+
*/
|
|
59
|
+
export declare const sessionIdsFromList: (value: unknown) => string[] | undefined;
|
|
46
60
|
export declare function attachCreatedChild(ports: AttachPorts): Promise<AttachOutcome>;
|
package/lib/attach.js
CHANGED
|
@@ -25,6 +25,37 @@ const shape = (v) => {
|
|
|
25
25
|
const keys = Object.keys(v).slice(0, 6);
|
|
26
26
|
return `${Array.isArray(v) ? 'array' : 'object'}{${keys.join(',')}}`;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* #180 โ the ONE reader for whatever a session-list surface hands back. Measured shapes
|
|
30
|
+
* (docs/contract.md ยง The two session LIST surfaces): the gateway `SessionController.list`
|
|
31
|
+
* resolves the `SessionListValue` envelope `{ items: [{ sessionId, โฆ }] }`; the client
|
|
32
|
+
* `ISessions.list` is a non-callable `ObservableSnapshot` over `{ ids, byId }`. A bare array
|
|
33
|
+
* stays accepted defensively (old fixtures, other hosts). Anything else is `undefined` =
|
|
34
|
+
* UNREADABLE, which the caller must report as UNVERIFIED with the shape named โ the old
|
|
35
|
+
* `(await sc.list() ?? []).map(...` threw TypeError on the envelope because `?? []` only
|
|
36
|
+
* catches null/undefined, and a truthy non-array sailed into `.map`. That silent degradation
|
|
37
|
+
* cost a whole release of blind browser-visibility verification.
|
|
38
|
+
*/
|
|
39
|
+
export const sessionIdsFromList = (value) => {
|
|
40
|
+
if (Array.isArray(value)) {
|
|
41
|
+
return value.map((r) => {
|
|
42
|
+
const row = r;
|
|
43
|
+
return row?.sessionId ?? row?.header?.id ?? row?.id ?? '';
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (value === null || typeof value !== 'object')
|
|
47
|
+
return undefined;
|
|
48
|
+
const o = value;
|
|
49
|
+
if (Array.isArray(o.items))
|
|
50
|
+
return sessionIdsFromList(o.items);
|
|
51
|
+
if (Array.isArray(o.ids))
|
|
52
|
+
return o.ids.map((id) => String(id));
|
|
53
|
+
if (o.byId !== null && typeof o.byId === 'object')
|
|
54
|
+
return Object.keys(o.byId);
|
|
55
|
+
if (typeof o.getSnapshot === 'function')
|
|
56
|
+
return sessionIdsFromList(o.getSnapshot());
|
|
57
|
+
return undefined;
|
|
58
|
+
};
|
|
28
59
|
export async function attachCreatedChild(ports) {
|
|
29
60
|
const warnings = [];
|
|
30
61
|
const registry = ports.workspaceRegistry;
|
|
@@ -87,24 +118,50 @@ export async function attachCreatedChild(ports) {
|
|
|
87
118
|
// (measured: the door's roster note said `MISSING, 1 sessions` while `listSessions`
|
|
88
119
|
// listed it) โ so a single boolean would have called that a success.
|
|
89
120
|
const sc = ports.sessionController;
|
|
90
|
-
if (
|
|
91
|
-
//
|
|
121
|
+
if (sc === null || sc === undefined) {
|
|
122
|
+
// This silence is what cost a round of the 0.2.x hunt: "no warning" got read as "the
|
|
92
123
|
// gateway lists it". An unverified surface is a STATE and must be delivered as one.
|
|
93
124
|
const reason = `child ${ports.childId} is listed in the durable session corpus, but its presence in the gateway (browser) session list could not be verified โ no "sessionController" service to ask`;
|
|
94
125
|
ports.diagnostic('attach:gatewayList', reason, `resolved=${shape(ports.sessionController)}`);
|
|
95
126
|
return { attached: true, listed: true, gatewayListed: undefined, warnings: [reason] };
|
|
96
127
|
}
|
|
97
|
-
let gids
|
|
128
|
+
let gids;
|
|
129
|
+
let unreadable;
|
|
98
130
|
try {
|
|
99
|
-
|
|
131
|
+
// #180 โ `list` is a METHOD on the gateway service and a non-callable ObservableSnapshot
|
|
132
|
+
// PROPERTY on the client face; both are measured shapes (docs/contract.md). Read either,
|
|
133
|
+
// then normalize the result through the ONE reader. Never pipe it into `.map` blind.
|
|
134
|
+
const member = sc.list;
|
|
135
|
+
if (typeof member === 'function') {
|
|
136
|
+
const value = await member.call(sc);
|
|
137
|
+
gids = sessionIdsFromList(value);
|
|
138
|
+
if (gids === undefined)
|
|
139
|
+
unreadable = `unrecognized session-list shape ${shape(value)}`;
|
|
140
|
+
}
|
|
141
|
+
else if (member !== null && typeof member === 'object') {
|
|
142
|
+
gids = sessionIdsFromList(member);
|
|
143
|
+
if (gids === undefined)
|
|
144
|
+
unreadable = `unrecognized session-list shape ${shape(member)}`;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
unreadable = `no readable "list" on the resolved service (got ${shape(sc)})`;
|
|
148
|
+
}
|
|
100
149
|
}
|
|
101
150
|
catch (error) {
|
|
102
|
-
|
|
103
|
-
|
|
151
|
+
unreadable = `sessionController.list failed: ${String(error?.message ?? error)}`;
|
|
152
|
+
}
|
|
153
|
+
if (gids === undefined) {
|
|
154
|
+
const reason = `child ${ports.childId} is listed in the durable session corpus, but its presence in the gateway (browser) session list could not be verified โ ${unreadable}`;
|
|
155
|
+
ports.diagnostic('attach:gatewayList', reason, unreadable);
|
|
104
156
|
return { attached: true, listed: true, gatewayListed: undefined, warnings: [reason] };
|
|
105
157
|
}
|
|
106
|
-
if (gids.includes(ports.childId))
|
|
158
|
+
if (gids.includes(ports.childId)) {
|
|
159
|
+
// The acceptance of #180: a check that works SAYS it works, with what it counted. The
|
|
160
|
+
// failure mode was never a crash the user saw โ it was a verdict that degraded to
|
|
161
|
+
// "could not be verified" so quietly the whole surface went unread.
|
|
162
|
+
ports.diagnostic('attach:gatewayList', `child ${ports.childId} is gateway-listed (${String(gids.length)} sessions) โ the browser can show and open it`);
|
|
107
163
|
return { attached: true, listed: true, gatewayListed: true, warnings: [] };
|
|
164
|
+
}
|
|
108
165
|
const reason = `child ${ports.childId} is in the durable session list but NOT in the gateway's session list (sessionController.list returned ${String(gids.length)} sessions) โ the browser cannot show or open it, so the door will not be able to switch`;
|
|
109
166
|
ports.diagnostic('attach:gatewayList', reason, `gateway=${gids.slice(0, 4).join(',')}`);
|
|
110
167
|
return { attached: true, listed: true, gatewayListed: false, warnings: [reason] };
|
package/lib/attach.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attach.js","sourceRoot":"","sources":["../src/attach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"attach.js","sourceRoot":"","sources":["../src/attach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAkCH,MAAM,KAAK,GAAG,CAAC,CAAU,EAAU,EAAE;IACnC,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,MAAM,CAAA;IAC7B,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,WAAW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