test(router-parity): reserved mesh path refused on Node for CARD-21 (owner approval required)
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 15s
CI / build (pull_request) Successful in 26s
CI / runtimes (deno) (pull_request) Successful in 19s
CI / runtimes (edge) (pull_request) Successful in 14s

Golden update for ws-node-upgrade.json, needs owner approval (CARD-08
rule). The WS parity fixture declared @Ws('/__mesh__/control') to
capture the old adapter split: the Node listener served it (101, the
route's frame, close 1005), app.upgrade refused it (1008). Under D17
that route fails createApp, so the fixture drops it and keeps the path
in UPGRADE_PATHS. The Node row now matches the app.upgrade row: 101, no
frame, close 1008 with the shared reason.

ws-app-upgrade.json is unchanged: app.upgrade already refused the path
before matching, so removing the route does not change its answer.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-10-23 00:03:20 -05:00
1 parent c025ea9003
commit 03bdf427d8
2 files changed
+7 -13

No files matched your search

@@ -134,15 +134,10 @@
{ {
"path": "/__mesh__/control", "path": "/__mesh__/control",
"status": 101, "status": 101,
"sent": [ "sent": [],
{
"id": "reserved",
"params": {}
}
],
"close": { "close": {
"code": 1005, "code": 1008,
"reason": "" "reason": "mesh control channel not enabled: this app exports nothing, or has no mesh.secret"
} }
} }
] ]
+4 -5
View File
@@ -3,7 +3,8 @@
* with no specificity ranking, an HTTP route at the same path never takes the upgrade, and the mesh * with no specificity ranking, an HTTP route at the same path never takes the upgrade, and the mesh
* control path is checked before WS route matching. Captured through both upgrade entry points — * control path is checked before WS route matching. Captured through both upgrade entry points —
* `app.upgrade` (Deno/Bun/edge) and the Node `server.on('upgrade')` listener — because they are * `app.upgrade` (Deno/Bun/edge) and the Node `server.on('upgrade')` listener — because they are
* separate code paths and do not agree on everything (see the reserved-path rows in the fixture). * separate code paths. They used to disagree on the reserved mesh path; since CARD-21 (D17) both refuse
* it with the same 1008 close.
*/ */
import 'reflect-metadata'; import 'reflect-metadata';
import type { AddressInfo } from 'net'; import type { AddressInfo } from 'net';
@@ -40,10 +41,8 @@ class ParityWs {
@Stream('/feed') feed() { @Stream('/feed') feed() {
return announce('feed', {}); return announce('feed', {});
} }
// A user route on the reserved mesh path, on an app with no mesh: the two adapters disagree here. // No route on the reserved mesh path: since CARD-21 (D17) the boot refuses one. The path stays in
@Ws('/__mesh__/control') reserved(@param() p: Record<string, string>) { // UPGRADE_PATHS so both adapters' refusal on an app with no mesh is captured; they now agree.
return announce('reserved', p);
}
} }
@Module({ mountpoint: '/', controllers: [ParityWs] }) @Module({ mountpoint: '/', controllers: [ParityWs] })