From 03bdf427d8642ee948bfccc6308d0b7407f96a40 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 22 Oct 2026 23:55:24 -0500 Subject: [PATCH] test(router-parity): reserved mesh path refused on Node for CARD-21 (owner approval required) 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 --- test/router-parity/frozen/ws-node-upgrade.json | 11 +++-------- test/router-parity/ws.test.ts | 9 ++++----- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/test/router-parity/frozen/ws-node-upgrade.json b/test/router-parity/frozen/ws-node-upgrade.json index df82268..475e583 100644 --- a/test/router-parity/frozen/ws-node-upgrade.json +++ b/test/router-parity/frozen/ws-node-upgrade.json @@ -134,15 +134,10 @@ { "path": "/__mesh__/control", "status": 101, - "sent": [ - { - "id": "reserved", - "params": {} - } - ], + "sent": [], "close": { - "code": 1005, - "reason": "" + "code": 1008, + "reason": "mesh control channel not enabled: this app exports nothing, or has no mesh.secret" } } ] diff --git a/test/router-parity/ws.test.ts b/test/router-parity/ws.test.ts index f3bb3a1..492ff2c 100644 --- a/test/router-parity/ws.test.ts +++ b/test/router-parity/ws.test.ts @@ -3,7 +3,8 @@ * 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 — * `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 type { AddressInfo } from 'net'; @@ -40,10 +41,8 @@ class ParityWs { @Stream('/feed') feed() { return announce('feed', {}); } - // A user route on the reserved mesh path, on an app with no mesh: the two adapters disagree here. - @Ws('/__mesh__/control') reserved(@param() p: Record) { - return announce('reserved', p); - } + // No route on the reserved mesh path: since CARD-21 (D17) the boot refuses one. The path stays in + // UPGRADE_PATHS so both adapters' refusal on an app with no mesh is captured; they now agree. } @Module({ mountpoint: '/', controllers: [ParityWs] })