commit a2e943c523f1eea25131c64ddeb9c53b19cca342 Author: Reavo End Date: Sun Sep 6 03:46:25 2026 -0700 docs(webserve): ADR-0056 Amendment 1 — node prefix beats the docs compat alias at the router W0 stop-and-refer from todlando: a peer named like a docs section (`cli`) makes `/cli/…` both a node prefix and a bare docs path. Ruling: local node → known peer → docs alias, because the node-prefixed URL is the one grammar and must resolve on every machine while the alias always has a canonical `//docs/…` twin. Reserved facet names are refused as node names. Co-authored by: doyle diff --git a/docs/adr/0056-node-prefixed-url-namespace.md b/docs/adr/0056-node-prefixed-url-namespace.md index 3929439a..f23448d9 100644 --- a/docs/adr/0056-node-prefixed-url-namespace.md +++ b/docs/adr/0056-node-prefixed-url-namespace.md @@ -46,3 +46,30 @@ shorthand it expands itself. rare and identity-bearing; this adds one more reason to treat them so. - The node prefix is the only cross-node disambiguator; per-node name collisions are handled inside the registry (ADR-0057), never by the grammar. + +## Amendment 1 — router precedence when a node name collides with a docs compat path (doyle ruling, 2026-09-06, W0 stop-and-refer) + +The docs site's bare paths (`/cli/…`, `/reference/…`, `/llms-full.txt`, …) stay reachable as a +compatibility alias. A subnet peer may be named like a docs section (`cli`), making +`/cli/…` both a node prefix and a bare docs path. Precedence at the router, first match wins: + +1. `/` → 302 to `//`. +2. First segment is the **local node** → local facets (`f/`, `docs/`, `a/`, `m/`, `bin/`, + `install`; unknown facet → 404 naming the facet). +3. First segment is a **known subnet peer** → that node's URL (502-with-node until the + cross-node proxy lands; then proxied). +4. Otherwise → the **docs compat alias**, byte-true to the docs server's published surface + (REQ-DOCS-LOCAL-SERVER); no page → the docs 404. + +**A node name shadows the alias, never the reverse.** The node-prefixed URL is the one grammar +and must resolve on every machine; the alias exists for old links and every alias path has a +canonical twin `//docs/` that never flips. Resolving the alias first would +make a peer's canonical URL unreachable from this node — exactly the "URL that only works on +one machine" this ADR forbids. The shadow is per section and only while such a peer is in the +subnet; the serving page documents it as the alias's one caveat and points at the canonical +form. Root files with an extension (`llms.txt`, `manifest.schema.json`, `*.md`) can never be +node names, so the llms contract is never shadowed. + +**Reserved facet names are not node names.** A node named `docs`, `f`, `a`, `m`, `bin` or +`install` is refused wherever node names are minted, and reported loud at subnet join if one +arrives from elsewhere; the router never treats a top-level facet token as a node.