Files
core/test/router-parity/frozen/app-fetch.json
T
chrnx c30cf7e457 test(router): freeze the differential, application, WS and boot-error corpus
The parity corpus from ROUTER-CORPUS §2, with every expected output captured
from ed47836 rather than written by hand.

Matcher: 24 hand-picked scenarios (precedence, constraint ties, exact versus
catch-all, equal-rank and same-pattern ties with reversed twins, implicit and
explicit HEAD, streaming GETs, canonical Allow, encoding, case, Unicode and
normalization) plus 40 scenarios from a fixed-seed generator
(router-parity-gen-v1, seed 10908). The generated file stores the seed, the
rules and every generated input; the test regenerates and requires a match,
so changing the generator cannot move the baseline. Each scenario runs through
the oracle and the live router and both must equal the capture, compared by
declaration ID, decoded params, implicitHead, ordered Allow, or the
normalization error.

Application level: status, Allow, headers and body through app.fetch and a
Node socket, including HEAD body suppression, 400/404/405 and OPTIONS.

WebSocket, separate from HTTP: first-registered selection, an HTTP route at the
same path not taking the upgrade, and the reserved mesh control path, through
app.upgrade and the Node listener. This freezes one adapter disagreement as
observed: a user @Ws('/__mesh__/control') on an app without mesh is refused by
app.upgrade (1008) and served by the Node listener.

Boot-time rejections: pattern compilation, local ambiguity and mesh splicing
(duplicate exports, same-shape exports, local-over-remote precedence with its
warning, and a remote static outranking a local parameter route).

Refs #109

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-10-10 16:59:45 -05:00

598 lines
16 KiB
JSON

{
"revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a",
"data": [
{
"method": "GET",
"raw": "/a/b",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"aB\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/a/x",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"aId\",\"params\":{\"id\":\"x\"}}"
},
{
"method": "GET",
"raw": "/a/x/y",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"aRest\",\"params\":{\"rest\":\"x/y\"}}"
},
{
"method": "GET",
"raw": "/a",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"aRest\",\"params\":{\"rest\":\"\"}}"
},
{
"method": "GET",
"raw": "/users/42",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"usersId\",\"params\":{\"id\":\"42\"}}"
},
{
"method": "GET",
"raw": "/users/alice",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"usersValue\",\"params\":{\"value\":\"alice\"}}"
},
{
"method": "GET",
"raw": "/users/a%20b",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"usersValue\",\"params\":{\"value\":\"a b\"}}"
},
{
"method": "GET",
"raw": "/n/42",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"nNum\",\"params\":{\"num\":\"42\"}}"
},
{
"method": "GET",
"raw": "/n/ff",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"nCode\",\"params\":{\"code\":\"ff\"}}"
},
{
"method": "GET",
"raw": "/files",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"files\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/files/",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"files\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/files/a%2Fb",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"filesRest\",\"params\":{\"rest\":\"a/b\"}}"
},
{
"method": "GET",
"raw": "/m",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"mGet\",\"params\":{}}"
},
{
"method": "HEAD",
"raw": "/m",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "OPTIONS",
"raw": "/m",
"status": 204,
"headers": {
"allow": "GET, HEAD, POST, OPTIONS",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "PUT",
"raw": "/m",
"status": 405,
"headers": {
"allow": "GET, HEAD, POST, OPTIONS",
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Method Not Allowed\"}"
},
{
"method": "DELETE",
"raw": "/m",
"status": 405,
"headers": {
"allow": "GET, HEAD, POST, OPTIONS",
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Method Not Allowed\"}"
},
{
"method": "POST",
"raw": "/m",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"mPost\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/h",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"hGet\",\"params\":{}}"
},
{
"method": "HEAD",
"raw": "/h",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "GET",
"raw": "/stream",
"status": 200,
"headers": {
"cache-control": "no-cache",
"content-type": "text/event-stream",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "data: {\"id\":\"stream\"}\n\n"
},
{
"method": "HEAD",
"raw": "/stream",
"status": 405,
"headers": {
"allow": "GET, OPTIONS",
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "OPTIONS",
"raw": "/stream",
"status": 204,
"headers": {
"allow": "GET, OPTIONS",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "HEAD",
"raw": "/s/live",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "HEAD",
"raw": "/s/x",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "GET",
"raw": "/absent",
"status": 404,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Not Found\"}"
},
{
"method": "HEAD",
"raw": "/absent",
"status": 404,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "OPTIONS",
"raw": "/absent",
"status": 404,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Not Found\"}"
},
{
"method": "GET",
"raw": "/users/%E0%A4%A",
"status": 400,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Bad Request\"}"
},
{
"method": "HEAD",
"raw": "/users/%E0%A4%A",
"status": 400,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "GET",
"raw": "/a//b",
"status": 400,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Bad Request\"}"
},
{
"method": "GET",
"raw": "/Case",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"caseUpper\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/case",
"status": 404,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Not Found\"}"
},
{
"method": "GET",
"raw": "/caf%C3%A9",
"status": 404,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Not Found\"}"
},
{
"method": "GET",
"raw": "/u/caf%C3%A9",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"uName\",\"params\":{\"name\":\"café\"}}"
},
{
"method": "GET",
"raw": "/public/../admin",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"admin\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/public/%2e%2e/admin",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"admin\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/public/..%2fadmin",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"publicFile\",\"params\":{\"file\":\"../admin\"}}"
},
{
"method": "GET",
"raw": "/admin/",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"admin\",\"params\":{}}"
},
{
"method": "OPTIONS",
"raw": "/r",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"rOptions\",\"params\":{}}"
},
{
"method": "HEAD",
"raw": "/r",
"status": 405,
"headers": {
"allow": "PUT, PATCH, DELETE, OPTIONS",
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": ""
},
{
"method": "GET",
"raw": "/r",
"status": 405,
"headers": {
"allow": "PUT, PATCH, DELETE, OPTIONS",
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Method Not Allowed\"}"
},
{
"method": "PURGE",
"raw": "/r",
"status": 405,
"headers": {
"allow": "PUT, PATCH, DELETE, OPTIONS",
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"error\":\"Method Not Allowed\"}"
},
{
"method": "GET",
"raw": "/",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"root\",\"params\":{}}"
},
{
"method": "GET",
"raw": "/?q=1",
"status": 200,
"headers": {
"content-type": "application/json",
"referrer-policy": "no-referrer",
"x-content-type-options": "nosniff",
"x-dns-prefetch-control": "off",
"x-frame-options": "SAMEORIGIN"
},
"body": "{\"id\":\"root\",\"params\":{}}"
}
]
}