Skip to content

Commit b92c694

Browse files
Follow the 19 October 2026 drafts: moving resources (§9.6), the LWS profile; Touchstone 210/221
Touchstone re-baselined on the 19 Oct core WD (221 tests) and failed two MUSTs here: a patch of a linkset's up link was ignored with 204 where the draft now requires a refusal or a move. - Moving resources: a changed up link moves a data resource or a container (with everything in it) into an existing container of this storage, atomically (one rename; linkset sidecars and type-index entries follow); refused with 409 when the destination is missing, not a container, outside the storage, the resource itself or a descendant, or already holds the name; refused when the patch removes the up link or leaves several. Authorization is delete on the resource (the whole subtree for a container, judged before anything moves) plus create in the destination. One Move activity (origin, target, object as it is after), heard by subscriptions to the container left as well as the one joined. The storage description advertises MoveResource { appliesTo: [DataResource, Container], preservesIdentifier: false }: identifiers are paths here, so the response is 200 + the new linkset + Content-Location and the old identifiers (resource and linkset) answer 301, following later moves too. - The LWS profile: application/ld+json and text/turtle asked for with profile="https://www.w3.org/ns/lws/v1" are served in that media type with the profile in the Content-Type and the same RDF as application/lws+json; the Turtle is written from the listing under the WG's lws/v1 context. - Tests: test/move.js (15 checks) joins the suite (7 batteries, 145 checks); conformance.js follows the new up-link and profile rules. - Touchstone master cd01608, 21 Oct 2026: 210 passed, 0 failed, 11 inapplicable — conformant. Report in reports/touchstone/2026-10-21-master-cd01608/. README and CONFORMANCE.md (C16: a path-addressed storage cannot preserve identifiers) updated.
1 parent 67af25e commit b92c694

14 files changed

Lines changed: 61297 additions & 59 deletions

File tree

‎CONFORMANCE.md‎

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,32 @@ Implementation: `lws/plugin.js` + helpers (`notify.js`, `access.js`, `cidauth.js
99

1010
## Touchstone — conformant
1111

12-
[Touchstone](https://github.com/ebremer/touchstone) `master` at `6a3206e` (205 tests), run by
13-
`scripts/touchstone.sh --auth` (Authentication, ReachableFixtures, HarnessIssuedTokens declared;
14-
public read off; alice the writer; page size 4), 14 Oct 2026:
15-
16-
**197 passed, 0 failed, 0 cantTell, 8 inapplicable — conformant.** The inapplicable eight: three
17-
need `SamlTrust`, five are preconditions for optional behaviour (`Content-Location` on search
18-
results, a paginated-but-single-page listing, a first-page link on a one-page search,
19-
`Prefer: set-linkset` combined updates, container access that does not reach members). Erich Bremer's
20-
independent run of the same commit gives the same numbers: <https://ebremer.com/lws/conformance>. As an open target (`scripts/touchstone.sh`): 64 passed, 0
21-
failed, 139 inapplicable — conformant.
22-
23-
## Batteries — `npm test` runs all six (134 checks)
12+
[Touchstone](https://github.com/ebremer/touchstone) `master` at `cd01608` (221 tests, re-baselined on
13+
the 19 Oct 2026 core WD and the 15 Oct authn suites), run by `scripts/touchstone.sh --auth`
14+
(Authentication, ReachableFixtures, HarnessIssuedTokens declared; public read off; alice the writer;
15+
page size 4), 21 Oct 2026:
16+
17+
**210 passed, 0 failed, 0 cantTell, 11 inapplicable — conformant.** The inapplicable eleven: three
18+
need `SamlTrust`; three test move choices this storage does not make (`move-keeps-identifier-content-and-links`
19+
wants `preservesIdentifier: true`, `move-container-refused-without-container-support` a storage that
20+
moves data resources only, `move-refused-without-capability` one with no capability); five are
21+
preconditions for optional behaviour (`Content-Location` on search results, a paginated-but-single-page
22+
listing, a first-page link on a one-page search, `Prefer: set-linkset` combined updates, container
23+
access that does not reach members). Reports: `reports/touchstone/2026-10-21-master-cd01608/`.
24+
25+
History: 14 Oct 2026, `6a3206e` (205 tests, 5 Oct drafts): 197 passed, 0 failed, 8 inapplicable —
26+
conformant, confirmed by Erich Bremer's independent run (<https://ebremer.com/lws/conformance>).
27+
19 Oct, his run of the re-baselined harness against the then head: 197 passed, 2 failed
28+
(`linkset-up-not-redirected`, `move-refused-without-capability` — a patch of the up link was ignored
29+
with 204 where the new draft requires a refusal or a move), 22 inapplicable. Both fixed by implementing
30+
§9.6 (below).
31+
32+
## Batteries — `npm test` runs all seven (145 checks)
2433

2534
| Battery | Checks | Server config | Covers |
2635
|---|---|---|---|
27-
| `conformance.js` | 67 | `LWS_ANON_WRITES=1 LWS_PAGE_SIZE=5` | core, pagination, content PATCH, type index/search (+ strict 400/415 errors + ld+json profile), notifications with RFC 9421 signature *verification* |
36+
| `conformance.js` | 78 | `LWS_ANON_WRITES=1 LWS_PAGE_SIZE=5` | core, pagination, content PATCH, type index/search (+ strict 400/415 errors), the LWS profile in JSON-LD and Turtle, up-link refusals, notifications with RFC 9421 signature *verification* |
37+
| `move.js` | 15 | `LWS_ANON_WRITES=1` | §9.6 moving: capability, data-resource and container moves, 200 + Content-Location + 301 on the old identifiers, ETags of both containers, user links kept, refusals (missing / non-container / removed up, cycles, name collisions), one `Move` activity |
2838
| `auth.js` | 6 | `LWS_WRITERS=<did:key>` | 401 challenge + did:key self-issued JWT accept/reject |
2939
| `cid.js` | 3 | `LWS_WRITERS=<sub> LWS_CID_ALLOW_LOOPBACK=1` | CID self-issued JWT: dereference `sub` → controlled identifier doc → verify |
3040
| `grants.js` | 12 | `LWS_PUBLIC_READ=0 LWS_WRITERS=<admin>` | ODRL access-grant engine: read-gating, foaf:Agent public grants, action scoping, dateTime constraints, authz-filtered search |
@@ -73,10 +83,10 @@ Not implemented: the **OpenID** and **SAML** authn suites, and the full OAuth **
7383
authorization flow — all three require an external authorization server / identity provider,
7484
outside a storage server's scope (C11/C12). lws10-vocab publishing (a doc-gen concern).
7585

76-
## Draft drift since July (`7832003` → 5 Oct 2026 WD and later)
86+
## Draft drift since July (`7832003` → 19 Oct 2026 WD)
7787

7888
Tracked against [Touchstone](https://github.com/ebremer/touchstone), which baselines on the
79-
5 Oct core WD. Absorbed items are ticked; the rest are the upgrade list
89+
19 Oct core WD and the 15 Oct authn suites. Absorbed items are ticked; the rest are the upgrade list
8090
(JavaScriptSolidServer/JavaScriptSolidServer#621).
8191

8292
- [x] **Storage discovery** (#183, #234, 21 Aug) — `rel="storageDescription"` → `rel="https://www.w3.org/ns/lws#storage"`
@@ -129,6 +139,25 @@ Tracked against [Touchstone](https://github.com/ebremer/touchstone), which basel
129139
- [x] **secp256k1 / ES256K did:keys** (RFC 8812): a Nostr or Bitcoin key is an LWS identity as-is —
130140
`did:key` with the `0xe701` codec, credentials signed ECDSA on the same curve. `mint-token.js --nostr`
131141
takes hex or nsec. The did:key of a BIP-340 x-only pubkey is deterministic (even y).
142+
- [x] **Moving resources** (#237, 19 Oct; core §9.6): the up link in a linkset is patchable; a changed
143+
target is a move — the destination must be an existing container of this storage, a container may
144+
not go into itself or a descendant, the agent needs delete on the resource (the whole subtree for a
145+
container, judged before anything moves) and create in the destination; a patch that removes the up
146+
link or leaves several is refused (409). One `fs.rename` moves the subtree atomically; linkset
147+
sidecars and type-index entries follow. The description advertises
148+
`MoveResource { appliesTo: [DataResource, Container], preservesIdentifier: false }` — see C16.
149+
One `Move` activity (`origin`, `target`, `object` as it is after the move), heard by subscriptions to
150+
the container left as well as the one joined.
151+
- [x] **Discovery via RFC 9728 only** (#256, 19 Oct): the 401 carries the `lws#storage` link and
152+
`resource_metadata` (still with `as_uri` / `realm` for older clients); `aud` is checked to *include*
153+
the storage. The harness's exactly-one-audience test is retired; the AS still issues one.
154+
- [x] **Content negotiation narrowed; the LWS profile** (#253, 19 Oct): only `application/lws+json` is
155+
owed; `application/ld+json` / `application/json` are still served as the same document; asked for
156+
with `profile="https://www.w3.org/ns/lws/v1"`, `application/ld+json` and `text/turtle` are served
157+
in that media type with the profile in the `Content-Type` and the same RDF (the Turtle is written
158+
from the listing under the WG's `lws/v1` context: `lws:items`, `lws:totalItems`, members typed,
159+
`dcterms:format`, `schema:size` as `xsd:long`, `dcterms:modified` as `xsd:dateTime`; a contained
160+
container is only typed, as the context scopes the other three to data resources).
132161
- [ ] Notification envelopes: Activity Streams terms → dcterms + LWS (#219); core notification
133162
model folded into lws10-core (#185). (The harness accepts the AS2-shaped envelope today.)
134163
- [ ] Slug dropped from spec text (#224) — keep accepting it, stop relying on it in tests.
@@ -186,6 +215,15 @@ Tracked against [Touchstone](https://github.com/ebremer/touchstone), which basel
186215
handler reports the real method. Narrow and reversible, but it is the plugin reaching under the
187216
host. Raised as jss #628 and closed WONTFIX — a host-level method registration is a can of
188217
worms for one endpoint — so the shim is the permanent answer here.
218+
- **C16 (S)** — **a path-addressed storage cannot preserve identifiers on a move.** jss, like every
219+
file-system server, derives a resource's URI from its container path, so moving `/a/x.txt` into
220+
`/b/` makes it `/b/x.txt`. §9.6 allows this (`preservesIdentifier: false`; `200` with the new
221+
linkset and `Content-Location`; `301` from the old identifiers, which this plugin keeps in a small
222+
moved-map that follows later moves of the resource or of a container above it), but it means the
223+
draft's headline benefit — "every link pointing at that identifier" stays valid — needs an
224+
opaque-identifier storage, which neither jss nor most of the servers on the tracker are. Touchstone
225+
has no test for the non-preserving response shape yet (`move-new-identifier-response` is listed as
226+
untested), so that half is covered by `test/move.js` only.
189227
- **C14 (S)** — the CID authn suite requires the verifier to **dereference** the subject URI over
190228
the network to fetch the controlled identifier document. That's a mandatory outbound fetch from
191229
a *storage server* — an SSRF surface the spec doesn't discuss. This plugin guards it (http/https

‎README.md‎

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ by mounting an LWS protocol face — [`lws/plugin.js`](lws/plugin.js) — on
1111
distribution in the same shape as [jspod](https://github.com/JavaScriptSolidServer/jspod):
1212
JSS provides the host (HTTP, auth chain, WAC), the plugin provides lws10-core semantics.
1313

14-
**197 of 205 [Touchstone](https://github.com/ebremer/touchstone) tests pass (0 failed; see [Touchstone](#touchstone)). Own suite: 134 checks across 6 batteries** (`npm test`) over the current editors' drafts —
15-
core, searchindex, notifications, the ODRL access model, and the did:key + CID authn suites.
14+
**210 of 221 [Touchstone](https://github.com/ebremer/touchstone) tests pass (0 failed; see [Touchstone](#touchstone)). Own suite: 145 checks across 7 batteries** (`npm test`) over the 19 October 2026 drafts —
15+
core (moving resources included), searchindex, notifications, the ODRL access model, and the did:key + CID authn suites.
1616
See [CONFORMANCE.md](CONFORMANCE.md) for the full matrix and, more interestingly, the catalogue
1717
of spec conflicts and host-API gaps the implementation surfaced (C1–C14).
1818

@@ -59,6 +59,16 @@ current configuration limitations.
5959
(merge-patch), container representations (`application/lws+json` + conneg incl. `ld+json;profile`),
6060
link-based pagination, linkset metadata resources (RFC 9264), storage description discovery,
6161
`Depth: infinity` recursive delete, Range requests, RFC 9457 errors, optional 507 quota.
62+
- **Moving resources** (core §9.6, 19 Oct 2026) — a JSON Patch on a linkset's `up` link moves a data
63+
resource or a whole container between containers, atomically, with delete + create authorization,
64+
cycle and bad-destination refusals (409), one `Move` activity, and a `MoveResource` capability in the
65+
storage description. Identifiers here are paths, so a moved resource gets a new one
66+
(`preservesIdentifier: false`): the response is `200` + the new linkset + `Content-Location`, and
67+
the old identifiers answer `301`.
68+
- **The LWS profile** — a container asked for as `application/ld+json` or `text/turtle` with
69+
`profile="https://www.w3.org/ns/lws/v1"` is answered in that media type, profile named in the
70+
`Content-Type`, RDF-isomorphic to `application/lws+json` (the Turtle is written from the listing
71+
under the WG's lws/v1 context).
6272
- **lws10-searchindex** — `TypeIndexService` + `TypeSearchService` with the full CNF filter
6373
(GET + POST), types derived from `Link` headers at write time, strict 400/415 errors, and
6474
authorization-filtered results.
@@ -106,16 +116,16 @@ browser asks once before a public page may reach `localhost`. Source: [`lws/todo
106116
## Test suite
107117

108118
```bash
109-
# all four batteries (72 checks) on scratch ports:
119+
# all seven batteries (145 checks) on scratch ports:
110120
JSS_BIN=$(command -v jss) npm test
111121
```
112122

113123
Individual batteries and their server configs are documented in [CONFORMANCE.md](CONFORMANCE.md).
114124

115125
### Touchstone
116126

117-
[Touchstone](https://github.com/ebremer/touchstone) is the W3C LWS conformance harness (101
118-
tests over the 5 Oct 2026 drafts). `scripts/touchstone.sh` starts lwsd as an open target and
127+
[Touchstone](https://github.com/ebremer/touchstone) is the W3C LWS conformance harness (221
128+
tests over the 19 Oct 2026 drafts). `scripts/touchstone.sh` starts lwsd as an open target and
119129
runs it against `/lws/` on a free port, with Docker if present or a JDK 21+ build of
120130
the CLI jar otherwise; reports land in `.touchstone/runs/`.
121131

@@ -129,44 +139,49 @@ scripts/touchstone.sh --module core # or auth, core/containers, one test id
129139
Exit 1 means a verdict was reached and it's non-conformant; exit 2 means the harness produced no
130140
verdict (misconfigured or unreachable).
131141

132-
**197 of 205 Touchstone tests pass — 0 failed, 0 cantTell, 8 inapplicable (3 SAML, 5 optional
133-
preconditions). Conformant.** [Touchstone](https://github.com/ebremer/touchstone) `master` (`6a3206e`) is
134-
the W3C LWS conformance harness over the October 2026 drafts; 205 is its whole catalogue. 14 Oct 2026,
135-
per specification module:
142+
**210 of 221 Touchstone tests pass — 0 failed, 0 cantTell, 11 inapplicable (3 SAML, 8 preconditions
143+
for the other legal choice). Conformant.** [Touchstone](https://github.com/ebremer/touchstone) `master`
144+
(`cd01608`) is the W3C LWS conformance harness re-baselined on the 19 October 2026 drafts (core WD of
145+
19 Oct, authn suites of 15 Oct); 221 is its whole catalogue. 21 Oct 2026, per specification module:
136146

137147
| Specification | Touchstone manifest | Passed | MUST | SHOULD | MAY |
138148
|---|---|---|---|---|---|
139-
| **LWS 1.0 Core** — storage discovery | `core/discovery` | **7 / 7** | 6 | 1 | – |
140-
| — containers | `core/containers` | **18 / 18** | 11 | 5 | 2 |
149+
| **LWS 1.0 Core** — storage discovery (RFC 9728 protected resource metadata) | `core/discovery` | **7 / 7** | 7 | – | – |
150+
| — containers (incl. the LWS profile in JSON-LD and Turtle) | `core/containers` | **19 / 19** | 13 | 4 | 2 |
141151
| — data resources (incl. JSON Patch, Range) | `core/data_resources` | **17 / 17** | 10 | 6 | 1 |
142152
| — conditional requests and entity tags | `core/conditional_requests` | **9 / 9** | 4 | 5 | – |
143-
| — linksets (RFC 9264 metadata) | `core/linksets` | **9 / 9** | 8 | 1 | – |
144-
| — pagination | `core/pagination` | **4 / 4** | 3 | 1 | – |
145-
| — storage server authorization | `core/storage_authorization` | **17 / 17** | 17 | – | – |
153+
| — linksets (RFC 9264 metadata) | `core/linksets` | **10 / 10** | 9 | 1 | – |
154+
| — moving resources between containers | `core/moving` | **9 / 12** | 12 | – | – |
155+
| — pagination | `core/pagination` | **4 / 5** | 4 | 1 | – |
156+
| — storage server authorization | `core/storage_authorization` | **19 / 19** | 19 | – | – |
146157
| — authorization server (RFC 8693 token exchange) | `core/authorization_server` | **9 / 9** | 7 | 2 | – |
147158
| — access requests and grants (ODRL) | `core/access_grants` | **17 / 17** | 13 | 2 | 2 |
148-
| — notifications | `core/notifications` | **14 / 14** | 13 | 1 | – |
159+
| — notifications | `core/notifications` | **14 / 15** | 14 | 1 | – |
149160
| **LWS 1.0 Notification Suite: Webhooks** (RFC 9421 signatures) | `notifications/webhook` | **11 / 11** | 8 | 1 | 2 |
150-
| **LWS Search and Type Index Services** (HTTP QUERY) | `index` | **37 / 40** | 28 | 5 | 4 |
161+
| **LWS Search and Type Index Services** (HTTP QUERY) | `index` | **37 / 40** | 30 | 6 | 4 |
151162
| **Authentication Suite: Self-signed Identity (CID)** — did:key and HTTPS subjects | `auth/cid` | **22 / 22** | 22 | – | – |
152163
| **Authentication Suite: OpenID Connect** | `auth/oidc` | **6 / 6** | 6 | – | – |
153164
| Authentication Suite: SAML 2.0 | `auth/saml` | not implemented | – | – | – |
154-
| **Total** | 15 manifests | **197 / 205** | 156 | 30 | 11 |
155-
156-
The eight that are not passes are inapplicable, not failures: three need SAML, five are preconditions
157-
for optional behaviour (`Content-Location` on search results, page links on a one-page listing or
158-
search, `Prefer: set-linkset` combined updates, container access that does not reach members). The
159-
full report — EARL, HTML, JUnit — is in
160-
[`reports/touchstone/2026-10-14-master-6a3206e/`](reports/touchstone/2026-10-14-master-6a3206e/)
161-
(and the earlier 196/203 run at `5c49679` beside it).
165+
| **Total** | 16 manifests | **210 / 221** | 181 | 29 | 11 |
166+
167+
The eleven that are not passes are inapplicable, not failures: three need SAML, three test the move
168+
choices this storage does not make (a storage that preserves identifiers, one that moves data resources
169+
only, one with no move capability), and five are preconditions for optional behaviour (`Content-Location`
170+
on search results, page links on a one-page listing or search, `Prefer: set-linkset` combined updates,
171+
container access that does not reach members). The full report — EARL, HTML, JUnit — is in
172+
[`reports/touchstone/2026-10-21-master-cd01608/`](reports/touchstone/2026-10-21-master-cd01608/)
173+
(the 14 Oct runs on the 5 Oct drafts, 197/205 and 196/203, are beside it).
162174
Run it yourself with `scripts/touchstone.sh --auth`; a fresh report lands in `.touchstone/runs/`.
163175

164176
**Independently verified.** Erich Bremer, Touchstone's author, re-runs the harness against this
165177
repository's head on every harness update and publishes the results beside the other LWS servers:
166-
**<https://ebremer.com/lws/conformance>** (first entry 14 Oct 2026: 197 of 205, 0 failed, conformant).
167-
That page, not this README, is the current number.
178+
**<https://ebremer.com/lws/conformance>** (14 Oct 2026: 197 of 205, conformant; 19 Oct, on the
179+
re-baselined harness and before this repository followed the new drafts: 197 of 221 with two move
180+
refusals failing — fixed here, pending his re-run). That page, not this README, is the current number.
168181

169-
Outside the harness's reach: notification envelopes still use the Activity Streams shape the
182+
Outside the harness's reach: the `200` + `Content-Location` + `301` behaviour of a storage that does
183+
not preserve identifiers on a move (the harness has no test for it yet; `test/move.js` covers it);
184+
notification envelopes still use the Activity Streams shape the
170185
harness accepts (the draft moved to dcterms, w3c/lws-protocol#219); `LWS_ACCEPT_CREDENTIALS`
171186
defaults to on, so a did:key / CID credential presented directly as a Bearer token still works
172187
(set it to `0` for token-exchange only); and the HTTP `QUERY` search reaches the plugin through a

‎lws/notify.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ export class Notifier {
8080
// subscriber may still read the resource — `allow(sub, resourceUri)` is
8181
// asked at delivery time, so a revoked grant silences a subscription
8282
// without anyone having to delete it. Fire-and-forget.
83-
emit (storageId, activity, allow = async () => true) {
83+
// `alsoUris` are further identifiers the activity concerns — a Move's
84+
// former identifier, so a subscription to the container it left hears it.
85+
emit (storageId, activity, allow = async () => true, alsoUris = []) {
8486
const full = { id: randomUUID(), published: new Date().toISOString(), ...activity }
8587
for (const sub of Object.values(this.subs)) {
86-
if (!this.matches(sub, full.object.id)) continue
88+
if (![full.object.id, ...alsoUris].some((u) => this.matches(sub, u))) continue
8789
Promise.resolve(allow(sub, full.object.id))
8890
.then((ok) => ok && this.deliverWithRetry(sub, storageId, full))
8991
.catch((err) => this.log?.warn(`lws notify: delivery to ${sub.inbox} failed: ${err.message}`))

0 commit comments

Comments
 (0)