diff --git a/.gitignore b/.gitignore index ce6697a..edf3388 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ coverage/ # Edge (Miniflare) test bundle artifact test/edge/_worker.mjs +test/edge/_parity-worker.mjs # Bun writes this on `bun install`, and nothing here consumes it: `npm run test:bun` runs # `bun test` against the node_modules npm installed, which package-lock.json already pins. diff --git a/bench/baseline/router-ed47836/README.md b/bench/baseline/router-ed47836/README.md new file mode 100644 index 0000000..fa92453 --- /dev/null +++ b/bench/baseline/router-ed47836/README.md @@ -0,0 +1,82 @@ +# Pre-radix router baseline — `ed47836` + +The performance half of the CARD-08 parity corpus (FPRD-001, #109), captured before any CARD-07 +router change and immutable through CARD-07 review, like `test/router-parity/`. CARD-10 measures +the radix index with the **same harness and defaults, on the same host, cpuset and image**, running +`LOOKUP_ROUTERS="base=,head=src/http/router.ts"`. Do not re-run into this directory: +a new capture goes in a new directory. + +## Files + +| File | What it is | +|---|---| +| `lookup-raw.json` | **The D4 baseline.** Interleaved `bench:lookup` with the live linear matcher as A and the byte-identical frozen oracle as B: environment, method, every sample of every round, and the summary. The live column gives the absolute baseline; the B/A ratios give the A/A noise floor. | +| `lookup-summary.txt` | The tables that run printed. | +| `load.txt` | `uptime` and running CI job containers, before and after. | +| `battery-run/` | The superseded first capture (laptop on battery, sequential harness), kept for reference, including its `bench:compare` end-to-end req/s run. | + +## Environment + +| | | +|---|---| +| Host | jarvis (homelab), Ubuntu 24.04.3 LTS, kernel 6.8.0-138-generic, x86_64 | +| CPU | AMD Ryzen 7 3700X, 8 cores / 16 threads, 2 × 16 MiB L3, governor `schedutil` (host default; not changed) | +| Memory | 62.7 GiB | +| Isolation | `docker run --rm --cpuset-cpus 6,7,14,15`: physical cores 6 and 7 plus their SMT siblings, both on the second CCX. All 16 CPUs were 0.0–0.8% busy in a 5 s sample beforehand. | +| Container | `node:22` (`sha256:5647be70…`), Node v22.23.1, V8 12.4.254.21-node.56; Docker 29.1.3 | +| Power | Not applicable (mains-powered server) | +| Load | 1-minute load 0.27 before, 0.79 after; no CI job containers running (see `load.txt`). jarvis also runs long-lived services (payments-automation, open-webui, windmill, the Gitea act_runner, alloy, beszel), none of them pinned off these cores. | +| Revision | Router at `ed47836c9820c47bf4ed5e902d91e019abdb110a`; harness `ee7fdec`, whose `src/` is byte-identical to `ed47836`. Copied with `git archive`, `npm ci --ignore-scripts` in the container. | +| Env vars | Only `LOOKUP_*` (recorded in `meta.env`); no `NODE_OPTIONS`. | + +## Method (`bench/lookup.ts` at `ee7fdec`, defaults) + +- **Operation:** `resolveRoute(routes, method, path)`, and on `undefined`, `allowedMethods(routes, path)` — what `dispatch` does after `normalizeRequestPath`. +- **Route counts:** 10, 100 and 500 **total registered HTTP routes**, from the recorded generator (`meta.method.routeGenerator`). +- **Workloads:** static hit, late parameter hit, method miss, path miss; each answer is asserted before timing. +- **Interleaving:** for each cell, every router is warmed for 250 ms (also calibrating ≈25 ms samples), then 21 rounds of one sample per router with the order alternating AB / BA. +- **Repetitions:** 4 fresh processes, with module import order alternating per process → 84 paired rounds per cell. Every sample is kept. +- **Statistics:** absolute = median ns per lookup over all 84 samples; ratio = median of the 84 per-round B/A ratios, with a percentile-bootstrap 95% CI (4000 resamples, seed 10908). + +## Baseline: live linear matcher (median ns per lookup) + +| Routes | Workload | live median ns | run medians (ns) | run spread | +|---:|---|---:|---|---:| +| 10 | static hit | 185.3 | 156.1 / 187.7 / 174.1 / 194.2 | 20.5% | +| 10 | late param hit | 328.4 | 311.9 / 336.2 / 323.0 / 342.4 | 9.3% | +| 10 | method miss | 800.4 | 762.6 / 801.2 / 798.6 / 804.4 | 5.2% | +| 10 | path miss | 625.5 | 594.6 / 631.3 / 620.3 / 628.1 | 5.9% | +| 100 | static hit | 201.2 | 202.2 / 200.8 / 197.6 / 207.2 | 4.8% | +| 100 | late param hit | 878.0 | 861.1 / 857.0 / 907.3 / 880.5 | 5.7% | +| 100 | method miss | 2,525 | 2,424 / 2,514 / 2,580 / 2,531 | 6.2% | +| 100 | path miss | 3,054 | 2,965 / 3,024 / 3,114 / 3,071 | 4.9% | +| 500 | static hit | 202.2 | 201.8 / 202.3 / 195.1 / 210.3 | 7.5% | +| 500 | late param hit | 2,931 | 2,830 / 2,804 / 2,980 / 3,016 | 7.2% | +| 500 | method miss | 11,904 | 11,635 / 11,518 / 11,946 / 12,031 | 4.3% | +| 500 | path miss | 15,514 | 15,103 / 14,972 / 15,665 / 16,034 | 6.8% | + +## A/A noise floor: identical code, oracle / live + +| Routes | Workload | oracle / live median | 95% CI | +|---:|---|---:|---| +| 10 | static hit | 0.9507 (-4.9%) | -13.7% … +11.9% | +| 10 | late param hit | 1.0415 (+4.1%) | -1.6% … +9.8% | +| 10 | method miss | 0.9809 (-1.9%) | -4.4% … +0.8% | +| 10 | path miss | 0.9919 (-0.8%) | -3.2% … +1.4% | +| 100 | static hit | 1.0082 (+0.8%) | -1.9% … +4.5% | +| 100 | late param hit | 1.0247 (+2.5%) | +1.9% … +2.9% | +| 100 | method miss | 1.0055 (+0.6%) | +0.3% … +0.7% | +| 100 | path miss | 1.0165 (+1.7%) | +1.2% … +1.9% | +| 500 | static hit | 1.0107 (+1.1%) | -2.2% … +4.5% | +| 500 | late param hit | 0.9838 (-1.6%) | -2.2% … +0.8% | +| 500 | method miss | 1.0197 (+2.0%) | +1.6% … +2.3% | +| 500 | path miss | 1.0161 (+1.6%) | +0.5% … +2.6% | + +**For D4:** + +- **Import order.** In-process, the module imported first is faster on the cheapest cell. At 10-route static hit (≈180 ns) the per-run medians swap by about 20% when the import order swaps (run 1: live 156, oracle 200 ns; run 2: live 188, oracle 162 ns). Alternating the import order removes that bias from the median, but it leaves that cell's 95% CI at −13.7 … +11.9%. A ≤5% regression limit cannot be resolved there with this method and sample size. +- **Other 10-route cells.** The CIs are within about ±10% (late parameter hit −1.6 … +9.8%), and the misses are within ±4.4%. +- **100 and 500 routes.** Identical code shows small but systematic offsets of up to +2.9%, with CIs that exclude 1. Treat anything inside ±3% as indistinguishable from no change. +- **500 routes.** The ≥20% improvement target is far outside the noise in every cell. + +The options for D4 are to apply the 10-route limit to the miss and late-parameter cells only, to require more rounds for the static cell, or to restate the limit relative to this measured floor. That decision belongs to the owner. diff --git a/bench/baseline/router-ed47836/battery-run/README.md b/bench/baseline/router-ed47836/battery-run/README.md new file mode 100644 index 0000000..3545158 --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/README.md @@ -0,0 +1,94 @@ +# Superseded: first baseline, laptop on battery — `ed47836` + +> Kept for reference only. **The baseline is `../README.md`**, captured on jarvis with the +> interleaved harness. This run used the earlier sequential harness (`98ea948`), one router per +> process, on a laptop running on battery. + +The performance half of the CARD-08 parity corpus (FPRD-001, #109). Captured before any CARD-07 +router change; immutable through CARD-07 review, like `test/router-parity/`. CARD-10 measures the +radix index with the **same harness, same defaults, same machine class**, and compares against +these files. Do not re-run into this directory: a new capture goes in a new directory. + +## Files + +| File | What it is | +|---|---| +| `lookup-raw.json` | **The D4 baseline.** `bench:lookup` on the live linear matcher: environment, method, every sample of every run, and the summary. | +| `lookup-summary.txt` | The table `bench:lookup` printed for that run. | +| `lookup-aa-raw.json`, `lookup-aa-summary.txt` | A/A noise check: the live router against the byte-identical frozen oracle (`test/router-parity/oracle.ts`), same alternating protocol. Any difference here is noise. | +| `compare-e2e-raw.json`, `compare-e2e-summary.txt`, `compare-e2e-stderr.txt` | `npm run bench:compare`, run once with this tree as both base and head. **End-to-end req/s signal only**: 50/200 *filler* routes plus base routes, not 10/100/500 total, and not lookup time. It cannot decide D4. | +| `load.txt` | `uptime` before and after each run. | + +## Environment + +| | | +|---|---| +| Hardware | Apple M4 Max (`Mac16,5`), 16 cores (12 performance + 4 efficiency), 64 GiB | +| Power | **On battery** (84%, discharging) for every run. macOS may manage clocks differently on AC; run the CARD-10 comparison on the same power source, or re-capture both on AC. | +| OS | macOS 27.0.1 (build 26A434), Darwin 27.0.0 arm64 | +| Node | v22.22.2 (V8 12.4.254.21-node.39) | +| Packages | `@green-tea/core@26.9.0-beta.2`; tsx 4.23.5, typescript 5.9.3, vitest 4.1.11, autocannon 8.0.0 (from `package-lock.json`) | +| Core revision | Router source at `ed47836c9820c47bf4ed5e902d91e019abdb110a`. The harness ran from `98ea948` (this branch), whose `src/` is byte-identical to `ed47836` — the branch adds only tests and bench files. | +| Env vars | `LOOKUP_OUT` only (and `LOOKUP_ROUTERS` for the A/A run); no `NODE_OPTIONS`. Recorded in each raw file under `meta.env`. | +| Load | 1-minute load average 2.4–3.4 on 16 cores throughout (see `load.txt` and `meta.loadavgAtStart/End`). Foreground apps were a browser and the window server; nothing else CPU-bound. | + +## Method (`bench/lookup.ts`, defaults) + +- **Operation:** `resolveRoute(routes, method, path)`, and on `undefined`, `allowedMethods(routes, path)` — what `dispatch` does after `normalizeRequestPath`. Normalization is excluded. +- **Route counts:** 10, 100 and 500 **total registered HTTP routes**. +- **Generator:** N−2 fillers cycling `GET /res{k}/items`, `POST /res{k}/items`, `GET /res{k}/items/:id`, `PUT /res{k}/items/:id(\d+)`, `GET /res{k}/files/:path*` (k = ⌊i/5⌋), then `GET /static/target/leaf`, then `GET /late/:group/:id` declared last. +- **Workloads:** static hit `GET /static/target/leaf`; late parameter hit `GET /late/g1/42`; method miss `DELETE /static/target/leaf` (Allow `GET, HEAD, OPTIONS`); path miss `GET /nowhere/at/all`. Each answer is asserted before timing. +- **Order:** for each run, for each router (order alternates per run), for count 10 → 100 → 500, for the four workloads in the order above. +- **Warm-up:** 250 ms per cell, time-boxed; it also calibrates iterations so one sample lasts ≈25 ms (iteration counts are stored per cell). +- **Repetitions:** 5 runs, each a fresh child process; 21 samples per cell per run → 105 samples per cell. Every sample is kept. +- **Statistic:** median ns per lookup over all 105 samples. Run spread = (max − min of the five per-run medians) / median. + +## Baseline (median ns per lookup, `lookup-raw.json`) + +| Routes | Static hit | Late param hit | Method miss | Path miss | +|---:|---:|---:|---:|---:| +| 10 | 61.3 (spread 17.5%) | 123.3 (6.2%) | 313.1 (4.6%) | 247.1 (6.8%) | +| 100 | 67.6 (8.0%) | 343.4 (2.1%) | 1 263.7 (3.5%) | 1 463.3 (3.2%) | +| 500 | 67.8 (7.5%) | 1 326.8 (16.5%) | 6 732.2 (6.5%) | 8 973.4 (2.0%) | + +## Noise floor (A/A, `lookup-aa-raw.json`) + +Identical matcher code under two labels, alternating order per run. Median difference +(oracle − live) / live: + +| Routes | Static hit | Late param hit | Method miss | Path miss | +|---:|---:|---:|---:|---:| +| 10 | +5.2% | 0.0% | +1.2% | +0.2% | +| 100 | −0.1% | −0.8% | −0.1% | +0.1% | +| 500 | −2.7% | +0.3% | −0.4% | +0.1% | + +**For D4:** with no code difference at all, the 10-route static hit already moves 5.2% — the +size of the proposed ≤5% regression limit — and per-run medians at 10 routes spread 4.5–17.5%. +That cell is ~60 ns, where a few nanoseconds of timer and scheduling noise are a large fraction. +The ≥20% improvement at 500 routes is well clear of the noise (≤2.7% A/A, ≤16.5% spread on a +1.3–9 µs operation). Whether D4's 10-route limit applies per workload, to a mean across workloads, +or needs more runs is an owner decision; this baseline does not make it. + +## End-to-end signal (`bench:compare`, req/s — not lookup time) + +Run once, A/A: `AB_BASE` pointed at this same tree, so base and head are identical code. Defaults: +3 rounds × 10 s per case after a 10 s warm-up, 100 connections, alternating side order. Load +average 2.8–3.3 throughout. A few short parity-test runs (seconds each) happened during this +~22-minute run; the lookup runs above had nothing else running. + +| Scenario | base req/s | head req/s | Δ | +|---|---:|---:|---:| +| hello | 88,212 | 88,236 | +0.0% | +| param | 86,508 | 85,885 | −0.7% | +| pipeline (3 steps) | 80,189 | 80,934 | +0.9% | +| steps5 | 74,359 | 73,975 | −0.5% | +| validate (POST) | 70,607 | 69,903 | −1.0% | +| hello + security | 83,913 | 83,802 | −0.1% | +| hello + cors predicate | 82,028 | 80,445 | −1.9% | +| preflight + cors predicate | 114,377 | 114,010 | −0.3% | +| param, 50 routes | 82,476 | 82,045 | −0.5% | +| param, 200 routes | 72,957 | 73,306 | +0.5% | + +Every row's sample ranges overlap. So with no code change, end-to-end throughput moves up to +±1.9%; the route-width rows show that 200 filler routes already cost ~12% req/s against +`param` with none. diff --git a/bench/baseline/router-ed47836/battery-run/compare-e2e-raw.json b/bench/baseline/router-ed47836/battery-run/compare-e2e-raw.json new file mode 100644 index 0000000..3096e94 --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/compare-e2e-raw.json @@ -0,0 +1,207 @@ +{ + "rounds": 3, + "duration": 10, + "conns": 100, + "rows": [ + { + "name": "hello", + "base": 88212.37, + "head": 88235.64, + "delta": 0.0263795202418936, + "separated": false, + "samples": { + "base": [ + 82493.1, + 88503.28, + 88212.37 + ], + "head": [ + 88177.46, + 88235.64, + 92826.19 + ] + } + }, + { + "name": "param", + "base": 86507.64, + "head": 85885.1, + "delta": -0.7196358610638246, + "separated": false, + "samples": { + "base": [ + 81230.55, + 86757.82, + 86507.64 + ], + "head": [ + 83412.37, + 86705.46, + 85885.1 + ] + } + }, + { + "name": "pipeline (3 steps)", + "base": 80189.1, + "head": 80933.82, + "delta": 0.9287047740902455, + "separated": false, + "samples": { + "base": [ + 76116.37, + 80189.1, + 80276.37 + ], + "head": [ + 77035.64, + 80992, + 80933.82 + ] + } + }, + { + "name": "steps5", + "base": 74359.28, + "head": 73975.28, + "delta": -0.5164116704734096, + "separated": false, + "samples": { + "base": [ + 75272.73, + 74359.28, + 73928.73 + ], + "head": [ + 72235.64, + 74813.1, + 73975.28 + ] + } + }, + { + "name": "validate (POST)", + "base": 70606.55, + "head": 69902.55, + "delta": -0.997074634010584, + "separated": false, + "samples": { + "base": [ + 70775.28, + 70606.55, + 69762.91 + ], + "head": [ + 67138.91, + 74353.46, + 69902.55 + ] + } + }, + { + "name": "hello + security", + "base": 83912.73, + "head": 83802.19, + "delta": -0.13173209833596597, + "separated": false, + "samples": { + "base": [ + 81928.73, + 84709.82, + 83912.73 + ], + "head": [ + 81742.55, + 83802.19, + 84512 + ] + } + }, + { + "name": "hello + cors predicate", + "base": 82027.64, + "head": 80445.1, + "delta": -1.9292765219138253, + "separated": false, + "samples": { + "base": [ + 82481.46, + 82027.64, + 81381.82 + ], + "head": [ + 79368.73, + 82213.82, + 80445.1 + ] + } + }, + { + "name": "preflight + cors predicate", + "base": 114376.73, + "head": 114010.19, + "delta": -0.3204672838609686, + "separated": false, + "samples": { + "base": [ + 114580.37, + 114376.73, + 112322.91 + ], + "head": [ + 109669.82, + 114813.1, + 114010.19 + ] + } + }, + { + "name": "param, 50 routes", + "base": 82475.64, + "head": 82045.1, + "delta": -0.5220208051734956, + "separated": false, + "samples": { + "base": [ + 82562.91, + 82475.64, + 82178.91 + ], + "head": [ + 78891.64, + 82045.1, + 82388.37 + ] + } + }, + { + "name": "param, 200 routes", + "base": 72957.1, + "head": 73306.19, + "delta": 0.47848667230467834, + "separated": false, + "samples": { + "base": [ + 72986.19, + 72957.1, + 72194.91 + ], + "head": [ + 72055.28, + 73306.19, + 73381.82 + ] + } + } + ], + "cors": { + "base": { + "get": 1, + "preflight": 1 + }, + "head": { + "get": 1, + "preflight": 1 + } + } +} \ No newline at end of file diff --git a/bench/baseline/router-ed47836/battery-run/compare-e2e-stderr.txt b/bench/baseline/router-ed47836/battery-run/compare-e2e-stderr.txt new file mode 100644 index 0000000..aff25f5 --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/compare-e2e-stderr.txt @@ -0,0 +1,60 @@ +[compare] round 1 base hello 82,493 req/s +[compare] round 1 base param 81,231 req/s +[compare] round 1 base pipeline (3 steps) 76,116 req/s +[compare] round 1 base steps5 75,273 req/s +[compare] round 1 base validate (POST) 70,775 req/s +[compare] round 1 base hello + security 81,929 req/s +[compare] round 1 base hello + cors predicate 82,481 req/s +[compare] round 1 base preflight + cors predicate 114,580 req/s +[compare] round 1 base param, 50 routes 82,563 req/s +[compare] round 1 base param, 200 routes 72,986 req/s +[compare] round 1 head hello 88,177 req/s +[compare] round 1 head param 83,412 req/s +[compare] round 1 head pipeline (3 steps) 77,036 req/s +[compare] round 1 head steps5 72,236 req/s +[compare] round 1 head validate (POST) 67,139 req/s +[compare] round 1 head hello + security 81,743 req/s +[compare] round 1 head hello + cors predicate 79,369 req/s +[compare] round 1 head preflight + cors predicate 109,670 req/s +[compare] round 1 head param, 50 routes 78,892 req/s +[compare] round 1 head param, 200 routes 72,055 req/s +[compare] round 2 head hello 88,236 req/s +[compare] round 2 head param 86,705 req/s +[compare] round 2 head pipeline (3 steps) 80,992 req/s +[compare] round 2 head steps5 74,813 req/s +[compare] round 2 head validate (POST) 74,353 req/s +[compare] round 2 head hello + security 83,802 req/s +[compare] round 2 head hello + cors predicate 82,214 req/s +[compare] round 2 head preflight + cors predicate 114,813 req/s +[compare] round 2 head param, 50 routes 82,045 req/s +[compare] round 2 head param, 200 routes 73,306 req/s +[compare] round 2 base hello 88,503 req/s +[compare] round 2 base param 86,758 req/s +[compare] round 2 base pipeline (3 steps) 80,189 req/s +[compare] round 2 base steps5 74,359 req/s +[compare] round 2 base validate (POST) 70,607 req/s +[compare] round 2 base hello + security 84,710 req/s +[compare] round 2 base hello + cors predicate 82,028 req/s +[compare] round 2 base preflight + cors predicate 114,377 req/s +[compare] round 2 base param, 50 routes 82,476 req/s +[compare] round 2 base param, 200 routes 72,957 req/s +[compare] round 3 base hello 88,212 req/s +[compare] round 3 base param 86,508 req/s +[compare] round 3 base pipeline (3 steps) 80,276 req/s +[compare] round 3 base steps5 73,929 req/s +[compare] round 3 base validate (POST) 69,763 req/s +[compare] round 3 base hello + security 83,913 req/s +[compare] round 3 base hello + cors predicate 81,382 req/s +[compare] round 3 base preflight + cors predicate 112,323 req/s +[compare] round 3 base param, 50 routes 82,179 req/s +[compare] round 3 base param, 200 routes 72,195 req/s +[compare] round 3 head hello 92,826 req/s +[compare] round 3 head param 85,885 req/s +[compare] round 3 head pipeline (3 steps) 80,934 req/s +[compare] round 3 head steps5 73,975 req/s +[compare] round 3 head validate (POST) 69,903 req/s +[compare] round 3 head hello + security 84,512 req/s +[compare] round 3 head hello + cors predicate 80,445 req/s +[compare] round 3 head preflight + cors predicate 114,010 req/s +[compare] round 3 head param, 50 routes 82,388 req/s +[compare] round 3 head param, 200 routes 73,382 req/s diff --git a/bench/baseline/router-ed47836/battery-run/compare-e2e-summary.txt b/bench/baseline/router-ed47836/battery-run/compare-e2e-summary.txt new file mode 100644 index 0000000..8293486 --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/compare-e2e-summary.txt @@ -0,0 +1,21 @@ + +> @green-tea/core@26.9.0-beta.2 bench:compare +> tsx bench/compare.ts + + +| Scenario | base | head | Δ | | +| --- | --- | --- | --- | --- | +| hello | 88,212 | 88,236 | +0.0% | overlaps | +| param | 86,508 | 85,885 | -0.7% | overlaps | +| pipeline (3 steps) | 80,189 | 80,934 | +0.9% | overlaps | +| steps5 | 74,359 | 73,975 | -0.5% | overlaps | +| validate (POST) | 70,607 | 69,903 | -1.0% | overlaps | +| hello + security | 83,913 | 83,802 | -0.1% | overlaps | +| hello + cors predicate | 82,028 | 80,445 | -1.9% | overlaps | +| preflight + cors predicate | 114,377 | 114,010 | -0.3% | overlaps | +| param, 50 routes | 82,476 | 82,045 | -0.5% | overlaps | +| param, 200 routes | 72,957 | 73,306 | +0.5% | overlaps | + +cors.origins calls — base: 1 per GET, 1 per preflight +cors.origins calls — head: 1 per GET, 1 per preflight +exit 0 diff --git a/bench/baseline/router-ed47836/battery-run/load.txt b/bench/baseline/router-ed47836/battery-run/load.txt new file mode 100644 index 0000000..e0dd881 --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/load.txt @@ -0,0 +1,6 @@ +uptime before: 17:01 up 9 days, 7:50, 1 user, load averages: 2.47 2.14 6.86 +uptime after: 17:02 up 9 days, 7:51, 1 user, load averages: 2.58 2.21 6.64 +A/A uptime before: 17:02 up 9 days, 7:51, 1 user, load averages: 3.42 2.40 6.66 +A/A uptime after: 17:03 up 9 days, 7:53, 1 user, load averages: 2.89 2.48 6.26 +bench:compare uptime before: 17:04 up 9 days, 7:53, 1 user, load averages: 2.98 2.51 6.25 +bench:compare uptime after: 17:26 up 9 days, 8:15, 1 user, load averages: 2.82 3.32 4.29 diff --git a/bench/baseline/router-ed47836/battery-run/lookup-aa-raw.json b/bench/baseline/router-ed47836/battery-run/lookup-aa-raw.json new file mode 100644 index 0000000..7821e5b --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/lookup-aa-raw.json @@ -0,0 +1,3883 @@ +{ + "meta": { + "startedAt": "2026-10-10T22:02:28.077Z", + "node": "v22.22.2", + "v8": "12.4.254.21-node.39", + "platform": "darwin 27.0.0 arm64", + "cpu": "Apple M4 Max", + "cpus": 16, + "memoryBytes": 68719476736, + "loadavgAtStart": [ + 3.4248046875, + 2.40185546875, + 6.6572265625 + ], + "package": "@green-tea/core@26.9.0-beta.2", + "harnessCommit": "98ea948ffafa8946c5ed560c7c0f6273c0be0883", + "routers": [ + { + "label": "live", + "path": "src/http/router.ts", + "commit": "98ea948ffafa8946c5ed560c7c0f6273c0be0883", + "dirty": false + }, + { + "label": "oracle", + "path": "test/router-parity/oracle.ts", + "commit": "98ea948ffafa8946c5ed560c7c0f6273c0be0883", + "dirty": false + } + ], + "env": { + "LOOKUP_OUT": "bench/baseline/router-ed47836/lookup-aa-raw.json", + "LOOKUP_ROUTERS": "live=src/http/router.ts,oracle=test/router-parity/oracle.ts" + }, + "method": { + "routeCounts": [ + 10, + 100, + 500 + ], + "routeCountMeaning": "total registered HTTP routes", + "routeGenerator": "N total HTTP routes: N-2 fillers (i = 0..N-3, shape FILLER[i % 5] with k = floor(i / 5): GET /res{k}/items, POST /res{k}/items, GET /res{k}/items/:id, PUT /res{k}/items/:id(\\d+), GET /res{k}/files/:path*), then GET /static/target/leaf, then GET /late/:group/:id declared last. All buffer transport.", + "workloads": [ + { + "name": "static hit", + "method": "GET", + "path": "/static/target/leaf", + "expect": "hit /static/target/leaf" + }, + { + "name": "late param hit", + "method": "GET", + "path": "/late/g1/42", + "expect": "hit /late/:group/:id" + }, + { + "name": "method miss", + "method": "DELETE", + "path": "/static/target/leaf", + "expect": "allow GET,HEAD,OPTIONS" + }, + { + "name": "path miss", + "method": "GET", + "path": "/nowhere/at/all", + "expect": "allow " + } + ], + "workloadOrder": "for each run: for each router (order alternates per run): for count in routeCounts: for workload in workloads", + "operation": "resolveRoute(routes, method, path); on undefined, allowedMethods(routes, path)", + "runs": 5, + "samplesPerCellPerRun": 21, + "sampleMs": 25, + "warmupMsPerCell": 250, + "unit": "ns per lookup (sample time / iterations)" + }, + "loadavgAtEnd": [ + 2.8935546875, + 2.48291015625, + 6.2587890625 + ] + }, + "summary": [ + { + "router": "live", + "routes": 10, + "workload": "static hit", + "medianNs": 61.96659809248349, + "runMediansNs": [ + 57.9020869088313, + 65.75224649396549, + 60.25640078869828, + 62.70531643872352, + 61.84300925242259 + ], + "runSpreadPct": 12.668372682679843 + }, + { + "router": "live", + "routes": 10, + "workload": "late param hit", + "medianNs": 123.83623016031663, + "runMediansNs": [ + 124.03501804316046, + 120.4381341910419, + 122.13565389859923, + 124.28162355575101, + 128.36198330069064 + ], + "runSpreadPct": 6.398651751099528 + }, + { + "router": "live", + "routes": 10, + "workload": "method miss", + "medianNs": 309.0347665477208, + "runMediansNs": [ + 305.7485427135678, + 305.61092304220267, + 320.0887527204892, + 310.75141981203194, + 311.6289093298292 + ], + "runSpreadPct": 4.684854665389525 + }, + { + "router": "live", + "routes": 10, + "workload": "path miss", + "medianNs": 248.3627994496601, + "runMediansNs": [ + 242.65480644348384, + 242.48894572097203, + 253.6872594713701, + 251.0453726934283, + 248.68941043632552 + ], + "runSpreadPct": 4.508853087182181 + }, + { + "router": "live", + "routes": 100, + "workload": "static hit", + "medianNs": 69.45780649995316, + "runMediansNs": [ + 66.68509400909625, + 68.74270947746643, + 69.1730984613408, + 71.6419089870348, + 71.48734583780232 + ], + "runSpreadPct": 7.136440420043917 + }, + { + "router": "live", + "routes": 100, + "workload": "late param hit", + "medianNs": 352.18246430081643, + "runMediansNs": [ + 345.0541586702664, + 348.30558996219736, + 349.87502846176363, + 355.17259023873544, + 365.0927247947561 + ], + "runSpreadPct": 5.689825063911693 + }, + { + "router": "live", + "routes": 100, + "workload": "method miss", + "medianNs": 1265.3405881459735, + "runMediansNs": [ + 1273.7660996042555, + 1256.0060250113918, + 1254.191288547923, + 1279.7136403306124, + 1267.0635724047172 + ], + "runSpreadPct": 2.017034150472145 + }, + { + "router": "live", + "routes": 100, + "workload": "path miss", + "medianNs": 1464.859197907585, + "runMediansNs": [ + 1462.794618272841, + 1451.2747001360208, + 1462.3240752273011, + 1485.2491809475807, + 1470.5876486620416 + ], + "runSpreadPct": 2.3193000979267717 + }, + { + "router": "live", + "routes": 500, + "workload": "static hit", + "medianNs": 67.8277970445671, + "runMediansNs": [ + 67.20020913904426, + 66.94529785176778, + 68.0693670004254, + 69.26120308597827, + 67.67958579116588 + ], + "runSpreadPct": 3.41438957937672 + }, + { + "router": "live", + "routes": 500, + "workload": "late param hit", + "medianNs": 1313.7381655788388, + "runMediansNs": [ + 1361.9902955447728, + 1293.938903924222, + 1309.6672600301247, + 1313.7381655788388, + 1316.9042495965573 + ], + "runSpreadPct": 5.179981323795004 + }, + { + "router": "live", + "routes": 500, + "workload": "method miss", + "medianNs": 6778.249657440395, + "runMediansNs": [ + 7068.937207943925, + 6783.216771718279, + 6634.313464608835, + 6816.356576428767, + 6689.236111111111 + ], + "runSpreadPct": 6.412035042970274 + }, + { + "router": "live", + "routes": 500, + "workload": "path miss", + "medianNs": 9005.30035335689, + "runMediansNs": [ + 9445.869227625664, + 9015.52453867295, + 8965.036014405763, + 9032.356099486775, + 8834.140147115757 + ], + "runSpreadPct": 6.792989200875173 + }, + { + "router": "oracle", + "routes": 10, + "workload": "static hit", + "medianNs": 65.20175694065692, + "runMediansNs": [ + 62.17528659622995, + 66.59028853262248, + 66.58726850973655, + 65.20175694065692, + 58.04917338568998 + ], + "runSpreadPct": 13.099516865329495 + }, + { + "router": "oracle", + "routes": 10, + "workload": "late param hit", + "medianNs": 123.89190735057869, + "runMediansNs": [ + 130.65558572454887, + 123.49333494021357, + 125.23010969612912, + 122.9247385095917, + 120.06597582705187 + ], + "runSpreadPct": 8.547458929283758 + }, + { + "router": "oracle", + "routes": 10, + "workload": "method miss", + "medianNs": 312.7493635292777, + "runMediansNs": [ + 311.44471905773315, + 314.2284476047127, + 312.1841395295816, + 316.7763087024545, + 309.1252516411379 + ], + "runSpreadPct": 2.4463861332847734 + }, + { + "router": "oracle", + "routes": 10, + "workload": "path miss", + "medianNs": 248.97204006557638, + "runMediansNs": [ + 248.63964496448642, + 253.06169194747022, + 247.34186060400947, + 248.97204006557638, + 248.8647186996977 + ], + "runSpreadPct": 2.2973789916145666 + }, + { + "router": "oracle", + "routes": 100, + "workload": "static hit", + "medianNs": 69.39132215646671, + "runMediansNs": [ + 69.49020342823644, + 71.08944325147502, + 69.82128501009873, + 67.50608406924538, + 66.66088146087633 + ], + "runSpreadPct": 6.382010967614899 + }, + { + "router": "oracle", + "routes": 100, + "workload": "late param hit", + "medianNs": 349.2688473317261, + "runMediansNs": [ + 347.5369002504978, + 352.50985534632173, + 349.5945993646311, + 347.21291924654065, + 354.01838730362294 + ], + "runSpreadPct": 1.948489855042424 + }, + { + "router": "oracle", + "routes": 100, + "workload": "method miss", + "medianNs": 1263.572391588691, + "runMediansNs": [ + 1294.0580732841984, + 1243.1225978468658, + 1251.1828065230522, + 1286.5026337115073, + 1258.0460368294637 + ], + "runSpreadPct": 4.031069036993705 + }, + { + "router": "oracle", + "routes": 100, + "workload": "path miss", + "medianNs": 1466.1603640164792, + "runMediansNs": [ + 1511.5880241056545, + 1463.9749738670603, + 1459.5399975195337, + 1480.7000803411408, + 1449.0929173589318 + ], + "runSpreadPct": 4.262501448035347 + }, + { + "router": "oracle", + "routes": 500, + "workload": "static hit", + "medianNs": 66.00714145262732, + "runMediansNs": [ + 67.04762890221915, + 67.26566220519658, + 65.80172352376258, + 64.91776842921375, + 65.10508912496736 + ], + "runSpreadPct": 3.5570299278418016 + }, + { + "router": "oracle", + "routes": 500, + "workload": "late param hit", + "medianNs": 1317.6014150943397, + "runMediansNs": [ + 1313.2361952747328, + 1310.2305374871619, + 1323.5120699223085, + 1294.5210735859418, + 1363.225632022472 + ], + "runSpreadPct": 5.214365865841975 + }, + { + "router": "oracle", + "routes": 500, + "workload": "method miss", + "medianNs": 6753.288572211565, + "runMediansNs": [ + 6717.328006500542, + 6758.746779939709, + 6666.410633181939, + 6876.348174778761, + 6750.658981233244 + ], + "runSpreadPct": 3.1086712695896437 + }, + { + "router": "oracle", + "routes": 500, + "workload": "path miss", + "medianNs": 9015.26380126183, + "runMediansNs": [ + 8998.004283489097, + 9021.589116719242, + 8980.758918071344, + 9100.73946515397, + 8883.969028261712 + ], + "runSpreadPct": 2.4044824607563693 + } + ], + "runs": [ + { + "run": 1, + "order": [ + "live", + "oracle" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 423018, + "samplesNs": [ + 58.70534350784127, + 61.5104841874341, + 60.953472429069215, + 57.90484565668601, + 57.65465772142084, + 57.71750138291988, + 58.34996146736073, + 58.422159340737274, + 57.9020869088313, + 57.75916391264674, + 57.15901451002085, + 57.80772685795876, + 57.622746549792204, + 59.92997461100946, + 57.876870487780664, + 57.94148712347938, + 57.40782188937587, + 58.313416923156936, + 57.637422048234356, + 57.691693970469345, + 58.31282593175704 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 195642, + "samplesNs": [ + 129.949090686049, + 128.7027683217305, + 124.26055243761564, + 123.26617495220863, + 123.53920937222068, + 124.15470604471433, + 123.07727379601518, + 124.03501804316046, + 123.42803692458675, + 125.15461915130697, + 128.21995788225433, + 126.3204373294078, + 123.55667494709725, + 123.7766788317437, + 123.36563723535846, + 123.29492644728637, + 124.00988540292984, + 124.13362161499064, + 124.49248627595301, + 123.55007615951585, + 126.33129900532606 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 79600, + "samplesNs": [ + 308.9839824120603, + 314.08972361809043, + 305.89615577889447, + 306.01548994974877, + 306.03120603015077, + 307.57904522613063, + 305.41561557788947, + 305.7485427135678, + 302.9695351758794, + 305.32140703517587, + 304.3734296482412, + 305.42870603015075, + 301.71272613065327, + 302.9161432160804, + 305.7124120603015, + 304.5053391959799, + 307.30998743718595, + 307.1121231155779, + 307.21209798994977, + 305.5035552763819, + 309.4781281407035 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 103174, + "samplesNs": [ + 284.19546591195456, + 256.00967297962666, + 242.4504526334154, + 244.81337352433752, + 244.09735010758524, + 244.40831992556264, + 243.0525907689922, + 239.8460367922151, + 243.5351929749743, + 242.43067051776612, + 242.65480644348384, + 242.85269544652724, + 243.31711477697868, + 240.91583150793804, + 243.49400042646403, + 241.37945606451237, + 240.71027584468956, + 240.76155814449376, + 241.3281640723438, + 241.06767208792914, + 240.1162114486208 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 367624, + "samplesNs": [ + 67.37488575283442, + 67.1636182621374, + 68.03395860988401, + 65.82892030988184, + 65.84637564468044, + 66.50794561834918, + 66.46906894000392, + 66.28704600352535, + 66.01253182599612, + 66.68509400909625, + 68.17325582660544, + 67.87584869323004, + 67.11714958762214, + 67.08292168084782, + 66.90973657867822, + 66.95450786673341, + 66.59283670271799, + 66.62604454551389, + 66.59079657476117, + 66.65540062672731, + 66.98261266946663 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 61486, + "samplesNs": [ + 359.78787040952415, + 358.6588816966464, + 363.96360147025337, + 354.14091012588233, + 344.74107927007776, + 346.7212048271151, + 340.0028787040952, + 340.26715024558433, + 345.3394593891292, + 351.422128614644, + 362.8895195654295, + 343.51585726832127, + 341.91523273590735, + 342.33199427511954, + 344.04783202680284, + 344.55066193930327, + 347.63334742868295, + 342.95477019158835, + 351.08466968090295, + 343.9360179553069, + 345.0541586702664 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19457, + "samplesNs": [ + 1258.7564886673176, + 1271.3119699850954, + 1250.9251169245001, + 1258.9042503983142, + 1260.5553271316235, + 1260.12699799558, + 1264.517037570026, + 1265.410083774477, + 1273.7660996042555, + 1280.5995271624608, + 1287.871974096726, + 1276.8498226859228, + 1275.9482448476126, + 1257.4908773192167, + 1282.0471809631495, + 1267.9904918538316, + 1275.4578300868582, + 1302.761628205787, + 1305.3228144112659, + 1297.4914426684484, + 1293.9859176645937 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 15980, + "samplesNs": [ + 1484.3346057571964, + 1504.4769712140176, + 1456.8470588235293, + 1456.907071339174, + 1462.4817271589486, + 1462.8676470588234, + 1461.6760951188987, + 1474.4367959949936, + 1491.9847934918648, + 1469.4774718397998, + 1459.157321652065, + 1476.0247183979975, + 1472.7315394242803, + 1464.8675844806007, + 1472.3482478097621, + 1462.794618272841, + 1462.372277847309, + 1448.7327909887358, + 1458.0543804755946, + 1454.54211514393, + 1445.1475594493115 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 361482, + "samplesNs": [ + 67.79636607078638, + 65.98034756917357, + 65.99729170470452, + 65.15342949303147, + 65.53864646095795, + 66.44498481252178, + 65.5106395339187, + 65.0532640629409, + 65.42730205100116, + 65.5871744651186, + 65.8354579204497, + 67.20020913904426, + 70.8584161866981, + 71.67046491941507, + 68.25409010683796, + 74.13520451917384, + 71.28570717214136, + 71.62793168124554, + 75.50352714657991, + 70.6766422671115, + 70.15817108459066 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 13602, + "samplesNs": [ + 1367.5102926040288, + 1332.0712395235994, + 1334.3809733862668, + 1420.2629760329364, + 1392.4636818114984, + 1361.9902955447728, + 1386.8058373768563, + 1418.743567122482, + 1374.129980885164, + 1378.4706660785178, + 1340.1583590648434, + 1399.153947948831, + 1370.0129392736362, + 1342.1341714453756, + 1353.3212027642994, + 1354.1788707543008, + 1339.6344655197765, + 1366.300323481841, + 1347.491765916777, + 1355.208204675783, + 1352.469636818115 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3424, + "samplesNs": [ + 7135.051693925234, + 7085.548189252337, + 7186.976635514019, + 7126.022196261682, + 7101.185163551402, + 7081.653913551402, + 7164.099007009346, + 7082.03125, + 7073.403621495327, + 7068.937207943925, + 7086.363317757009, + 7035.679614485981, + 6988.646320093458, + 6976.233936915888, + 7014.26226635514, + 7025.4211448598135, + 7022.670852803738, + 7025.372371495327, + 7027.2707359813085, + 7043.820677570094, + 6994.536214953271 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2447, + "samplesNs": [ + 9341.659991826727, + 9293.216183081324, + 9403.248876174908, + 9255.295463833265, + 9420.957498978341, + 9701.539027380466, + 9326.266857376379, + 9248.297098487945, + 9394.071107478545, + 9588.935431140171, + 9445.869227625664, + 9442.991418062935, + 9283.663669799755, + 9637.583571720474, + 9632.560277891296, + 9674.209644462608, + 9502.213731099306, + 9511.868410298324, + 9515.597057621577, + 9618.972210870454, + 9591.727829995913 + ] + } + ] + }, + { + "run": 1, + "order": [ + "live", + "oracle" + ], + "label": "oracle", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 400738, + "samplesNs": [ + 62.088676392056655, + 66.88337018201419, + 67.2814906497512, + 62.22082757312758, + 62.3798042611382, + 62.05061910774621, + 62.129850425964094, + 61.734330160853226, + 61.016591887966705, + 61.47418512843803, + 62.856008164935695, + 61.67651932185118, + 61.75273121091586, + 61.94134322175586, + 62.27302377114224, + 63.24206838383183, + 62.44302012786409, + 62.17528659622995, + 62.093250452914376, + 62.37304672878539, + 62.44063203389746 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 189304, + "samplesNs": [ + 135.14527426784431, + 135.7945843722267, + 130.65316633562946, + 130.46651946076153, + 129.93254236571863, + 133.49009529645437, + 131.21245192917212, + 130.65558572454887, + 129.89424417867556, + 130.3102417275916, + 130.44054008367493, + 130.51890081561933, + 130.02762751975658, + 130.69806237586104, + 130.1169917170266, + 130.8827335925284, + 132.9413694375185, + 130.47862168786713, + 131.23402041161307, + 133.84930587837553, + 131.59125005282507 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 77685, + "samplesNs": [ + 314.5571860719573, + 321.5544699748986, + 311.24304563300507, + 309.76218060114564, + 315.05868571796356, + 310.00353993692477, + 309.6103881058119, + 311.44471905773315, + 309.4822037716419, + 309.696209049366, + 311.4543734311643, + 311.5198043380318, + 308.8240973160842, + 311.48119971680507, + 311.3117075368475, + 309.18345884018794, + 314.5727360494304, + 310.3039068031151, + 318.24569736757417, + 320.56381540838, + 321.95028641307846 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 99821, + "samplesNs": [ + 291.7451438074153, + 255.68099898818886, + 249.90608188657697, + 247.2434056961962, + 249.05997735947346, + 248.79283918213602, + 248.75444044840265, + 248.7118642369842, + 247.48758277316395, + 248.63296300377675, + 248.1817453241302, + 249.15307400246442, + 246.44488634656034, + 248.01602869135752, + 247.90249546688574, + 248.63964496448642, + 248.3783472415624, + 249.21943278468459, + 248.11120906422497, + 247.34483725869305, + 249.43858506727042 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 354818, + "samplesNs": [ + 69.73304905613583, + 69.3854539510397, + 69.41222824095733, + 69.88488746343195, + 69.94618931395814, + 69.2393706069027, + 69.616442796025, + 71.23029835014007, + 69.77743801047298, + 69.38228331144418, + 69.7443224413643, + 70.0224030347953, + 69.45356492624387, + 69.49020342823644, + 68.51446938994076, + 69.49372636112035, + 69.6344069353866, + 69.0365680433349, + 69.37148059004899, + 69.0932872627657, + 69.39109346200024 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 62276, + "samplesNs": [ + 347.94302781167704, + 346.96888046759585, + 349.5681964159548, + 350.15696255379277, + 345.62939173999615, + 348.48564455006743, + 346.99897231678335, + 347.5369002504978, + 348.6274808915152, + 347.021051448391, + 348.5284700366112, + 347.5984488406449, + 346.69991650073865, + 346.83638962039953, + 346.0529256856574, + 345.6822531954525, + 349.2691245423598, + 347.63326160960884, + 344.91349797674866, + 363.85071295523153, + 346.8912582696384 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19131, + "samplesNs": [ + 1308.44352098688, + 1318.8455386545397, + 1281.2037007997492, + 1294.0580732841984, + 1299.6750300559302, + 1290.697454393393, + 1283.6212430087294, + 1301.9880821702995, + 1301.4675134598297, + 1306.1000470440647, + 1298.1853013433695, + 1311.5711149443312, + 1300.7117766975066, + 1319.8953008206577, + 1279.0802362657466, + 1284.6187862631332, + 1292.9669123412264, + 1287.1604202603105, + 1293.7379122889552, + 1288.5826668757513, + 1292.9015733626052 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 15598, + "samplesNs": [ + 1527.9175535325041, + 1549.968970380818, + 1545.4091550198743, + 1513.308308757533, + 1511.465123733812, + 1501.7844595460956, + 1511.5666111039877, + 1513.7411206564943, + 1510.2764456981665, + 1504.8323503013207, + 1529.4562123349147, + 1513.4766636748302, + 1484.5385946916272, + 1501.3222849083215, + 1514.4008847288114, + 1534.000128221567, + 1516.7489421720734, + 1504.3008077958714, + 1511.5880241056545, + 1505.131555327606, + 1497.3474163354276 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 352748, + "samplesNs": [ + 66.76012337419347, + 67.42360552008799, + 66.91450553936521, + 66.93765804483654, + 67.12216086271219, + 66.65712349892841, + 66.6666884007847, + 67.19031716692936, + 69.33833218048012, + 67.6142486987878, + 67.05247088573145, + 67.11507365031127, + 67.07928606257158, + 67.12133591118872, + 67.30323913955571, + 66.76201424246204, + 66.89737999931963, + 66.67176851463367, + 67.04762890221915, + 66.24074977037432, + 66.80985292616826 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14687, + "samplesNs": [ + 1313.2361952747328, + 1311.0375161707632, + 1306.5721386259959, + 1310.8531354258869, + 1304.2089603050317, + 1311.7865459249676, + 1290.6424729352489, + 1304.9550622999932, + 1300.8329134608837, + 1315.8376795805814, + 1342.8428542248246, + 1364.9031796827126, + 1339.461224211888, + 1316.7569278954177, + 1322.2918227003472, + 1314.1951385579084, + 1323.7982569619392, + 1319.5626744740246, + 1300.8726765166473, + 1298.2967249948933, + 1318.3966773336965 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3692, + "samplesNs": [ + 6793.40465872156, + 6821.765438786566, + 6803.877843986999, + 6788.314734561213, + 6789.477248104009, + 6717.328006500542, + 6667.90817984832, + 6713.987540628385, + 6760.631094257855, + 6688.131906825569, + 6724.663867822319, + 6677.45585048754, + 6761.251895991332, + 6680.604550379198, + 6678.448808234019, + 6698.06338028169, + 6782.931744312026, + 6717.610238353196, + 6682.601841820152, + 6623.90520043337, + 6663.946912242687 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2568, + "samplesNs": [ + 9293.403037383177, + 9121.478971962617, + 8982.752336448599, + 8996.884735202491, + 9015.900700934579, + 9036.604361370717, + 9154.83839563863, + 8996.966121495327, + 8998.004283489097, + 9002.742211838005, + 9035.371495327103, + 9013.726635514018, + 9034.040887850468, + 8975.986370716511, + 9089.82320872274, + 8988.009345794393, + 8847.984813084113, + 8895.589953271028, + 8886.341510903427, + 8869.742990654206, + 8975.515965732087 + ] + } + ] + }, + { + "run": 2, + "order": [ + "oracle", + "live" + ], + "label": "oracle", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 370634, + "samplesNs": [ + 66.74115704441579, + 67.97710139922403, + 67.9803606792685, + 66.23616559732783, + 66.95408138487025, + 66.05146047043715, + 66.01784779593885, + 67.60937474705504, + 68.02971394961067, + 66.51103244710416, + 66.20390196258303, + 67.5319182805679, + 66.95138060728374, + 66.33880593793337, + 66.17579606835854, + 66.67932515635371, + 66.59028853262248, + 67.23265539588921, + 66.17242346897478, + 66.13217621696876, + 66.0533707107281 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 190846, + "samplesNs": [ + 129.8324303365017, + 129.79946134579714, + 122.67155193192417, + 122.71041048803748, + 122.85909581547426, + 122.74556448654937, + 123.00821080871488, + 123.42783710426208, + 123.49333494021357, + 123.44202655544261, + 122.69884095029501, + 122.82743678148874, + 123.84898818943022, + 122.11744023977448, + 123.67868857612945, + 123.70663781268667, + 124.96834096601448, + 123.93850015195498, + 128.81612399526318, + 125.9949121281033, + 124.5546147155298 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 77068, + "samplesNs": [ + 326.3384284008927, + 323.2907951419526, + 312.4416100067473, + 312.498378055743, + 314.9961722115534, + 314.07274095603884, + 314.21115119115586, + 317.7859163336274, + 318.28385322053254, + 313.44342658431515, + 316.9133103233508, + 316.6316369958997, + 314.60581564332796, + 317.05332952717083, + 313.2623138007993, + 311.4570898427363, + 316.9825089531323, + 313.96514766180513, + 314.2284476047127, + 313.71213733326414, + 313.89541703430734 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 98230, + "samplesNs": [ + 299.6199328107503, + 261.9829278224575, + 254.1929654891581, + 254.36475618446502, + 249.4808103430724, + 254.81352947164817, + 253.91131019036953, + 252.97982286470528, + 255.71787641250128, + 254.339733279039, + 255.23727985340528, + 254.95011707217753, + 252.406342257966, + 251.1859920594523, + 252.59933828769215, + 252.43094777562862, + 252.42245749770944, + 250.94335742644813, + 251.68736638501477, + 253.06169194747022, + 252.7418711188028 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 339489, + "samplesNs": [ + 70.52572837411522, + 70.97456176783342, + 70.55984729991252, + 71.14246116958134, + 70.06412578905355, + 71.33306528341124, + 73.22893230708506, + 71.04587188391966, + 71.32005749818109, + 71.903163283641, + 70.98475061047634, + 71.05188386074364, + 70.71191408263596, + 71.91887218731682, + 71.51594013355367, + 71.73636848322037, + 70.86054334602889, + 72.09106922462878, + 70.87833773701063, + 72.02332034322173, + 71.08944325147502 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 61388, + "samplesNs": [ + 367.5657294585261, + 357.260376620838, + 349.90890727829543, + 349.45075584804846, + 356.48729393366784, + 353.0677819769336, + 354.00716752459766, + 350.89242197172086, + 350.7125333941487, + 355.1827392975826, + 349.2688473317261, + 347.27334332442825, + 352.253974718186, + 355.31713038378837, + 353.0440314067896, + 352.50985534632173, + 345.17399165960774, + 359.4452498859712, + 364.14756955756826, + 347.6466573271649, + 347.9860233270346 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19878, + "samplesNs": [ + 1262.7968105443204, + 1234.1093168326793, + 1239.7898178891237, + 1238.5845155448235, + 1263.572391588691, + 1237.2786497635577, + 1264.7064090954825, + 1257.0555387865982, + 1238.3791125867795, + 1252.391689304759, + 1242.5734480330013, + 1252.0542308079284, + 1249.1888016903108, + 1243.1225978468658, + 1231.6149512023342, + 1232.2207465539793, + 1264.0356172653185, + 1243.9463728745347, + 1238.0060368246302, + 1261.2666264211691, + 1237.0313411812053 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16263, + "samplesNs": [ + 1466.854700854701, + 1483.2108467072496, + 1468, + 1466.1603640164792, + 1463.9749738670603, + 1469.4807846030867, + 1473.6544303019123, + 1466.6062227141365, + 1473.308553157474, + 1459.988378527947, + 1447.4395253028347, + 1441.6774272889381, + 1440.660271782574, + 1450.4242759638444, + 1468.4227387320911, + 1457.4443214659043, + 1439.6047469716534, + 1448.1978724712537, + 1467.946135399373, + 1458.146282973621, + 1442.0156182746111 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 343534, + "samplesNs": [ + 67.78501691244534, + 66.3801370461148, + 67.24334418136196, + 67.15504724423201, + 66.74703231703413, + 67.7325010042674, + 67.22114841616842, + 70.70636967519954, + 68.45865329195945, + 67.4498972445231, + 68.56672119790181, + 68.15967560707237, + 68.0275926109206, + 67.32727473845384, + 67.26566220519658, + 66.87632665180156, + 67.00440713291843, + 67.63195200475062, + 66.92714549360471, + 67.00525421064582, + 67.20331903101294 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14605, + "samplesNs": [ + 1310.2305374871619, + 1325.8758644299896, + 1298.3909619993153, + 1315.2944197192742, + 1306.1594659363232, + 1308.165011982198, + 1309.5229715850735, + 1300.6761383087983, + 1306.5502909962343, + 1312.0963368709347, + 1303.9483738445738, + 1311.1462512838068, + 1305.2208147894557, + 1324.1869222868881, + 1319.7049640534065, + 1311.574255391989, + 1300.64190345772, + 1305.1095515234508, + 1310.8553235193426, + 1310.7811708319068, + 1348.0172543649435 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3649, + "samplesNs": [ + 6799.043025486435, + 6816.5250753631135, + 6749.257878870923, + 6802.377363661277, + 6737.861879967114, + 6730.165798849, + 6742.943272129351, + 6781.127158125514, + 6754.2019731433265, + 6758.746779939709, + 6768.840778295424, + 6763.405316525075, + 6703.309125787887, + 6731.501781309948, + 6719.489449164154, + 6754.338996985475, + 6799.579884899973, + 6843.461770348041, + 6864.917237599342, + 6753.288572211565, + 6783.55933132365 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2536, + "samplesNs": [ + 9395.60331230284, + 9020.88288643533, + 9068.546135646688, + 9051.03194006309, + 9101.209384858044, + 8964.100157728706, + 8990.798895899054, + 9004.567429022081, + 8988.252365930599, + 9135.975552050473, + 9020.340299684543, + 9028.572160883281, + 9021.589116719242, + 9015.26380126183, + 9124.966876971608, + 9032.975157728706, + 8973.399447949527, + 9032.20307570978, + 9016.430205047318, + 8910.488958990536, + 9103.723186119874 + ] + } + ] + }, + { + "run": 2, + "order": [ + "oracle", + "live" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 372358, + "samplesNs": [ + 66.42297197857975, + 66.87448638138565, + 67.13252837323222, + 66.1283415422792, + 65.96899489201253, + 65.11117526681312, + 65.79219460841448, + 67.09974003512748, + 66.730697339657, + 65.33262344303063, + 64.95630549095226, + 65.42270341982716, + 65.84915054866553, + 65.60934906729545, + 65.75224649396549, + 66.20678218273812, + 65.09819313671252, + 65.2961451076652, + 65.4778707587859, + 65.47686097787613, + 65.60565907003475 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 204887, + "samplesNs": [ + 121.87551186751722, + 125.2794223157155, + 120.04177912703099, + 120.69437299584649, + 121.11310136807118, + 120.39380243744112, + 121.23023910741043, + 120.23599349885546, + 120.06455753659334, + 120.37000883413785, + 120.21606544095037, + 120.85808274805136, + 120.7084051208715, + 119.6415585176219, + 120.18006998979925, + 120.27666469810188, + 120.58618653208842, + 125.29569470000537, + 120.4381341910419, + 118.87324720455666, + 121.99407478268509 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 79758, + "samplesNs": [ + 307.3907946538278, + 314.4444319065172, + 307.19384889290103, + 307.96649865844176, + 305.67466586423933, + 305.61092304220267, + 305.532560997016, + 304.98245943980544, + 304.91351337796834, + 303.9345144060784, + 304.53528172722486, + 305.29539356553573, + 305.59160209634143, + 308.15090649213874, + 305.49913488302116, + 306.8490558940796, + 308.8086336166905, + 307.57364778454826, + 304.5190827252439, + 304.71447378319414, + 306.842260337521 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 101273, + "samplesNs": [ + 288.191739160487, + 251.8189250836847, + 242.02691734223336, + 242.57040869728357, + 245.2607506442981, + 243.88081719708114, + 241.86398151531012, + 243.16204713990896, + 243.55907300070106, + 241.02055829293099, + 242.8193299299912, + 241.5401933387971, + 239.60153249138466, + 243.23281624914833, + 242.48894572097203, + 242.32643448895558, + 241.44802662111323, + 241.73809406258331, + 241.67308167033661, + 240.31989770225036, + 243.74915327876136 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 352341, + "samplesNs": [ + 68.74270947746643, + 68.30728754246596, + 69.10729378641713, + 69.20674857595341, + 69.25464251960459, + 70.66757487774628, + 70.31055710235255, + 69.45780649995316, + 69.52450608927147, + 68.73656202372133, + 68.3920775612262, + 68.58814898067497, + 68.75879332805435, + 68.98702677235973, + 68.52417118643586, + 68.63249522479643, + 68.2744131395438, + 68.86534351665006, + 68.63119534768875, + 68.17034634061889, + 67.5109482007487 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 62165, + "samplesNs": [ + 353.1629534303869, + 344.70628166974984, + 349.57236387034504, + 345.0722593099011, + 349.304270891981, + 347.4034263653181, + 348.5897691627121, + 343.89661385023726, + 345.497868575565, + 353.8432558513633, + 357.2501890131103, + 347.7868092978364, + 348.30558996219736, + 345.1674254001448, + 348.25263411887715, + 349.92761200032174, + 355.5283037078742, + 366.80138341510497, + 354.40828440440765, + 347.5910882329285, + 348.2016890533258 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19751, + "samplesNs": [ + 1263.807351526505, + 1247.7026479671915, + 1277.5175940458712, + 1250.5274163333502, + 1247.917826945471, + 1257.6831552832768, + 1257.537593033264, + 1247.7553541592831, + 1257.3245405295934, + 1276.9037010784264, + 1261.9614196749533, + 1256.0060250113918, + 1236.382562908207, + 1270.8428434003342, + 1239.5658953977013, + 1258.4974431674345, + 1250.468330717432, + 1236.352994785074, + 1243.8441597893777, + 1252.643309199534, + 1256.771809022328 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16174, + "samplesNs": [ + 1449.0720910102634, + 1457.346667491035, + 1460.1804130085322, + 1443.6441201929022, + 1442.7167058241623, + 1452.320576233461, + 1451.2747001360208, + 1439.9859651292197, + 1457.8335600346234, + 1441.5858167429208, + 1445.2902806974157, + 1452.8821565475455, + 1450.764622233214, + 1458.2947322863856, + 1446.6762087300606, + 1461.4118338073451, + 1436.0495857549154, + 1443.4096698404846, + 1451.7873129714355, + 1452.2613453691108, + 1458.0113144552986 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 356805, + "samplesNs": [ + 66.71302532195458, + 66.7720015134317, + 66.84545339891537, + 66.01189725480305, + 67.00531943218284, + 66.80785022631409, + 70.16530878210787, + 67.37433612197138, + 67.24121018483486, + 67.4066843233699, + 66.9821975588907, + 67.46577262089937, + 66.97028909348244, + 66.76569274533709, + 66.98102885329521, + 67.0015834979891, + 66.75821807429828, + 66.94529785176778, + 66.79406958983198, + 66.78974790151483, + 66.40730651196031 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14780, + "samplesNs": [ + 1300.6004736129905, + 1296.6677943166442, + 1293.938903924222, + 1281.359945872801, + 1287.8890392422193, + 1276.6520297699594, + 1290.5897834912043, + 1275.8711096075779, + 1280.8496617050068, + 1291.8837618403247, + 1295.9996617050067, + 1295.2159675236805, + 1298.7652232746955, + 1278.5493234100136, + 1288.0723274695536, + 1285.7070365358593, + 1299.1514884979701, + 1306.7771312584573, + 1313.2893775372124, + 1320.1031799729365, + 1420.1905277401895 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3649, + "samplesNs": [ + 6908.171279802686, + 6725.58673609208, + 6857.506714168266, + 6783.216771718279, + 6806.647848725678, + 6773.636612770622, + 6776.068785968759, + 6778.249657440395, + 6820.338996985475, + 6691.090983831186, + 6721.224993148808, + 6829.428336530556, + 6785.238147437654, + 6730.028775006851, + 6835.742669224445, + 6803.382296519594, + 6750.822143052891, + 6714.819128528364, + 6843.964099753357, + 6805.494656070156, + 6771.695258975062 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2547, + "samplesNs": [ + 9016.277188849626, + 9052.954456223008, + 9019.320376914016, + 8965.858264625049, + 9007.116215155085, + 9139.412249705536, + 9123.920298390263, + 9094.71927758147, + 9040.047114252062, + 8997.46446800157, + 9068.904593639576, + 9005.30035335689, + 9100.804868472713, + 8999.214762465646, + 8976.851590106007, + 9005.202198665096, + 9014.16686297605, + 8941.778170396545, + 9015.52453867295, + 8994.634079308991, + 9029.691794267766 + ] + } + ] + }, + { + "run": 3, + "order": [ + "live", + "oracle" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 406239, + "samplesNs": [ + 61.76957160686197, + 65.16863471995549, + 65.25089417805775, + 59.09298467158495, + 60.177629425042895, + 60.47189462360827, + 61.01929406088534, + 60.074549710884476, + 59.99095606281032, + 61.52689672828064, + 59.901314250970486, + 59.85905587597449, + 60.1485012517262, + 59.680793818417236, + 60.09116554540554, + 60.27373541191269, + 59.81125888947147, + 60.88236727640626, + 64.5564162968105, + 60.287478553265444, + 60.25640078869828 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 201675, + "samplesNs": [ + 128.04347093095328, + 126.26585843560183, + 121.34250650799554, + 121.9904152720962, + 121.74621048716995, + 122.13565389859923, + 122.04660964422958, + 121.4772133382918, + 122.49638279409942, + 121.73050700384282, + 121.99537374488658, + 122.21478616586091, + 121.7860815668774, + 122.90545679930581, + 122.23090120242965, + 126.46667658361224, + 122.86310648320317, + 123.10255609272345, + 123.36721457791, + 121.96955001859428, + 121.62328002975083 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 77192, + "samplesNs": [ + 320.0887527204892, + 329.19807752098666, + 320.50331640584517, + 321.67302311120324, + 320.2485361177324, + 319.9948310705773, + 321.1710151311017, + 320.3057570732718, + 317.8513706083532, + 320.00671053995234, + 318.8596875323868, + 319.22080008291016, + 321.0841149341901, + 323.07643279096277, + 319.7346616229661, + 320.05798528344906, + 319.2310472587833, + 321.30326976888796, + 319.96893460462223, + 322.3148124157944, + 319.8523422116281 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 98481, + "samplesNs": [ + 296.94433444014584, + 262.42117768909736, + 253.08562057655791, + 254.01768869121963, + 252.8453001086504, + 254.11119911455, + 253.57810135965312, + 252.95826606147378, + 253.1241254658259, + 252.75898904357186, + 252.97435038230725, + 253.74861140727654, + 255.4993653598156, + 252.20050568129892, + 254.1099298341812, + 253.03146799890334, + 252.61429108152842, + 254.5237152344107, + 253.93476914328653, + 253.97962043439853, + 253.6872594713701 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 358039, + "samplesNs": [ + 70.35441669762233, + 69.96211585888688, + 71.18801024469401, + 70.19859289071861, + 69.30890768882719, + 70.08896516859895, + 70.40375769120124, + 68.93313298271975, + 69.52931943168203, + 68.91544496549258, + 69.26654638181874, + 69.1730984613408, + 68.88204357625845, + 68.87203628654979, + 68.59902133566455, + 69.45588609062142, + 68.94162926385114, + 68.88472205541855, + 68.65709042869632, + 68.52488974664772, + 68.77625901088987 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 61486, + "samplesNs": [ + 352.8357349640569, + 349.42777217577986, + 348.980532153661, + 346.4203233256351, + 351.2384933155515, + 351.4885502390788, + 349.33902026477574, + 345.1564909084995, + 348.6843997007449, + 349.87502846176363, + 349.4657320365612, + 352.18246430081643, + 350.5127183423869, + 356.39210551995575, + 351.499398236997, + 349.04287154799465, + 347.48019061249715, + 353.53848030445954, + 352.9529649025794, + 350.4232670851901, + 349.0889633412484 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19813, + "samplesNs": [ + 1253.350073184273, + 1252.4541967395144, + 1254.5677080704588, + 1261.12486751123, + 1257.3268561045777, + 1247.2934436985818, + 1254.1365769949023, + 1248.9211628728613, + 1258.2311108867916, + 1254.191288547923, + 1249.4153333669813, + 1252.414222984909, + 1271.4947256851563, + 1263.865038106294, + 1250.717104931106, + 1251.1166910614243, + 1259.7831221924998, + 1248.9674456165144, + 1260.8199162166254, + 1275.5345480240246, + 1290.6257002977843 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16058, + "samplesNs": [ + 1465.7491592975464, + 1478.8293685390458, + 1452.9102627973596, + 1461.5145099016067, + 1466.7611159546643, + 1468.4087682152199, + 1460.5726117822892, + 1464.3635571054926, + 1464.859197907585, + 1461.4392826005728, + 1448.3071989039731, + 1467.915742931872, + 1462.2280483248226, + 1462.3240752273011, + 1461.2783659235272, + 1463.0324448872836, + 1460.17561340142, + 1460.1574293187196, + 1468.2089924025408, + 1455.0794619504297, + 1472.321646531324 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 350253, + "samplesNs": [ + 68.45861134665513, + 67.91388225083011, + 68.08078731659685, + 69.17987283477943, + 68.1861854145432, + 68.78896397746772, + 68.91387368559299, + 68.24852321036508, + 67.58650175730115, + 67.8998466822554, + 68.14966609850593, + 68.07555110163224, + 67.9226873145983, + 67.77172501020691, + 68.0693670004254, + 67.8210950370161, + 68.10707688442355, + 67.49347471684753, + 67.59387642646887, + 67.22676179790038, + 67.50525191789934 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14606, + "samplesNs": [ + 1292.1573326030398, + 1300.3160345063673, + 1311.8781322744078, + 1306.9229768588252, + 1312.86799945228, + 1311.3304121593865, + 1304.1928659455018, + 1314.6110502533206, + 1308.3093249349583, + 1304.2471587019033, + 1322.781185814049, + 1303.9361906066001, + 1309.0140353279473, + 1309.9611118718335, + 1304.5152676982061, + 1309.6672600301247, + 1348.863480761331, + 1339.7462686567164, + 1322.1450089004518, + 1308.0126660276599, + 1325.0091058469122 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3758, + "samplesNs": [ + 6661.821447578499, + 6622.826769558275, + 6604.754390633316, + 6623.070782331027, + 6639.369345396488, + 6595.474188398084, + 6657.020489622139, + 6634.169505055881, + 6667.0880787653, + 6592.624534326769, + 6624.578765300692, + 6652.918041511442, + 6599.731506120277, + 6675.703033528473, + 6624.623203831826, + 6644.502927088877, + 6635.167110164982, + 6634.313464608835, + 6623.99095263438, + 6653.295103778606, + 6646.343267695583 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2499, + "samplesNs": [ + 9024.843137254902, + 9069.22769107643, + 8967.85394157663, + 8963.935574229692, + 9002.534213685474, + 8937.608243297318, + 8960.5506202481, + 8965.036014405763, + 8913.398959583834, + 9055.155262104841, + 8942.276910764305, + 8973.58943577431, + 8915.649459783914, + 8975.840336134454, + 8952.480992396959, + 8956.08243297319, + 8966.336534613845, + 8920.434973989595, + 9043.650660264106, + 8864.895958383353, + 9011.57142857143 + ] + } + ] + }, + { + "run": 3, + "order": [ + "live", + "oracle" + ], + "label": "oracle", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 369022, + "samplesNs": [ + 66.58726850973655, + 64.30465663293788, + 64.21974841608359, + 68.99678880933928, + 67.8062554536044, + 66.83883345708387, + 67.06849456129987, + 66.57767016600636, + 66.94124469543821, + 66.57823381803794, + 66.66212854518159, + 67.09525448347253, + 66.38888196367697, + 67.0244592463322, + 67.0050376400323, + 66.88941580718765, + 66.53137753304681, + 66.1227514890711, + 66.47706640796484, + 66.33897707995729, + 66.460918319233 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 198275, + "samplesNs": [ + 125.7338292775186, + 128.54726011852225, + 124.59042743664102, + 124.28676333375363, + 123.35855251544572, + 125.4329037952339, + 126.9259866347245, + 125.23010969612912, + 124.31723616189636, + 125.13302231748834, + 128.90429958391124, + 126.38801160005043, + 126.20035304501324, + 126.17576598159123, + 123.86794603454797, + 124.94746690203002, + 126.5550825873156, + 124.46980204261757, + 123.81877190770395, + 125.34778968604212, + 125.09687555163283 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 78951, + "samplesNs": [ + 312.4142316120125, + 321.20608985320007, + 313.56527466403213, + 314.8772656457803, + 312.18940862053677, + 314.69519068789504, + 310.9075122544363, + 312.09916277184584, + 309.61187318716674, + 311.4627047155831, + 312.37413078998367, + 312.31713341186304, + 309.49998100087396, + 310.6557611683196, + 314.04657319096657, + 312.1841395295816, + 310.7602563615407, + 312.7493635292777, + 311.2616306316576, + 309.7374700763765, + 310.28106040455475 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 100462, + "samplesNs": [ + 285.1919929923752, + 255.35069976707612, + 247.9320539109315, + 251.26415958272779, + 246.52894626824073, + 247.90219187354424, + 246.60112281260575, + 249.3426270629691, + 246.5617248312795, + 248.60809062132947, + 247.0017718142183, + 246.11834325416575, + 246.14074973621868, + 246.98020146921223, + 246.60319324719794, + 247.29002010710516, + 247.5550456889172, + 246.4916286755191, + 247.34186060400947, + 248.85860325297128, + 247.90799506280982 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 354005, + "samplesNs": [ + 72.60349430092795, + 69.82128501009873, + 70.15508255533113, + 70.8402197709072, + 69.24831570175563, + 69.69416533664779, + 70.1772093614497, + 69.3893221847149, + 71.622457309925, + 69.9418087315151, + 70.38024604172257, + 69.3069306930693, + 69.15615598649737, + 70.7020381068064, + 69.39132215646671, + 69.99430234036242, + 69.40733040493778, + 69.57881950819903, + 69.39308766825327, + 69.97041002245732, + 69.2519653677208 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 62326, + "samplesNs": [ + 347.93866123287233, + 349.1326573179732, + 347.0963161441453, + 347.28752045695217, + 348.432034784841, + 348.03560311908353, + 348.57576292398034, + 347.45732118217114, + 352.9633218881366, + 348.67405256233354, + 371.41802778936557, + 354.0770785867856, + 355.2075538298623, + 349.91282931681803, + 355.4308474793826, + 355.794531977024, + 349.5945993646311, + 348.8779321631422, + 349.9703173635401, + 350.3874787408144, + 350.30056477232614 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19868, + "samplesNs": [ + 1261.633027984699, + 1258.1748037044495, + 1246.2376686128448, + 1256.251711294544, + 1249.7441614656734, + 1245.9209784578215, + 1249.6602577008255, + 1248.9912925307026, + 1236.898983289712, + 1261.5050835514396, + 1247.5777632373665, + 1239.975488222267, + 1257.273001811959, + 1248.9723676263338, + 1264.4936078115563, + 1251.7679182605195, + 1251.1828065230522, + 1252.9109120193275, + 1250.379605395611, + 1252.9402053553454, + 1255.6476746527078 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16126, + "samplesNs": [ + 1463.041051717723, + 1455.9019595683988, + 1459.3513580553144, + 1473.8595435941957, + 1458.242899665137, + 1453.741907478606, + 1466.617078010666, + 1459.2634875356566, + 1458.1498821778493, + 1458.222187771301, + 1456.9949150440282, + 1459.5399975195337, + 1468.7409773037332, + 1463.25034106412, + 1456.0104799702344, + 1466.2630534540494, + 1464.472466823763, + 1465.6920501054199, + 1456.6305965521517, + 1459.8034850551903, + 1464.6611062879822 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 350909, + "samplesNs": [ + 69.51576619579436, + 66.482455565403, + 65.96997512175521, + 65.80172352376258, + 65.78379294916915, + 66.18833657728926, + 65.60544756617813, + 65.40097575154812, + 66.31265655768304, + 66.58362139472057, + 66.50216437879907, + 65.57683046031877, + 65.74282791264972, + 65.53574573464915, + 66.77395849066282, + 65.2749943717602, + 65.95750750194495, + 65.53254262501105, + 66.00714145262732, + 65.4332747236463, + 65.01626062597425 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14416, + "samplesNs": [ + 1311.742716426193, + 1323.5120699223085, + 1320.780729744728, + 1340.6631520532742, + 1326.555563263041, + 1331.9372918978913, + 1335.2178135405106, + 1317.6014150943397, + 1321.5437708102108, + 1320.546614872364, + 1352.7792730299668, + 1317.6302719200887, + 1316.4915371809102, + 1308.6356825749167, + 1434.7599889012208, + 1325.451512208657, + 1333.2986265260822, + 1343.2528440621531, + 1336.489525527192, + 1318.2632491675915, + 1322.1247225305217 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3743, + "samplesNs": [ + 6624.153887256211, + 6696.756345177665, + 6718.329682073203, + 6651.2268234036865, + 6667.457119957254, + 6664.507079882447, + 6677.420251135452, + 6691.835960459524, + 6651.126369222548, + 6628.46192893401, + 6760.274646005878, + 6684.377504675394, + 6625.756879508415, + 6711.917713064387, + 6682.741116751269, + 6666.410633181939, + 6642.009350788137, + 6605.585893668181, + 6690.132781191558, + 6657.238044349452, + 6619.890462196099 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2551, + "samplesNs": [ + 8981.559780478245, + 8980.758918071344, + 8963.772246177969, + 9033.859270874167, + 8886.466091728735, + 8895.057624460997, + 8870.63896511172, + 9118.940415523324, + 8973.850254802039, + 8964.752254018033, + 8918.790278322227, + 8908.108192865542, + 8934.894551156409, + 8919.459427675421, + 9121.194041552333, + 9223.73578988632, + 9054.210505684045, + 9157.45472363779, + 9073.680125441004, + 9362.373970991768, + 9279.02469619757 + ] + } + ] + }, + { + "run": 4, + "order": [ + "oracle", + "live" + ], + "label": "oracle", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 377702, + "samplesNs": [ + 68.55360310509343, + 67.8701966100259, + 68.25696448522909, + 66.55688082138829, + 66.10701028853434, + 64.37504434713081, + 65.20175694065692, + 64.71724798915547, + 65.11813546128958, + 64.95861816987995, + 65.91075768727727, + 65.24886021254852, + 64.15650962928446, + 66.24942944437679, + 64.30367061863586, + 64.85867165119592, + 65.30798883776099, + 64.92684709109298, + 65.80595813630852, + 64.62204330398039, + 64.856024061297 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 201059, + "samplesNs": [ + 123.0642100080076, + 127.11111166374049, + 120.62587101298624, + 122.57160833387215, + 123.0957082249489, + 122.3724528620952, + 122.56476954525786, + 120.22341700694821, + 122.9247385095917, + 123.50562272765706, + 125.87992579292646, + 121.0057346351071, + 123.22170606637853, + 121.32985342610876, + 124.25146350076346, + 123.89190735057869, + 121.77229569429869, + 123.24885730059336, + 124.07800695318289, + 122.19029737539726, + 122.14117746532112 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 77978, + "samplesNs": [ + 320.27035830618894, + 324.6952217292057, + 315.27748852240376, + 317.5292005437431, + 317.15409474467157, + 316.72128036112747, + 318.489933058042, + 319.82845161455793, + 313.4602067249737, + 310.5202749493447, + 316.0805996563133, + 314.9654389699659, + 319.7493652055708, + 315.4281848726564, + 316.63844930621457, + 315.6306907076355, + 315.49549873041116, + 316.7763087024545, + 320.0293672574316, + 336.25617481853857, + 322.3938162045705 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 100036, + "samplesNs": [ + 288.99137310568193, + 260.2542184813467, + 249.77091247151026, + 247.43884201687393, + 248.18940181534649, + 253.64785677156223, + 250.0479027550082, + 249.724259266664, + 250.7347354952217, + 247.20267703626695, + 248.159822463913, + 250.95507617257786, + 246.71451277540086, + 250.857191411092, + 248.0669458994762, + 245.6665600383862, + 246.89777680035186, + 251.2374645127754, + 248.97204006557638, + 248.63091287136632, + 248.42514694709905 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 356587, + "samplesNs": [ + 67.75765801894067, + 67.73662528359138, + 67.45957648484101, + 67.45291892301178, + 67.14724316926865, + 66.7562642496782, + 66.88748888770482, + 66.79657979679574, + 66.23220139825625, + 66.03320648256947, + 69.60620269387275, + 70.0843440731154, + 68.28417749385143, + 67.88490606780393, + 67.50608406924538, + 67.3308112746679, + 68.26501526976587, + 67.6812390805049, + 67.48002591232995, + 70.13879642275238, + 69.11111453866798 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 61211, + "samplesNs": [ + 344.9257486399503, + 342.60453186518765, + 343.6780153893908, + 353.7361095227982, + 357.9946088121416, + 348.17884040450247, + 345.75824606688343, + 347.21291924654065, + 360.2354968878143, + 343.53166914443483, + 346.99374295469767, + 349.0127101337995, + 344.34033098626065, + 349.71586806292987, + 344.51459704954993, + 350.4122298279721, + 345.7446374017742, + 350.8097564163304, + 352.16709414974434, + 346.8923069382954, + 349.92007972423255 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19744, + "samplesNs": [ + 1270.1411568071312, + 1274.815538897893, + 1272.6841065640194, + 1295.7459481361427, + 1303.448693273906, + 1280.1969205834685, + 1304.594661669368, + 1286.922609400324, + 1290.9997974068071, + 1289.6364971636954, + 1302.6024615072934, + 1280.7583063209076, + 1276.0796697730957, + 1265.3105753646678, + 1273.954517828201, + 1264.7049230145867, + 1287.249746758509, + 1278.0886851701782, + 1286.5026337115073, + 1297.4046799027553, + 1290.9618111831442 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16181, + "samplesNs": [ + 1475.5423027006984, + 1461.3255052221741, + 1452.7480996230147, + 1465.9606328409864, + 1474.3088807861072, + 1474.2470181076571, + 1457.5685680736667, + 1447.3199431431926, + 1468.0772510969655, + 1500.04888449416, + 1496.178666337062, + 1503.3758729373958, + 1476.9508683023298, + 1505.6830850998085, + 1497.509980841728, + 1480.7000803411408, + 1495.5503368147827, + 1504.7895680118659, + 1505.0058710833694, + 1482.8451270008034, + 1539.701934367468 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 366307, + "samplesNs": [ + 66.27899002749061, + 63.689973164585986, + 65.1259298894097, + 66.41719650457131, + 65.44658442235611, + 65.09828913998368, + 64.91776842921375, + 65.66224778669259, + 65.20600752920365, + 63.759928147701245, + 65.1445809116397, + 65.12217347743832, + 64.84474225171782, + 65.03401791393559, + 64.5276148148957, + 63.675982167962935, + 63.49865003944779, + 64.40146652944115, + 64.7444192985665, + 63.71033586581747, + 64.24506220192352 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14568, + "samplesNs": [ + 1299.57784184514, + 1302.0433141131246, + 1293.6429846238332, + 1296.4001922020868, + 1276.6108594179022, + 1290.6856123009336, + 1278.2125205930806, + 1299.020112575508, + 1287.479406919275, + 1294.5210735859418, + 1376.2527457440967, + 1358.9002608456892, + 1324.4468698517298, + 1286.647103239978, + 1280.7351729818781, + 1271.6113399231192, + 1286.115115321252, + 1298.9057523338824, + 1290.7027732015376, + 1309.3395112575508, + 1308.000961010434 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3616, + "samplesNs": [ + 6876.348174778761, + 6872.21128318584, + 6888.873617256637, + 6862.013550884956, + 6846.308075221239, + 6830.7522123893805, + 6781.733960176991, + 6864.825221238938, + 6976.216814159292, + 7062.361725663717, + 7071.925608407079, + 7048.200221238938, + 7015.129701327433, + 6991.565265486725, + 7018.724557522124, + 6878.053373893806, + 6900.004701327433, + 6863.235066371682, + 6834.566371681416, + 6826.431139380531, + 6874.527654867256 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2468, + "samplesNs": [ + 9100.73946515397, + 9155.18638573744, + 9084.970826580227, + 9184.562398703403, + 9182.587115072933, + 9253.747974068072, + 9190.285656401946, + 9194.286871961101, + 9017.439627228525, + 9068.64546191248, + 9040.130470016207, + 9100.16531604538, + 9102.495137763372, + 9090.339546191248, + 9024.142220421394, + 9179.345623987034, + 9098.341977309563, + 9075.162074554295, + 9166.767828200973, + 9110.666531604538, + 9071.431118314425 + ] + } + ] + }, + { + "run": 4, + "order": [ + "oracle", + "live" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 387816, + "samplesNs": [ + 63.98233956309178, + 65.88970800585845, + 65.85178280421643, + 62.02436464715226, + 62.92266693483508, + 62.1612439919962, + 62.54007570600491, + 62.3538843162737, + 62.03285578728057, + 62.03897724694185, + 62.369352992140605, + 62.27802875590486, + 61.519509251810135, + 62.45638137673536, + 62.875605957464366, + 62.70531643872352, + 62.78460661757122, + 62.83671380242177, + 63.02183251851393, + 62.71004548548796, + 63.00410503950327 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 200104, + "samplesNs": [ + 129.76939491464438, + 128.05798984528045, + 124.28162355575101, + 123.27673109982808, + 123.7779304761524, + 125.91472934074281, + 125.71025566705313, + 126.76658137768361, + 126.61853336265142, + 125.67235537520489, + 127.40354015911726, + 125.7804241794267, + 124.76074941030664, + 123.02935973293887, + 124.08526566185583, + 124.02363271099028, + 123.38313576939991, + 123.8601727101907, + 123.83623016031663, + 123.31899912045736, + 123.81728001439252 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 79588, + "samplesNs": [ + 307.88456802533045, + 319.2723777453887, + 310.37342312911494, + 306.66683419610996, + 308.2395210333216, + 312.2617856963361, + 310.75141981203194, + 309.94832135497813, + 311.7089385334473, + 308.5525833040157, + 310.00329195356085, + 311.5105292255114, + 310.8482685832035, + 308.4007639342614, + 309.0347665477208, + 308.03690254812284, + 311.07861737950446, + 318.1216640699603, + 311.6026662310901, + 311.92045283208523, + 314.19623561340904 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 98848, + "samplesNs": [ + 291.581104321787, + 258.61719002913566, + 248.3627994496601, + 250.12730657170604, + 248.15668501133052, + 247.70817821301392, + 247.3148976205892, + 246.9979159922305, + 248.71434930398186, + 248.51118889608287, + 248.7788523794108, + 249.16032696665587, + 253.7110917772742, + 252.7352601974749, + 254.29278285853027, + 251.5195957429589, + 254.32144302363224, + 253.35573810294593, + 253.4535347199741, + 252.50932745224992, + 251.0453726934283 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 343072, + "samplesNs": [ + 71.42353791623916, + 71.35030547523552, + 72.9326992584647, + 72.14763664770078, + 71.37666145881914, + 72.2124918384479, + 70.84166588937599, + 71.66194851226565, + 71.5843408963716, + 74.30571133756179, + 73.33762009140938, + 74.65901326835183, + 71.6419089870348, + 71.58458574293442, + 71.8793489413301, + 71.73761484469732, + 71.46094697323011, + 70.4917626620651, + 71.66267722227404, + 69.9108583620931, + 71.14917859807854 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 61365, + "samplesNs": [ + 354.41619815855944, + 355.5895054183981, + 354.4976778293816, + 355.17259023873544, + 356.83749694451234, + 363.63223335777724, + 351.2242320541025, + 355.38512181210785, + 350.96823922431355, + 353.19061354192127, + 365.2767538499144, + 352.69764523751326, + 356.9732909639045, + 350.72448464108203, + 365.8980526358674, + 353.843803471034, + 351.0388658029822, + 352.40024443901245, + 355.56030310437546, + 368.2854069909558, + 371.23156522447647 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19479, + "samplesNs": [ + 1275.5146568098978, + 1265.358437291442, + 1261.3134657836645, + 1286.1949792083783, + 1289.8206786796036, + 1264.5348837209303, + 1271.859027670825, + 1268.6268802299912, + 1279.7136403306124, + 1283.2345089583655, + 1297.4057703167514, + 1266.761640741311, + 1273.6814518199087, + 1286.3767647209816, + 1280.3746085528005, + 1278.9050259253554, + 1314.006930540582, + 1248.911186405873, + 1303.0806509574413, + 1296.5650700754659, + 1280.7874634221469 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 15872, + "samplesNs": [ + 1493.5289818548388, + 1476.5257056451612, + 1476.2422505040322, + 1469.3721648185483, + 1486.5197202620968, + 1493.8229586693549, + 1490.1241179435483, + 1474.352066532258, + 1483.1306703629032, + 1485.1756552419354, + 1511.3643523185483, + 1485.2491809475807, + 1480.4556451612902, + 1491.497101814516, + 1496.4114163306451, + 1508.6263230846773, + 1494.3558467741937, + 1495.4085811491937, + 1483.227759576613, + 1478.9120463709678, + 1465.2769027217741 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 341156, + "samplesNs": [ + 69.08069035866289, + 69.20038047110413, + 68.44473789117002, + 69.56898017329316, + 69.37991710537115, + 69.10084242985613, + 68.57725204891604, + 68.90188359577436, + 69.71358557375511, + 69.62491646050488, + 69.76439517405527, + 70.16963500568654, + 69.22553904958436, + 70.20554233253995, + 69.95919755185311, + 69.26120308597827, + 69.03953030285265, + 70.39570460434523, + 69.64787663121857, + 68.76900303673393, + 68.99495245576803 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14555, + "samplesNs": [ + 1313.7381655788388, + 1309.2981106149089, + 1302.522088629337, + 1321.6849879766403, + 1331.3208519409138, + 1287.5329440054963, + 1282.9268292682927, + 1372.045688766747, + 1331.177739608382, + 1299.91989007214, + 1337.9079354173823, + 1304.2797664032978, + 1330.4305736860185, + 1312.5530058399177, + 1317.542631398145, + 1296.4388182755067, + 1314.5711439367915, + 1328.088835451735, + 1321.3586396427345, + 1287.6187564410855, + 1303.913363105462 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3657, + "samplesNs": [ + 6844.0205086136175, + 6836.250205086136, + 6816.356576428767, + 6827.738856986601, + 6811.867651080121, + 6719.202898550725, + 6771.203718895269, + 6906.4238446814325, + 6844.7612797374895, + 6826.007109652721, + 6725.298605414274, + 6781.526387749522, + 6792.281925075198, + 6868.824446267432, + 6861.771944216571, + 6881.050041017227, + 6816.026524473612, + 6796.406617445994, + 6814.556467049494, + 7061.616899097621, + 6804.3136450642605 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2533, + "samplesNs": [ + 8955.224634820372, + 9094.535728385314, + 8929.562968811686, + 9032.356099486775, + 8997.368337939202, + 8944.532175286222, + 8883.438610343466, + 9131.39873667588, + 9447.131464666403, + 9035.876431109356, + 9078.234109751284, + 9082.116067903671, + 9040.761942360838, + 9113.53454401895, + 9429.662060797473, + 8937.837347019346, + 8967.62731938413, + 9007.35294117647, + 9020.989340702725, + 9076.753651796289, + 8957.51085669167 + ] + } + ] + }, + { + "run": 5, + "order": [ + "live", + "oracle" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 392762, + "samplesNs": [ + 62.980993578808544, + 66.75756310437365, + 65.45323121890611, + 62.318381106115154, + 63.7399366537496, + 62.32039504840081, + 61.96659809248349, + 61.84300925242259, + 61.916735834933114, + 60.87157362473967, + 61.13562411842286, + 65.50128831200574, + 62.18174110530041, + 60.49995671679032, + 61.01224660226804, + 61.14814060423361, + 61.04406994566684, + 61.4278927187457, + 61.49833232339177, + 61.23227043349407, + 61.43712222669199 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 194020, + "samplesNs": [ + 136.41849809298012, + 136.18913514070715, + 131.99133079064015, + 129.76948252757447, + 128.06111225646842, + 134.37425007731161, + 131.5070611277188, + 127.81800845273683, + 128.12789918565096, + 127.0740954540769, + 128.54473765591177, + 127.71921966807545, + 127.58499639212452, + 128.60272136893104, + 127.95459231007112, + 127.76109679414493, + 128.36198330069064, + 129.29036181836923, + 127.38957323987218, + 129.91400886506545, + 128.35253066694156 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 79905, + "samplesNs": [ + 307.29094549777864, + 318.2263312683812, + 308.2874538514486, + 309.0294724985921, + 306.4915712408485, + 307.74460922345287, + 309.0383455353232, + 306.18965020962395, + 305.5023715662349, + 315.5742193855203, + 311.62421625680497, + 316.69326074713723, + 311.6289093298292, + 312.9946060947375, + 328.14696201739565, + 315.07258619610786, + 320.7058381828421, + 318.5532820224016, + 311.27223577998876, + 311.78952506100995, + 313.31215818784807 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 99192, + "samplesNs": [ + 291.77713928542624, + 254.90631300911363, + 246.7415920638761, + 246.33286958625695, + 247.41662634083394, + 245.4730018549883, + 251.52566739253166, + 250.14701790466972, + 247.94296919106378, + 246.350088716832, + 246.9734656020647, + 249.10610734736673, + 249.58078272441327, + 251.26648318412776, + 251.13038349866926, + 249.5664972981692, + 249.47240704895557, + 248.68941043632552, + 246.80501451729978, + 247.00035285103638, + 246.29380393580126 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 344037, + "samplesNs": [ + 71.73707769803829, + 72.22467060228988, + 72.7561018146304, + 72.1949964684031, + 73.13808689181687, + 71.76335684824598, + 71.83796219592661, + 70.71913776715877, + 71.21642148954909, + 71.15561988972117, + 71.30773724919122, + 71.09034202716569, + 71.77316683961318, + 71.48734583780232, + 71.6790635890907, + 71.3526713696492, + 71.02784874882643, + 71.3704746873156, + 71.30858308844688, + 71.1638573758055, + 72.1312911111305 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 61634, + "samplesNs": [ + 368.70543855664084, + 375.71929454521853, + 366.0898692280235, + 363.9339974689295, + 359.1666125839634, + 355.9885777330694, + 377.5398643605802, + 368.53644092546324, + 367.5244183405263, + 368.38905474251226, + 365.2204951812311, + 351.50173605477494, + 365.0927247947561, + 363.267433559399, + 365.2130479929909, + 368.36878995359706, + 362.16888405750075, + 364.6708797092514, + 361.1189927637343, + 362.11683486387386, + 363.7758055618652 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19757, + "samplesNs": [ + 1271.4965834893962, + 1270.00769347573, + 1289.2266032292353, + 1257.1999797540113, + 1265.905754922306, + 1271.5830844763882, + 1259.378549374905, + 1243.3799665941185, + 1262.539859290378, + 1263.3307182264514, + 1275.7798754871692, + 1270.2354608493192, + 1293.6554132712456, + 1277.6188692615276, + 1275.4045148554942, + 1266.4266842131904, + 1265.486055575239, + 1270.8407146834033, + 1267.0635724047172, + 1260.87589208888, + 1265.3405881459735 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16144, + "samplesNs": [ + 1469.8417368681862, + 1478.593657086224, + 1463.1132309217046, + 1469.8623637264618, + 1454.0386521308226, + 1478.4310579781961, + 1481.484328543112, + 1463.3300297324083, + 1443.5677651139742, + 1466.2800421209117, + 1463.1829162537165, + 1483.6574578790883, + 1478.7614593657086, + 1471.59421456888, + 1484.7054013875124, + 1501.215621902874, + 1469.4649405351834, + 1474.2293731417244, + 1479.220825074331, + 1470.5876486620416, + 1453.0423686818633 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 348037, + "samplesNs": [ + 67.8277970445671, + 67.67958579116588, + 67.03322060585512, + 67.57195930317754, + 68.97183345448903, + 67.95302510939929, + 68.0444895226657, + 68.9896706384666, + 68.08854518341441, + 67.69802348600867, + 67.80337435387617, + 67.67695388708671, + 67.53316745058714, + 67.40758310179665, + 67.37202653740837, + 68.2062309467097, + 67.60727738717435, + 67.86311512856392, + 67.08482144139847, + 67.30977453546606, + 67.12624232481029 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14872, + "samplesNs": [ + 1326.7269365250133, + 1339.0319392146316, + 1382.2507396449705, + 1318.5628698224853, + 1351.5778644432492, + 1329.1195535233996, + 1321.4961672942443, + 1273.063474986552, + 1284.5503630984401, + 1312.3766810112963, + 1318.9270441097365, + 1311.4073426573427, + 1326.920252824099, + 1316.9042495965573, + 1308.2722565895642, + 1314.542428725121, + 1307.599852071006, + 1309.0987089833243, + 1320.1906266810113, + 1311.1831629908554, + 1314.929061323292 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3744, + "samplesNs": [ + 6649.939903846154, + 6679.197649572649, + 6689.236111111111, + 6694.8675213675215, + 6682.447649572649, + 6665.965544871795, + 6625.18936965812, + 6744.546741452991, + 6726.384348290599, + 6613.459401709401, + 6646.278311965812, + 6693.999198717948, + 6737.5133547008545, + 6665.29780982906, + 6693.4983974358975, + 7042.790598290599, + 6700.999198717948, + 6794.682692307692, + 6716.390491452991, + 6688.657318376068, + 6625.255876068376 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2583, + "samplesNs": [ + 8885.80797522261, + 8931.926829268292, + 8850.335269066976, + 8865.708478513356, + 8812.395276809912, + 8957.591560201316, + 8755.500580720092, + 8745.37049941928, + 8750.596593108789, + 8816.78281068525, + 8895.792876500194, + 8834.140147115757, + 8968.88308168796, + 8992.19241192412, + 8834.881920247773, + 8804.555168408828, + 8779.95547812621, + 8770.809136662796, + 8875.951606658924, + 8833.171893147502, + 8750.145180023228 + ] + } + ] + }, + { + "run": 5, + "order": [ + "live", + "oracle" + ], + "label": "oracle", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 415611, + "samplesNs": [ + 58.79165373390021, + 61.586435392710975, + 61.67055010574792, + 58.035136221129854, + 58.20576933719271, + 57.766257389722604, + 58.12586769840067, + 58.04917338568998, + 57.81297655740585, + 58.06521482828895, + 57.82069531364665, + 57.95513352630224, + 57.88285199381152, + 57.592015129532186, + 62.35949481606598, + 58.935319325041924, + 58.288178128105365, + 57.85688781095784, + 59.97916320790355, + 57.85177485677713, + 57.62720428477591 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 207091, + "samplesNs": [ + 124.10385289558697, + 128.23811271373455, + 121.37820088753253, + 121.36089931479398, + 120.06597582705187, + 120.10179100009175, + 120.02211588142411, + 119.91628317985813, + 120.02573747772718, + 119.96899913564569, + 119.38069254578905, + 118.47086546494053, + 119.13622996653645, + 121.9290891443858, + 120.84783983852509, + 120.87500181079815, + 118.76662916302494, + 120.03639945724343, + 120.35067675562917, + 119.5160967883684, + 120.36938833652839 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 79975, + "samplesNs": [ + 306.8495404814004, + 316.8479649890591, + 308.42294467020946, + 309.03823694904656, + 310.1010690840888, + 308.8735979993748, + 305.933616755236, + 310.40950296967804, + 309.1252516411379, + 305.352197561738, + 326.7484713973117, + 310.61945608002503, + 311.26185683025943, + 308.47661144107536, + 312.37052829009065, + 310.4433635511097, + 308.71366051891215, + 308.6584307596124, + 309.4503407314786, + 312.18349484213815, + 308.48702719599873 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 101884, + "samplesNs": [ + 285.20834478426445, + 254.17386439480194, + 254.91898629814298, + 249.512926465392, + 252.62185426563542, + 248.2426975776373, + 249.1628616858388, + 248.25496643241334, + 249.1354579718111, + 246.6015272270425, + 246.03306701739234, + 247.5732205253033, + 245.4691119312159, + 246.16189980762437, + 248.8647186996977, + 248.77883671626554, + 245.5251364296651, + 248.3248890895528, + 251.31276746103413, + 251.19213026579246, + 250.8486023320639 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 350146, + "samplesNs": [ + 67.83991534959702, + 66.44525712131511, + 66.70943549262307, + 66.54854831984372, + 66.66088146087633, + 67.16174681418609, + 66.24022550593182, + 66.53784135760512, + 66.28116271498175, + 66.22392373467068, + 66.33661386964295, + 66.26271612413107, + 66.04578375877492, + 67.29323767799718, + 67.27895792041035, + 67.78862817224815, + 66.39944480302502, + 67.1009378944783, + 67.29811849914036, + 66.80427593061181, + 67.24373547034665 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 62380, + "samplesNs": [ + 345.46529336325744, + 344.8334081436358, + 344.6236774607246, + 344.03855402372557, + 353.8547451106124, + 347.59203270278937, + 362.8206155819173, + 360.98041038794486, + 355.68826546970183, + 356.80706957358126, + 355.83387303622953, + 360.7766912471946, + 354.01838730362294, + 348.9693491503687, + 360.47343699903814, + 357.909858929144, + 359.66989419685797, + 358.38810516191086, + 349.65799935876885, + 347.0944212888746, + 346.4311478037833 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19984, + "samplesNs": [ + 1247.6773418734988, + 1258.0460368294637, + 1256.4947958366693, + 1239.9148318654925, + 1254.4285428342673, + 1257.3329663730985, + 1249.653923138511, + 1246.3366693354683, + 1244.5476881505203, + 1296.9166833466772, + 1283.5810648518816, + 1274.6030324259407, + 1256.697057646117, + 1259.4950960768615, + 1246.7786729383506, + 1269.8700460368295, + 1286.4916933546838, + 1273.5188150520416, + 1260.1706365092073, + 1258.827862289832, + 1268.433496797438 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16251, + "samplesNs": [ + 1447.0288597624763, + 1451.9414189896006, + 1449.0929173589318, + 1437.3705002769061, + 1451.7132484154822, + 1451.3619469571104, + 1442.8214879084364, + 1446.5930096609438, + 1447.3365331364223, + 1453.459233277952, + 1454.0438742231247, + 1454.8079502799828, + 1452.5567657374932, + 1448.9108362562304, + 1443.964986770045, + 1441.1010399360039, + 1455.3924681558058, + 1447.510922404775, + 1440.8728693618855, + 1532.1569749553873, + 1478.6679588948373 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 363815, + "samplesNs": [ + 65.47524153759466, + 65.17414894932864, + 64.46591536907493, + 64.16722784931902, + 65.10508912496736, + 65.18319750422604, + 65.3199428280857, + 64.85106991190578, + 64.56475131591606, + 64.7910586424419, + 64.96090045765018, + 65.3181122273683, + 64.56165908497451, + 65.58209529568599, + 65.28604373101714, + 64.98449486689664, + 64.93570358561357, + 64.96204664458585, + 65.32910407762186, + 66.07582150268681, + 65.15422398746615 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14240, + "samplesNs": [ + 1341.9622191011235, + 1370.9649578651686, + 1362.0318117977529, + 1373.6920646067415, + 1372.2963483146068, + 1373.4989466292134, + 1372.2349016853932, + 1414.4370786516854, + 1375.547191011236, + 1368.407654494382, + 1359.032654494382, + 1345.1808286516855, + 1356.2997191011236, + 1363.225632022472, + 1367.3864466292134, + 1333.7225421348314, + 1326.8316713483146, + 1353.4790028089888, + 1368.2320926966293, + 1361.1130617977528, + 1349.2070926966292 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3730, + "samplesNs": [ + 6709.427882037534, + 6705.29490616622, + 6676.0723860589815, + 6682.864075067024, + 6687.957908847185, + 6710.5563002680965, + 6676.429758713137, + 6762.298927613941, + 6750.658981233244, + 6888.192761394102, + 6753.127613941018, + 6889.4662198391425, + 7064.633512064343, + 6895.609919571046, + 6849.608847184986, + 6774.005898123324, + 6685.757372654156, + 6765.985254691689, + 6767.504289544236, + 6681.4790884718495, + 6670.822252010724 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2583, + "samplesNs": [ + 8998.08052651955, + 8886.549748354626, + 8955.816879597367, + 8855.320170344561, + 8729.836236933797, + 8767.727835849788, + 8787.166085946574, + 8950.009678668215, + 8875.16144018583, + 8965.301974448315, + 8911.456058846303, + 8920.683313975996, + 8777.713511420829, + 8820.234998064267, + 8851.755323267518, + 8883.969028261712, + 8884.678668215254, + 8815.92760356175, + 8861.207897793263, + 8894.131242741, + 8982.610530391019 + ] + } + ] + } + ] +} diff --git a/bench/baseline/router-ed47836/battery-run/lookup-aa-summary.txt b/bench/baseline/router-ed47836/battery-run/lookup-aa-summary.txt new file mode 100644 index 0000000..957c814 --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/lookup-aa-summary.txt @@ -0,0 +1,33 @@ + +> @green-tea/core@26.9.0-beta.2 bench:lookup +> tsx bench/lookup.ts + +| router | routes | workload | median ns/op | run medians (ns) | run spread | +| --- | --- | --- | --- | --- | --- | +| live | 10 | static hit | 62.0 | 57.9 / 65.8 / 60.3 / 62.7 / 61.8 | 12.7% | +| live | 10 | late param hit | 123.8 | 124.0 / 120.4 / 122.1 / 124.3 / 128.4 | 6.4% | +| live | 10 | method miss | 309.0 | 305.7 / 305.6 / 320.1 / 310.8 / 311.6 | 4.7% | +| live | 10 | path miss | 248.4 | 242.7 / 242.5 / 253.7 / 251.0 / 248.7 | 4.5% | +| live | 100 | static hit | 69.5 | 66.7 / 68.7 / 69.2 / 71.6 / 71.5 | 7.1% | +| live | 100 | late param hit | 352.2 | 345.1 / 348.3 / 349.9 / 355.2 / 365.1 | 5.7% | +| live | 100 | method miss | 1265.3 | 1273.8 / 1256.0 / 1254.2 / 1279.7 / 1267.1 | 2.0% | +| live | 100 | path miss | 1464.9 | 1462.8 / 1451.3 / 1462.3 / 1485.2 / 1470.6 | 2.3% | +| live | 500 | static hit | 67.8 | 67.2 / 66.9 / 68.1 / 69.3 / 67.7 | 3.4% | +| live | 500 | late param hit | 1313.7 | 1362.0 / 1293.9 / 1309.7 / 1313.7 / 1316.9 | 5.2% | +| live | 500 | method miss | 6778.2 | 7068.9 / 6783.2 / 6634.3 / 6816.4 / 6689.2 | 6.4% | +| live | 500 | path miss | 9005.3 | 9445.9 / 9015.5 / 8965.0 / 9032.4 / 8834.1 | 6.8% | +| oracle | 10 | static hit | 65.2 | 62.2 / 66.6 / 66.6 / 65.2 / 58.0 | 13.1% | +| oracle | 10 | late param hit | 123.9 | 130.7 / 123.5 / 125.2 / 122.9 / 120.1 | 8.5% | +| oracle | 10 | method miss | 312.7 | 311.4 / 314.2 / 312.2 / 316.8 / 309.1 | 2.4% | +| oracle | 10 | path miss | 249.0 | 248.6 / 253.1 / 247.3 / 249.0 / 248.9 | 2.3% | +| oracle | 100 | static hit | 69.4 | 69.5 / 71.1 / 69.8 / 67.5 / 66.7 | 6.4% | +| oracle | 100 | late param hit | 349.3 | 347.5 / 352.5 / 349.6 / 347.2 / 354.0 | 1.9% | +| oracle | 100 | method miss | 1263.6 | 1294.1 / 1243.1 / 1251.2 / 1286.5 / 1258.0 | 4.0% | +| oracle | 100 | path miss | 1466.2 | 1511.6 / 1464.0 / 1459.5 / 1480.7 / 1449.1 | 4.3% | +| oracle | 500 | static hit | 66.0 | 67.0 / 67.3 / 65.8 / 64.9 / 65.1 | 3.6% | +| oracle | 500 | late param hit | 1317.6 | 1313.2 / 1310.2 / 1323.5 / 1294.5 / 1363.2 | 5.2% | +| oracle | 500 | method miss | 6753.3 | 6717.3 / 6758.7 / 6666.4 / 6876.3 / 6750.7 | 3.1% | +| oracle | 500 | path miss | 9015.3 | 8998.0 / 9021.6 / 8980.8 / 9100.7 / 8884.0 | 2.4% | + +load average: start 3.42 2.40 6.66, end 2.89 2.48 6.26 +raw samples: bench/baseline/router-ed47836/lookup-aa-raw.json diff --git a/bench/baseline/router-ed47836/battery-run/lookup-raw.json b/bench/baseline/router-ed47836/battery-run/lookup-raw.json new file mode 100644 index 0000000..418472a --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/lookup-raw.json @@ -0,0 +1,1973 @@ +{ + "meta": { + "startedAt": "2026-10-10T22:01:31.514Z", + "node": "v22.22.2", + "v8": "12.4.254.21-node.39", + "platform": "darwin 27.0.0 arm64", + "cpu": "Apple M4 Max", + "cpus": 16, + "memoryBytes": 68719476736, + "loadavgAtStart": [ + 2.46630859375, + 2.13818359375, + 6.85986328125 + ], + "package": "@green-tea/core@26.9.0-beta.2", + "harnessCommit": "98ea948ffafa8946c5ed560c7c0f6273c0be0883", + "routers": [ + { + "label": "live", + "path": "src/http/router.ts", + "commit": "98ea948ffafa8946c5ed560c7c0f6273c0be0883", + "dirty": false + } + ], + "env": { + "LOOKUP_OUT": "bench/baseline/router-ed47836/lookup-raw.json" + }, + "method": { + "routeCounts": [ + 10, + 100, + 500 + ], + "routeCountMeaning": "total registered HTTP routes", + "routeGenerator": "N total HTTP routes: N-2 fillers (i = 0..N-3, shape FILLER[i % 5] with k = floor(i / 5): GET /res{k}/items, POST /res{k}/items, GET /res{k}/items/:id, PUT /res{k}/items/:id(\\d+), GET /res{k}/files/:path*), then GET /static/target/leaf, then GET /late/:group/:id declared last. All buffer transport.", + "workloads": [ + { + "name": "static hit", + "method": "GET", + "path": "/static/target/leaf", + "expect": "hit /static/target/leaf" + }, + { + "name": "late param hit", + "method": "GET", + "path": "/late/g1/42", + "expect": "hit /late/:group/:id" + }, + { + "name": "method miss", + "method": "DELETE", + "path": "/static/target/leaf", + "expect": "allow GET,HEAD,OPTIONS" + }, + { + "name": "path miss", + "method": "GET", + "path": "/nowhere/at/all", + "expect": "allow " + } + ], + "workloadOrder": "for each run: for each router (order alternates per run): for count in routeCounts: for workload in workloads", + "operation": "resolveRoute(routes, method, path); on undefined, allowedMethods(routes, path)", + "runs": 5, + "samplesPerCellPerRun": 21, + "sampleMs": 25, + "warmupMsPerCell": 250, + "unit": "ns per lookup (sample time / iterations)" + }, + "loadavgAtEnd": [ + 2.57861328125, + 2.21142578125, + 6.6416015625 + ] + }, + "summary": [ + { + "router": "live", + "routes": 10, + "workload": "static hit", + "medianNs": 61.30460026909792, + "runMediansNs": [ + 64.37939450783111, + 61.0105907100972, + 68.38706127280439, + 58.00329504153224, + 57.63094834995963 + ], + "runSpreadPct": 17.545360177915782 + }, + { + "router": "live", + "routes": 10, + "workload": "late param hit", + "medianNs": 123.34969411912593, + "runMediansNs": [ + 122.38804963713277, + 128.0914144216345, + 123.34969411912593, + 123.7314244346457, + 120.38980574723278 + ], + "runSpreadPct": 6.2437193131292545 + }, + { + "router": "live", + "routes": 10, + "workload": "method miss", + "medianNs": 313.1466402719157, + "runMediansNs": [ + 303.2242899357706, + 313.9719991533759, + 317.56752407436016, + 317.21930553248046, + 304.66317883085435 + ], + "runSpreadPct": 4.580357025748329 + }, + { + "router": "live", + "routes": 10, + "workload": "path miss", + "medianNs": 247.11204479036496, + "runMediansNs": [ + 243.83293094649235, + 245.96284525086344, + 256.5170994461101, + 251.67552547706458, + 239.70688265325708 + ], + "runSpreadPct": 6.802669941529469 + }, + { + "router": "live", + "routes": 100, + "workload": "static hit", + "medianNs": 67.60021073398198, + "runMediansNs": [ + 67.59110321481415, + 70.2978931323808, + 71.73192981624747, + 66.89479426858004, + 66.34634876291517 + ], + "runSpreadPct": 7.9668110422398755 + }, + { + "router": "live", + "routes": 100, + "workload": "late param hit", + "medianNs": 343.37426115431845, + "runMediansNs": [ + 339.69825708061, + 345.5384479064297, + 346.76095694086376, + 343.0270159639787, + 340.9864296333787 + ], + "runSpreadPct": 2.0568518550316317 + }, + { + "router": "live", + "routes": 100, + "workload": "method miss", + "medianNs": 1263.6666835417404, + "runMediansNs": [ + 1253.1647511493104, + 1236.53819239109, + 1280.9251293081375, + 1260.964247841236, + 1264.5863919404646 + ], + "runSpreadPct": 3.512551014848476 + }, + { + "router": "live", + "routes": 100, + "workload": "path miss", + "medianNs": 1463.3233888752757, + "runMediansNs": [ + 1444.5651269501377, + 1442.3613639121465, + 1489.193722473792, + 1467.5943002924523, + 1467.1470227885322 + ], + "runSpreadPct": 3.2004107169804197 + }, + { + "router": "live", + "routes": 500, + "workload": "static hit", + "medianNs": 67.80084393562457, + "runMediansNs": [ + 69.70410137869376, + 68.05743775265185, + 68.17806636218566, + 64.61896055628822, + 65.13818093212102 + ], + "runSpreadPct": 7.500114345529061 + }, + { + "router": "live", + "routes": 500, + "workload": "late param hit", + "medianNs": 1326.7912118667787, + "runMediansNs": [ + 1480.5802023688132, + 1262.011784068466, + 1309.8883800410117, + 1328.86404981808, + 1331.7959141129872 + ], + "runSpreadPct": 16.473459904277178 + }, + { + "router": "live", + "routes": 500, + "workload": "method miss", + "medianNs": 6732.158747300216, + "runMediansNs": [ + 7072.043204577969, + 6659.638999733972, + 6796.0313174946, + 6631.5197246491925, + 6699.584925975774 + ], + "runSpreadPct": 6.543569402688827 + }, + { + "router": "live", + "routes": 500, + "workload": "path miss", + "medianNs": 8973.42109375, + "runMediansNs": [ + 8915.33203125, + 8994.656043528954, + 9052.025139664804, + 8875.965250965251, + 8981.4453125 + ], + "runSpreadPct": 1.9620152320966877 + } + ], + "runs": [ + { + "run": 1, + "order": [ + "live" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 375298, + "samplesNs": [ + 64.58944891792656, + 66.46540349269114, + 65.23082990050573, + 65.89585875757398, + 63.92986373495196, + 63.378411289162216, + 65.08994185953563, + 63.90543781208533, + 63.93363673667326, + 63.652417545523825, + 64.37939450783111, + 64.07286209891872, + 63.93263753070893, + 64.5480391582156, + 64.4837569078439, + 64.57590501414876, + 64.99979216515942, + 63.773875693448936, + 63.78331352685066, + 64.26293238972762, + 64.96382075044365 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 206136, + "samplesNs": [ + 120.90419916948035, + 122.28294426980246, + 122.4864895020763, + 120.48821166608452, + 126.13618193813792, + 123.92526778437536, + 126.36681608258625, + 122.79514495284667, + 123.31644642372027, + 124.8166695773664, + 123.84258935848177, + 122.86184848837661, + 122.30295533046144, + 120.653355066558, + 121.59872608375053, + 122.18126867698994, + 119.35708464314821, + 122.38804963713277, + 122.65223929832732, + 118.23322951837622, + 120.30426999650716 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 81894, + "samplesNs": [ + 302.18890272791657, + 312.1652135687596, + 306.353847656727, + 298.91486555791636, + 302.8940825945735, + 305.71277505067525, + 299.73757540234936, + 298.3958898087772, + 303.2242899357706, + 295.97915598212325, + 303.56568246758, + 297.1753119886683, + 304.10906781937626, + 310.475529342809, + 308.7400664273329, + 308.2602632671502, + 302.42600190490145, + 306.0307714850905, + 302.51300461572276, + 300.45394045961854, + 308.0842308349818 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 101892, + "samplesNs": [ + 281.0001472146979, + 248.88158049699683, + 243.53727476151218, + 237.84046833902565, + 243.94538334707337, + 243.58961449377773, + 239.61196168492128, + 246.2807875004907, + 243.7634161661367, + 242.9488281710046, + 241.71835865426138, + 242.91814862795903, + 242.07290071840774, + 245.9973893926903, + 244.53342755074, + 243.83293094649235, + 243.98709417814942, + 246.85696619950537, + 244.7068072076316, + 241.58626781297843, + 245.4171279393868 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 356848, + "samplesNs": [ + 67.29791115544994, + 68.10042370981482, + 68.20597845581312, + 67.6924516881137, + 69.21294220508452, + 67.59110321481415, + 67.07944839259292, + 67.25284154598036, + 67.571955006053, + 67.11109211765233, + 67.77208503340358, + 67.91944189122539, + 67.02842106443079, + 67.01195747208895, + 67.91827332645832, + 67.25494328117294, + 67.15989721113752, + 67.60021073398198, + 65.86884892166972, + 69.15432901403399, + 68.42817950499932 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 63342, + "samplesNs": [ + 344.23316283034956, + 350.97565596286825, + 337.6301190363424, + 345.97567175018156, + 340.03702124972375, + 339.8903255344006, + 342.1577784092703, + 341.96768336964413, + 336.488822582173, + 338.02874869754663, + 335.0278488206877, + 342.20185658804587, + 336.93678759748667, + 337.26503741593257, + 337.11505793943985, + 342.9570269331565, + 339.69825708061, + 334.75946449433235, + 340.05741845852674, + 335.1087430141139, + 332.84458968772697 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 20012, + "samplesNs": [ + 1241.7341095342795, + 1225.847841295223, + 1283.8734259444334, + 1242.5794523286029, + 1240.5202878273037, + 1246.0086448131121, + 1225.2898261043374, + 1233.3308514891066, + 1253.1647511493104, + 1254.9324905056965, + 1258.7884769138516, + 1244.282580451729, + 1290.54647211673, + 1263.9624725164902, + 1256.2337597441535, + 1258.8946632020788, + 1257.3268538876673, + 1252.4131521087347, + 1277.0962422546472, + 1263.7813312012793, + 1249.727263641815 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16345, + "samplesNs": [ + 1451.3816457632304, + 1433.292505353319, + 1443.8130926888957, + 1439.3086570816763, + 1440.8330988069747, + 1434.3836035484858, + 1439.9306821658, + 1468.1145916182318, + 1442.5104925053533, + 1444.5651269501377, + 1462.496176200673, + 1438.0417252982563, + 1465.6011012542062, + 1453.074334658917, + 1423.3328234934231, + 1458.835546038544, + 1454.710920770878, + 1457.8234934230652, + 1456.737534414194, + 1454.9250535331905, + 1433.310370143775 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 340032, + "samplesNs": [ + 68.24737671748541, + 69.86965050348202, + 67.53788466967815, + 70.6581792301901, + 69.92797736683606, + 69.76365459721438, + 70.93057712215321, + 68.99705910031997, + 70.18420325145868, + 68.51622200263505, + 69.51576028138528, + 68.67209262657632, + 73.13429324298889, + 68.9166754893657, + 70.84186194240542, + 69.5217655985319, + 72.03684947299078, + 69.33085121400339, + 69.70410137869376, + 68.28009422642575, + 72.29209309712027 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 12749, + "samplesNs": [ + 1480.5802023688132, + 1482.6947211546003, + 1517.7791983684995, + 1434.8380265118833, + 1477.7401364812927, + 1462.6703270844773, + 1418.1374225429445, + 1432.1711506784845, + 1449.221507569221, + 1492.0254921954663, + 1483.2535885167465, + 1406.142991607185, + 1448.7280571025178, + 1468.9681543650483, + 1469.7361361675426, + 1523.5246686014589, + 1521.511491097341, + 1513.501058906581, + 1516.9457996705623, + 1511.1316181661307, + 1526.998901874657 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3495, + "samplesNs": [ + 6952.12217453505, + 7301.359084406295, + 6967.549070100143, + 7145.684120171673, + 7188.567095851216, + 7044.7662374821175, + 7003.755364806867, + 7089.592274678112, + 7148.390557939914, + 7101.812017167382, + 7137.183977110158, + 7166.296995708154, + 7072.043204577969, + 7086.766809728183, + 7091.92904148784, + 6834.227467811159, + 7067.918454935622, + 6889.484978540772, + 6764.031759656652, + 6746.56652360515, + 6789.568526466381 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2560, + "samplesNs": [ + 8975.227734375, + 8915.33203125, + 9153.125, + 9112.6953125, + 9085.188671875, + 8822.640234375, + 8874.0234375, + 8859.537890625, + 9090.0390625, + 8968.701171875, + 8995.13359375, + 8851.790625, + 8906.689453125, + 8899.93515625, + 8858.137890625, + 8773.388671875, + 8989.16015625, + 8738.85078125, + 8973.42109375, + 8715.4296875, + 9061.246484375 + ] + } + ] + }, + { + "run": 2, + "order": [ + "live" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 398368, + "samplesNs": [ + 62.12607940396819, + 66.19204353763355, + 64.76214706000482, + 61.0105907100972, + 61.67894258574986, + 61.86250150614507, + 61.30460026909792, + 60.97523897501807, + 62.284432986585266, + 61.82976544300747, + 61.17333721584063, + 60.531867519479476, + 60.21275052213029, + 59.95534530886015, + 60.25647140332557, + 59.82523194634107, + 60.512413145634184, + 61.17448690657884, + 60.1492639971082, + 60.865102116635875, + 59.80902080488393 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 194652, + "samplesNs": [ + 131.7141205844276, + 131.92946386371577, + 130.19816904013317, + 128.5443560816226, + 128.0914144216345, + 128.63426525286152, + 127.74977909294536, + 126.84495920925549, + 128.50583091876786, + 126.44039105686045, + 127.9574163121879, + 128.14128804224976, + 129.00800916507407, + 127.81999157470769, + 127.7328668598319, + 127.7553428682983, + 128.52851755954217, + 127.37282432238045, + 128.2733647740583, + 127.26408667776339, + 127.1551281260917 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 80319, + "samplesNs": [ + 304.74525330245643, + 317.0295944919633, + 311.6738754217557, + 303.74817913569643, + 304.9859560004482, + 309.09456044024455, + 313.9719991533759, + 308.8906858900136, + 306.6335487244612, + 306.21593894346296, + 305.2012475254921, + 320.4560315740983, + 320.392235959113, + 315.89869146777227, + 317.1686151471009, + 317.3631643820267, + 317.48195321156885, + 321.29020530634097, + 317.7454898591865, + 314.040999016422, + 313.1466402719157 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 101629, + "samplesNs": [ + 283.33406803176257, + 250.90607995749244, + 243.12040854480512, + 246.96486239164017, + 248.4240128309833, + 243.0142085428372, + 247.32851843469876, + 243.2729142272383, + 245.11252693620915, + 245.96284525086344, + 243.98506331854097, + 242.78380186757718, + 242.16677326353698, + 245.93824597309822, + 245.97146483779235, + 247.11204479036496, + 245.26463903019808, + 248.34856192622183, + 247.7241535388521, + 244.35856891241673, + 257.1395271034842 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 350995, + "samplesNs": [ + 70.56142680095158, + 70.69355119018789, + 70.88989871650594, + 69.68428040285474, + 70.1206569894158, + 72.96625877861509, + 71.23997492841778, + 69.35058334164304, + 69.5693670850012, + 70.31795324719725, + 69.69887890140885, + 70.14190515534409, + 69.22178378609382, + 70.5325802361857, + 70.93263436801094, + 69.66457356942406, + 69.90769099274918, + 70.2978931323808, + 70.63502898901693, + 70.1838117352099, + 70.40769811535777 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 62071, + "samplesNs": [ + 346.0982906671392, + 343.7998421162862, + 341.2651157545392, + 359.57746773855746, + 354.59929757857935, + 348.0389392792125, + 339.6694913888934, + 350.87978282934057, + 345.5384479064297, + 343.0057192569799, + 347.79795717807025, + 343.9273896022297, + 345.9975834125437, + 347.40458507193375, + 343.6159237002787, + 345.37867925440224, + 346.9380548082035, + 343.7582284802887, + 337.8288572763448, + 345.9197209647017, + 339.5137664932094 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 20292, + "samplesNs": [ + 1226.1400059136606, + 1235.2815395229647, + 1233.6368026808595, + 1214.249063670412, + 1226.9531342400946, + 1235.2630593337276, + 1252.203232801104, + 1236.53819239109, + 1246.6119653065248, + 1229.2488172678889, + 1265.7307806031934, + 1266.6937709442145, + 1243.0699290360733, + 1239.02478809383, + 1264.2482259018332, + 1264.215405085748, + 1219.1463138182535, + 1226.6102404888627, + 1235.297999211512, + 1247.3901537551744, + 1241.2629607727183 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16482, + "samplesNs": [ + 1450.049023176799, + 1450.8124620798446, + 1432.9773692513045, + 1421.6771629656596, + 1446.3353961897828, + 1430.381143065162, + 1453.1610241475548, + 1440.7585851231647, + 1435.9401771629657, + 1442.3613639121465, + 1415.7414148768353, + 1432.9799174857421, + 1438.842373498362, + 1439.310035189904, + 1430.2091979128747, + 1442.4396917849776, + 1448.4816769809488, + 1447.4679650527848, + 1445.114367188448, + 1451.0121951219512, + 1481.0576386360879 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 346079, + "samplesNs": [ + 69.20204635357823, + 68.2458600492951, + 68.31906009899474, + 68.78114245591324, + 67.7663192508069, + 67.74428670910399, + 67.51336544546187, + 68.39683713834124, + 68.4595627010018, + 68.0863328893114, + 68.17554662374776, + 68.05129753611169, + 68.49580009188654, + 67.87937147298739, + 68.05743775265185, + 67.76692026964942, + 67.6034229178887, + 69.1048864565605, + 67.54816096902731, + 67.99724051444902, + 67.99447236035702 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 15190, + "samplesNs": [ + 1302.666227781435, + 1293.707504937459, + 1278.6152732060566, + 1295.4876892692562, + 1295.328637261356, + 1298.2608953258723, + 1312.837393021725, + 1289.9165898617512, + 1275.3620803159974, + 1257.587228439763, + 1246.9058591178407, + 1252.6635286372614, + 1244.4810401579987, + 1256.207504937459, + 1251.988676761027, + 1262.011784068466, + 1248.4392363396971, + 1264.9907175773535, + 1235.0148123765634, + 1241.9107965766952, + 1260.5030941408822 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3759, + "samplesNs": [ + 6670.978451715882, + 6720.448789571695, + 6612.341580207502, + 6632.515296621442, + 6691.374035647778, + 6609.714285714285, + 6594.0518754988025, + 6573.944932162809, + 6700.053205639798, + 6671.377760042565, + 6653.021548284118, + 6568.280659749934, + 6694.023144453312, + 6934.823091247672, + 6615.278797552541, + 6771.06065442937, + 6659.638999733972, + 6656.923383878691, + 6737.363660548018, + 6714.174780526736, + 6634.299813780261 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2573, + "samplesNs": [ + 9226.535172949863, + 8976.033035367276, + 9008.793237465992, + 8906.99883404586, + 9017.06840264283, + 8886.643606684804, + 8990.52662261951, + 8892.894286824718, + 9043.253789350953, + 9073.277108433735, + 8930.93315196269, + 8999.595025262339, + 8861.44578313253, + 8994.656043528954, + 8937.248736883015, + 9023.8371550719, + 9104.320637388262, + 9006.089001165954, + 8999.611348620288, + 8983.692965410028, + 8923.322580645161 + ] + } + ] + }, + { + "run": 3, + "order": [ + "live" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 360731, + "samplesNs": [ + 67.06497639515318, + 69.87813079552353, + 69.35327155137762, + 68.44550925759084, + 67.92122384824148, + 68.03003345983572, + 68.41848080702795, + 67.87190454937335, + 67.85007387776487, + 68.38706127280439, + 67.98336710734591, + 67.81958024123239, + 68.33080882984828, + 68.40970141185537, + 67.93335477128386, + 67.10101710138579, + 74.07112224898886, + 69.39646994574905, + 68.58145820569898, + 70.38543679362184, + 70.18064430281845 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 190924, + "samplesNs": [ + 130.8753744945633, + 132.83535857199723, + 124.2540696821772, + 123.33529048207664, + 126.33277115501456, + 124.99498229662065, + 123.14389495296558, + 124.50154511742892, + 123.52646602836731, + 123.80821164442396, + 123.43546123064675, + 123.34969411912593, + 123.25715991703505, + 123.29447843120823, + 123.15633445768997, + 121.11908927112358, + 122.44531855607467, + 122.53457396660451, + 122.20002199828204, + 122.81631958266117, + 123.36584190567974 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 77676, + "samplesNs": [ + 323.9664246356661, + 320.36654822596427, + 316.29514908079716, + 313.5245506977702, + 314.5405273186055, + 312.343902878624, + 309.21015500283227, + 313.18232143776714, + 319.91917709459807, + 323.65692105669706, + 326.92315515732014, + 321.73332818373757, + 317.92155878263554, + 317.56752407436016, + 318.2804212369329, + 316.9549410371286, + 314.5877362377053, + 317.1936376744426, + 318.09589834697977, + 316.2801251351769, + 322.2187934497142 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 98395, + "samplesNs": [ + 294.34591188576655, + 259.4267188373393, + 256.5170994461101, + 253.23060114843233, + 251.039178820062, + 264.7657401290716, + 258.2211189592967, + 255.92468113217134, + 258.0174297474465, + 259.44873215102393, + 259.32974236495755, + 255.83404644544947, + 251.77219370902992, + 252.52723207480054, + 252.45015498755018, + 253.6803191219066, + 256.2431119467453, + 266.0983789826719, + 261.38269220997, + 255.63586564357945, + 259.73372630723105 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 337628, + "samplesNs": [ + 71.66812882817776, + 71.73192981624747, + 71.95666236212637, + 71.15980013505988, + 71.29543165851173, + 71.64554480078667, + 70.48845178717404, + 71.08995107040886, + 70.96098664802682, + 71.12142357861315, + 71.86373168102172, + 71.90939436302676, + 72.05834824125961, + 72.41981707678273, + 70.5926108024216, + 72.21594476761406, + 72.23581574987857, + 71.12549610814268, + 71.76981766915067, + 71.95912957456135, + 71.81967431611122 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 62449, + "samplesNs": [ + 344.5945171259748, + 349.1422280580954, + 343.7505004083332, + 345.35380870790567, + 346.32794760524587, + 349.4544828580121, + 344.13814472609647, + 346.42268090762065, + 349.7513971400663, + 344.66790501048854, + 350.2744959887268, + 348.6811798427517, + 346.76095694086376, + 347.1219234895675, + 343.7144710083428, + 346.42802927188586, + 353.0614421367836, + 360.9712245192077, + 357.31156623805026, + 347.10656695863827, + 344.38769235696327 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19527, + "samplesNs": [ + 1271.2334203922774, + 1268.156501254673, + 1265.809289701439, + 1280.8739181645926, + 1271.5449377784605, + 1272.9105853433707, + 1267.5056588313616, + 1292.808265478568, + 1307.3543299021867, + 1308.2441235212782, + 1300.9230808623956, + 1290.4994622829927, + 1283.707584370359, + 1299.3675423772213, + 1280.9251293081375, + 1271.0221744251548, + 1291.8203000973012, + 1280.3405028934296, + 1271.2824806677934, + 1298.6441849746504, + 1291.402109899114 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16121, + "samplesNs": [ + 1484.9032318094412, + 1474.2959493827927, + 1505.6913342844737, + 1494.9651386390422, + 1491.036536195025, + 1481.9955337758204, + 1497.5523850877737, + 1485.7794181502388, + 1480.9926803548167, + 1503.9777309099932, + 1494.2259785373117, + 1489.1058247007009, + 1482.1040878357421, + 1487.4697599404503, + 1489.5477948018113, + 1489.193722473792, + 1488.7284907884127, + 1531.1576204950065, + 1515.9341852242417, + 1503.1066931331802, + 1469.3619502512252 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 345287, + "samplesNs": [ + 68.08852635633545, + 67.96278747824273, + 67.80434247452119, + 68.49181405613301, + 67.57494490090852, + 67.29727733740337, + 67.99331570548559, + 68.0220367404507, + 72.2208394755667, + 68.17806636218566, + 68.54804843506996, + 68.40408703484349, + 68.44547579260151, + 68.97462400843357, + 67.80084393562457, + 67.71975197444445, + 68.4015529110566, + 69.01625893821661, + 67.98571333412495, + 68.43280806980859, + 68.32866571866303 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14630, + "samplesNs": [ + 1306.4764183185237, + 1318.030895420369, + 1310.5975393028025, + 1344.6656869446342, + 1305.1976760082023, + 1305.624880382775, + 1303.9644565960355, + 1311.001982228298, + 1296.9184552289817, + 1320.052973342447, + 1308.2507177033492, + 1311.9844839371156, + 1294.2156527682844, + 1327.5946001367054, + 1309.8883800410117, + 1315.7183185235817, + 1301.4695830485305, + 1294.0248120300753, + 1312.5057416267944, + 1314.5477101845522, + 1293.4552289815447 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3704, + "samplesNs": [ + 6786.345842332614, + 6746.625269978402, + 6751.484881209503, + 6767.717332613391, + 6814.142548596113, + 6756.9406047516195, + 6757.502969762419, + 6719.683855291577, + 6732.158747300216, + 6703.102591792656, + 6899.433045356372, + 7024.343142548596, + 6996.0067494600435, + 7080.32964362851, + 6971.821004319654, + 6987.367440604751, + 6936.960043196545, + 6882.019438444924, + 6798.697354211663, + 6767.908747300216, + 6796.0313174946 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2506, + "samplesNs": [ + 8993.083000798084, + 8943.335993615323, + 8936.685155626496, + 9005.918994413409, + 9005.087789305666, + 9052.025139664804, + 9098.580207501995, + 9208.30007980846, + 8923.65003990423, + 9063.730247406225, + 9065.409816440542, + 9007.648044692738, + 9033.935355147645, + 9108.090582601755, + 9041.400638467678, + 9106.544293695131, + 9150.738228252194, + 9065.509577015164, + 9090.183559457302, + 8947.709098164405, + 9118.814844373504 + ] + } + ] + }, + { + "run": 4, + "order": [ + "live" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 421239, + "samplesNs": [ + 59.026369828054854, + 61.50803463117138, + 61.72703144770546, + 57.81268590989913, + 57.670942149231195, + 58.13554537922652, + 59.53557956409544, + 58.99926644968771, + 57.89171942768832, + 57.970456201823666, + 58.1503801879693, + 57.776485558079855, + 57.316926970199816, + 57.59893314721571, + 57.18675383808242, + 57.451745920961734, + 57.96461866066532, + 58.4368375197928, + 58.39410643363981, + 58.00329504153224, + 58.37185065960179 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 197531, + "samplesNs": [ + 127.77276984372074, + 127.82888255514324, + 124.08895818884125, + 123.57153054457275, + 123.95986959008965, + 124.57453766750535, + 124.39270798001327, + 123.75441829383742, + 123.20091529937073, + 124.53614875639774, + 124.08558656615924, + 123.03427816393376, + 122.58961884463704, + 123.7314244346457, + 122.65943573413793, + 122.75077329634335, + 122.06058795834578, + 122.95960127777413, + 123.13278422121085, + 122.97162470700802, + 124.17797712764073 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 78247, + "samplesNs": [ + 316.11275831661277, + 325.22439198946927, + 317.1085409025266, + 315.096744923128, + 314.2979922552941, + 317.57979219650593, + 326.39590016230653, + 320.01067133564226, + 317.2437920942656, + 317.84179585159814, + 316.2522780426087, + 322.41811187649364, + 318.29335309979933, + 316.93866857515303, + 318.208685317009, + 313.99978273927434, + 314.95776195892495, + 316.236302989252, + 317.21930553248046, + 318.0942016946337, + 316.0429920635935 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 99148, + "samplesNs": [ + 293.5220579335942, + 260.85372372614677, + 252.5941925202727, + 252.45298947028684, + 251.67552547706458, + 251.01447331262355, + 253.1283132287086, + 251.39690160164602, + 249.3633255335458, + 247.1969479969339, + 248.8812986646226, + 251.99701456408602, + 250.64214104167507, + 251.1187013353774, + 254.21298462903943, + 256.68445152701014, + 255.94146124984871, + 251.6923286400129, + 250.87957397022632, + 250.56817081534675, + 250.45260620486545 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 367518, + "samplesNs": [ + 67.05884609733401, + 67.14274402886389, + 67.13424104397608, + 67.67083516997806, + 66.99105077846528, + 67.37833248983723, + 67.3859293966554, + 66.54265913506278, + 66.60580978346638, + 66.54946152297302, + 66.22827453349224, + 66.5622717798856, + 66.22226666448991, + 66.46613227107244, + 67.01928068829282, + 66.89479426858004, + 66.43710784233697, + 67.14319570742113, + 66.25877371992664, + 66.65455841618642, + 67.11598615578012 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 61075, + "samplesNs": [ + 343.05907490790014, + 348.2691936144085, + 343.51616864510845, + 343.0270159639787, + 343.66898076135897, + 344.497896029472, + 342.1469504707327, + 346.03083094555876, + 340.2319443307409, + 342.1981170691772, + 342.9621940237413, + 341.30303724928365, + 342.9772247237004, + 345.10437986082684, + 338.65876381498157, + 341.7976586164552, + 344.0790012279984, + 343.37426115431845, + 341.19456406058123, + 343.6532951289398, + 342.4007367990176 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19803, + "samplesNs": [ + 1254.6793920113114, + 1255.4200373680756, + 1255.0960460536282, + 1249.0847346361663, + 1252.3712568802707, + 1302.5593596929757, + 1268.6651012472857, + 1269.92541534111, + 1270.028531030652, + 1264.2970762005757, + 1265.4921981517953, + 1266.5105287077715, + 1266.7377670049993, + 1258.874917941726, + 1260.964247841236, + 1268.0275715800635, + 1247.8454274604858, + 1250.1430591324547, + 1263.7226682825835, + 1256.8002827854366, + 1258.6350552946524 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16071, + "samplesNs": [ + 1471.5403521871694, + 1462.536058739344, + 1457.926264700392, + 1477.2597847053698, + 1452.7928566984008, + 1459.116358658453, + 1478.6883205774377, + 1475.2918922282372, + 1461.931927073611, + 1468.46288345467, + 1467.985812955012, + 1446.6689689502832, + 1463.6872005475702, + 1458.4422251260034, + 1452.901748491071, + 1505.071246344347, + 1468.1932673760189, + 1467.5943002924523, + 1469.7617447576379, + 1467.3920726774936, + 1468.6106651732935 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 367004, + "samplesNs": [ + 64.78040021362165, + 64.52926943575547, + 64.66142058397183, + 64.42936044293795, + 64.9927085263376, + 66.0728493422415, + 65.32785201251212, + 64.90892197360247, + 64.92538228466175, + 64.02132674303277, + 64.49952316596004, + 64.19707414633083, + 64.26485542391909, + 64.44412050004905, + 64.76166744776624, + 64.66153502414143, + 64.59568560560648, + 64.9843053481706, + 64.55504027204063, + 64.61896055628822, + 64.32809179191507 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14292, + "samplesNs": [ + 1332.4091799608173, + 1322.7708508256367, + 1333.9951021550519, + 1319.8904981808005, + 1336.1146095717884, + 1319.08879093199, + 1325.7708508256367, + 1331.954380072768, + 1326.7912118667787, + 1340.359431849986, + 1342.452700811643, + 1323.0449202350965, + 1330.9631262244613, + 1335.578155611531, + 1311.908130422614, + 1328.86404981808, + 1326.8991043940666, + 1315.835222502099, + 1336.1116708648194, + 1336.788063252169, + 1325.2198432689618 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3777, + "samplesNs": [ + 6635.0608948901245, + 6661.912099549907, + 6581.590415673815, + 6631.5197246491925, + 6592.489541964522, + 6618.535610272703, + 6563.564469155414, + 6575.136881122584, + 6573.791104050834, + 6893.378872120731, + 6687.075191951284, + 6658.6687847498015, + 6555.246491924808, + 6622.992057188245, + 6804.761186126556, + 6586.455387873974, + 6620.962404024358, + 6754.324596240403, + 6650.240402435796, + 6729.139263966111, + 6658.558379666402 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2590, + "samplesNs": [ + 8810.10308880309, + 8928.104633204634, + 8875.965250965251, + 8801.769498069498, + 8869.530501930501, + 8947.377606177606, + 8798.745173745174, + 8830.099613899614, + 8903.137065637065, + 8811.759845559845, + 8921.380308880309, + 8949.469111969112, + 8867.374517374517, + 8882.255598455598, + 8905.630888030888, + 8875.788416988416, + 8835.03861003861, + 8902.686486486486, + 8859.700772200773, + 9378.49111969112, + 9133.429729729729 + ] + } + ] + }, + { + "run": 5, + "order": [ + "live" + ], + "label": "live", + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": 422323, + "samplesNs": [ + 58.24767535748704, + 61.8334000279407, + 61.18519711216297, + 57.803605297367184, + 57.471217527816385, + 57.658967188621034, + 57.42020917638869, + 57.4973610246186, + 57.68126528746954, + 57.63094834995963, + 57.562479429252015, + 57.662125908368715, + 57.55488097972405, + 57.50762094415885, + 57.653442980846414, + 57.773116785019994, + 57.506439384073325, + 57.55251312384123, + 57.37374000468836, + 57.53129950298705, + 57.72655053122847 + ] + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": 205351, + "samplesNs": [ + 125.14994326786818, + 125.29015685338761, + 121.9613004075948, + 121.38809160900118, + 121.38282258182332, + 120.9952715107304, + 119.57839017097555, + 119.65001387867602, + 119.2407585061675, + 118.83738087469747, + 119.6504180646795, + 120.67042283699617, + 120.26522393365507, + 119.91176083875901, + 120.38980574723278, + 119.83709356175524, + 124.90077964071273, + 123.85176600065255, + 122.36162960005065, + 120.14632020296955, + 120.03411232475128 + ] + }, + { + "routes": 10, + "workload": "method miss", + "iterations": 80948, + "samplesNs": [ + 304.41506893314227, + 309.317907792657, + 303.82724712160893, + 314.3000197657756, + 306.99698571922715, + 304.5056703068637, + 307.20236448090134, + 308.7527425013589, + 303.5878959331917, + 304.0856475762218, + 305.160411622276, + 304.1088105944557, + 302.39731679596775, + 305.63397489746507, + 307.10713050353314, + 304.66317883085435, + 301.0981247220438, + 306.12862578445424, + 304.7826011760636, + 304.60604338587734, + 301.48006127390425 + ] + }, + { + "routes": 10, + "workload": "path miss", + "iterations": 104204, + "samplesNs": [ + 284.2977045027062, + 247.01946182488197, + 239.87482246362904, + 239.70688265325708, + 238.47733292388008, + 239.47816782465165, + 238.9059728993129, + 239.92041572300488, + 239.07551533530383, + 239.13989866032014, + 238.88798894476218, + 239.36221258301026, + 246.96068289125176, + 244.69350504779086, + 240.8568768953207, + 239.28783923841695, + 241.4510671375379, + 242.8629515181759, + 238.4193505047791, + 239.61092664389082, + 242.4826974012514 + ] + }, + { + "routes": 100, + "workload": "static hit", + "iterations": 371559, + "samplesNs": [ + 66.62389553206893, + 66.49302802515886, + 66.73693276168791, + 66.5175894003375, + 66.49583242499845, + 66.43662244757898, + 66.21021156801477, + 65.87704509916325, + 66.32414502138288, + 66.3186492589333, + 67.04240510928278, + 66.87329603104756, + 66.56165777171324, + 66.71159089135239, + 65.48029249728845, + 66.34634876291517, + 65.87345482144154, + 65.74382264996946, + 66.04738413011124, + 66.26605734217176, + 66.06375568886772 + ] + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": 63226, + "samplesNs": [ + 343.6363205010597, + 339.47992914307406, + 342.7947679752001, + 339.8562300319489, + 342.54302027646855, + 338.9474583241072, + 339.04431721127384, + 339.00808211811596, + 341.5802043463132, + 340.250972701104, + 338.4518710657008, + 338.78270015499953, + 337.5826400531427, + 344.0047132508778, + 342.3993610223642, + 344.348717299845, + 341.07539619776674, + 340.9864296333787, + 339.03773763957867, + 343.63236643153135, + 342.85077341599975 + ] + }, + { + "routes": 100, + "workload": "method miss", + "iterations": 19753, + "samplesNs": [ + 1272.9986331190198, + 1273.8951045410824, + 1338.1490912772742, + 1270.1931352199665, + 1297.3999898749557, + 1295.5584468182049, + 1297.7796284108742, + 1285.874297575052, + 1289.2809193540222, + 1264.2931706576217, + 1261.8905988963702, + 1263.6666835417404, + 1249.2026527616058, + 1260.6608110160482, + 1261.6100339188984, + 1277.8017010074418, + 1247.7408494912165, + 1261.8083329114565, + 1264.5863919404646, + 1261.13122057409, + 1260.1777957778565 + ] + }, + { + "routes": 100, + "workload": "path miss", + "iterations": 16324, + "samplesNs": [ + 1458.4303479539328, + 1462.5091889242833, + 1465.4854202401373, + 1476.494241607449, + 1474.750857632933, + 1469.7275790247488, + 1474.5262190639548, + 1467.03730703259, + 1469.2783631462876, + 1454.356591521686, + 1450.9362901249694, + 1463.3233888752757, + 1498.374050477824, + 1484.6059789267335, + 1474.0361431021809, + 1456.732908600833, + 1471.0956873315363, + 1465.9780078412155, + 1467.1470227885322, + 1472.2698480764518, + 1466.1847586375889 + ] + }, + { + "routes": 500, + "workload": "static hit", + "iterations": 365253, + "samplesNs": [ + 64.82333341546818, + 64.5192044966092, + 64.95018521408448, + 64.9999206029793, + 66.81829854922478, + 67.41320399832445, + 66.23742173233347, + 64.75682609040857, + 65.13818093212102, + 65.14217542361048, + 64.78557328755684, + 64.88732741414854, + 64.43935299641618, + 64.94345289429519, + 65.82001790539708, + 65.2186046384287, + 65.51828458630045, + 65.3639395158972, + 65.4943285886769, + 65.40797200844347, + 64.59826202659526 + ] + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": 14391, + "samplesNs": [ + 1338.9531651726775, + 1326.2455701480092, + 1336.4226947397678, + 1330.3077617955666, + 1346.5881453686331, + 1354.6111458550483, + 1334.361197970954, + 1329.2596066986312, + 1330.4119241192411, + 1320.159544159544, + 1328.7008547008547, + 1335.5367243416024, + 1344.5874504898895, + 1329.2682926829268, + 1328.4518101591273, + 1331.7959141129872, + 1334.6767424084496, + 1325.492808005003, + 1332.015982211104, + 1316.1495379056355, + 1340.0215412410535 + ] + }, + { + "routes": 500, + "workload": "method miss", + "iterations": 3715, + "samplesNs": [ + 6703.521668909825, + 6699.584925975774, + 6713.9636608344545, + 6650.235531628533, + 6667.54131897712, + 6920.491251682369, + 6839.995693135936, + 6757.3014804845225, + 6692.283445491252, + 6699.416689098251, + 6701.816958277254, + 6640.309555854643, + 6683.591117092867, + 6750.089636608344, + 6737.494212651413, + 6650.291790040377, + 6761.518438761776, + 6674.719515477793, + 6764.782503364738, + 6692.990040376851, + 6670.323014804845 + ] + }, + { + "routes": 500, + "workload": "path miss", + "iterations": 2560, + "samplesNs": [ + 8998.81171875, + 9004.801171875, + 9001.708984375, + 8960.791015625, + 8925.537109375, + 8981.4453125, + 9066.78046875, + 8970.475390625, + 8911.97890625, + 8999.31640625, + 8940.185546875, + 8969.482421875, + 8971.158984375, + 8914.664453125, + 8940.934375, + 9335.855859375, + 9094.3359375, + 9109.391015625, + 9032.601171875, + 8967.741015625, + 9243.37578125 + ] + } + ] + } + ] +} diff --git a/bench/baseline/router-ed47836/battery-run/lookup-summary.txt b/bench/baseline/router-ed47836/battery-run/lookup-summary.txt new file mode 100644 index 0000000..43fba26 --- /dev/null +++ b/bench/baseline/router-ed47836/battery-run/lookup-summary.txt @@ -0,0 +1,21 @@ + +> @green-tea/core@26.9.0-beta.2 bench:lookup +> tsx bench/lookup.ts + +| router | routes | workload | median ns/op | run medians (ns) | run spread | +| --- | --- | --- | --- | --- | --- | +| live | 10 | static hit | 61.3 | 64.4 / 61.0 / 68.4 / 58.0 / 57.6 | 17.5% | +| live | 10 | late param hit | 123.3 | 122.4 / 128.1 / 123.3 / 123.7 / 120.4 | 6.2% | +| live | 10 | method miss | 313.1 | 303.2 / 314.0 / 317.6 / 317.2 / 304.7 | 4.6% | +| live | 10 | path miss | 247.1 | 243.8 / 246.0 / 256.5 / 251.7 / 239.7 | 6.8% | +| live | 100 | static hit | 67.6 | 67.6 / 70.3 / 71.7 / 66.9 / 66.3 | 8.0% | +| live | 100 | late param hit | 343.4 | 339.7 / 345.5 / 346.8 / 343.0 / 341.0 | 2.1% | +| live | 100 | method miss | 1263.7 | 1253.2 / 1236.5 / 1280.9 / 1261.0 / 1264.6 | 3.5% | +| live | 100 | path miss | 1463.3 | 1444.6 / 1442.4 / 1489.2 / 1467.6 / 1467.1 | 3.2% | +| live | 500 | static hit | 67.8 | 69.7 / 68.1 / 68.2 / 64.6 / 65.1 | 7.5% | +| live | 500 | late param hit | 1326.8 | 1480.6 / 1262.0 / 1309.9 / 1328.9 / 1331.8 | 16.5% | +| live | 500 | method miss | 6732.2 | 7072.0 / 6659.6 / 6796.0 / 6631.5 / 6699.6 | 6.5% | +| live | 500 | path miss | 8973.4 | 8915.3 / 8994.7 / 9052.0 / 8876.0 / 8981.4 | 2.0% | + +load average: start 2.47 2.14 6.86, end 2.58 2.21 6.64 +raw samples: bench/baseline/router-ed47836/lookup-raw.json diff --git a/bench/baseline/router-ed47836/load.txt b/bench/baseline/router-ed47836/load.txt new file mode 100644 index 0000000..cdecbca --- /dev/null +++ b/bench/baseline/router-ed47836/load.txt @@ -0,0 +1,3 @@ +before: 2026-10-10T22:42:38Z 17:42:38 up 44 days, 17:31, 2 users, load average: 0.27, 0.11, 0.04 +ci job containers: 0 +after: 2026-10-10T22:43:54Z 17:43:54 up 44 days, 17:32, 2 users, load average: 0.79, 0.31, 0.12 diff --git a/bench/baseline/router-ed47836/lookup-raw.json b/bench/baseline/router-ed47836/lookup-raw.json new file mode 100644 index 0000000..adeece5 --- /dev/null +++ b/bench/baseline/router-ed47836/lookup-raw.json @@ -0,0 +1,7412 @@ +{ + "meta": { + "startedAt": "2026-10-10T22:42:39.099Z", + "hostname": "8917652cef35", + "node": "v22.23.1", + "v8": "12.4.254.21-node.56", + "platform": "linux 6.8.0-138-generic x64", + "cpu": "AMD Ryzen 7 3700X 8-Core Processor", + "cpus": 16, + "cpuset": "6-7,14-15", + "memoryBytes": 67332521984, + "loadavgAtStart": [ + 0.27, + 0.11, + 0.04 + ], + "package": "@green-tea/core@26.9.0-beta.2", + "harnessCommit": "ee7fdec5416008653dbd21ee338c6146d2b2c9cf", + "routers": [ + { + "label": "live", + "path": "src/http/router.ts" + }, + { + "label": "oracle", + "path": "test/router-parity/oracle.ts" + } + ], + "env": { + "LOOKUP_DOCKER": "Docker version 29.1.3, build f52814d", + "LOOKUP_OUT": "out/lookup-raw.json", + "LOOKUP_ROUTERS": "live=src/http/router.ts,oracle=test/router-parity/oracle.ts", + "LOOKUP_KERNEL": "6.8.0-138-generic", + "LOOKUP_COMMIT": "ee7fdec5416008653dbd21ee338c6146d2b2c9cf", + "LOOKUP_CPUSET": "6,7,14,15", + "LOOKUP_HOST": "jarvis" + }, + "method": { + "routeCounts": [ + 10, + 100, + 500 + ], + "routeCountMeaning": "total registered HTTP routes", + "routeGenerator": "N total HTTP routes: N-2 fillers (i = 0..N-3, shape FILLER[i % 5] with k = floor(i / 5): GET /res{k}/items, POST /res{k}/items, GET /res{k}/items/:id, PUT /res{k}/items/:id(\\d+), GET /res{k}/files/:path*), then GET /static/target/leaf, then GET /late/:group/:id declared last. All buffer transport.", + "workloads": [ + { + "name": "static hit", + "method": "GET", + "path": "/static/target/leaf", + "expect": "hit /static/target/leaf" + }, + { + "name": "late param hit", + "method": "GET", + "path": "/late/g1/42", + "expect": "hit /late/:group/:id" + }, + { + "name": "method miss", + "method": "DELETE", + "path": "/static/target/leaf", + "expect": "allow GET,HEAD,OPTIONS" + }, + { + "name": "path miss", + "method": "GET", + "path": "/nowhere/at/all", + "expect": "allow " + } + ], + "workloadOrder": "for each run (fresh process; module import order reversed on even-numbered runs): for count in routeCounts: for workload in workloads: warm every router, then ROUNDS rounds of one sample per router, order alternating AB/BA per round", + "operation": "resolveRoute(routes, method, path); on undefined, allowedMethods(routes, path)", + "runs": 4, + "roundsPerCellPerRun": 21, + "sampleMs": 25, + "warmupMsPerRouterPerCell": 250, + "ratio": "per round, sample(B) / sample(A) with A the first router; median over all rounds of all runs", + "ci": "percentile bootstrap of the median ratio, 4000 resamples, seed 10908", + "unit": "ns per lookup (sample time / iterations)" + }, + "loadavgAtEnd": [ + 0.79, + 0.31, + 0.12 + ] + }, + "summary": [ + { + "routes": 10, + "workload": "static hit", + "routers": [ + { + "router": "live", + "medianNs": 185.34640769623525, + "runMediansNs": [ + 156.10234942718975, + 187.6950273850669, + 174.11010468483184, + 194.17008891099573 + ], + "runSpreadPct": 20.53869829848297 + }, + { + "router": "oracle", + "medianNs": 176.75196566266067, + "runMediansNs": [ + 199.85068919146076, + 161.9226928619269, + 194.9699198559497, + 162.4811125520819 + ], + "runSpreadPct": 21.45831656657285 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 0.9507128575712667, + "ci95": [ + 0.8628999342509374, + 1.1185762140106583 + ], + "rounds": 84 + } + ] + }, + { + "routes": 10, + "workload": "late param hit", + "routers": [ + { + "router": "live", + "medianNs": 328.352928401843, + "runMediansNs": [ + 311.85926403299607, + 336.1729405421845, + 322.97121398442357, + 342.4453200724851 + ], + "runSpreadPct": 9.314994140103238 + }, + { + "router": "oracle", + "medianNs": 337.6095849771713, + "runMediansNs": [ + 342.95771598386756, + 329.23083659451027, + 356.32890630777194, + 324.29467767046475 + ], + "runSpreadPct": 9.4885424060082 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.0414845758953593, + "ci95": [ + 0.9840487895243056, + 1.0981905626606485 + ], + "rounds": 84 + } + ] + }, + { + "routes": 10, + "workload": "method miss", + "routers": [ + { + "router": "live", + "medianNs": 800.3690888874354, + "runMediansNs": [ + 762.5936316802184, + 801.231113872719, + 798.6019655227968, + 804.4452176781002 + ], + "runSpreadPct": 5.2290357759890735 + }, + { + "router": "oracle", + "medianNs": 768.764830365322, + "runMediansNs": [ + 769.9946849385246, + 764.5966783051807, + 833.1241593554774, + 762.4561353302172 + ], + "runSpreadPct": 9.192411155395643 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 0.9808889888972754, + "ci95": [ + 0.9563497856047809, + 1.007569338673346 + ], + "rounds": 84 + } + ] + }, + { + "routes": 10, + "workload": "path miss", + "routers": [ + { + "router": "live", + "medianNs": 625.4691255802284, + "runMediansNs": [ + 594.6158371149368, + 631.3307294947713, + 620.346891749737, + 628.1313009660017 + ], + "runSpreadPct": 5.869976770759906 + }, + { + "router": "oracle", + "medianNs": 606.6293810318555, + "runMediansNs": [ + 603.7577581433421, + 610.130880681131, + 657.8848900013173, + 591.472415105108 + ], + "runSpreadPct": 10.947784095660523 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 0.9918598821065332, + "ci95": [ + 0.9676343524497315, + 1.0140912984995398 + ], + "rounds": 84 + } + ] + }, + { + "routes": 100, + "workload": "static hit", + "routers": [ + { + "router": "live", + "medianNs": 201.23446462915837, + "runMediansNs": [ + 202.2099297666982, + 200.84356706728144, + 197.55130935768437, + 207.1707069265196 + ], + "runSpreadPct": 4.780193883071764 + }, + { + "router": "oracle", + "medianNs": 206.87685319828552, + "runMediansNs": [ + 211.72227096457212, + 196.55252892670802, + 213.88537265506167, + 201.6909299674813 + ], + "runSpreadPct": 8.378338833170774 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.0082265346857657, + "ci95": [ + 0.980815089999221, + 1.0453412599435672 + ], + "rounds": 84 + } + ] + }, + { + "routes": 100, + "workload": "late param hit", + "routers": [ + { + "router": "live", + "medianNs": 877.9746524215516, + "runMediansNs": [ + 861.0647960758755, + 857.0065998700544, + 907.3188209561504, + 880.4927300385609 + ], + "runSpreadPct": 5.730486745526113 + }, + { + "router": "oracle", + "medianNs": 892.9957003117274, + "runMediansNs": [ + 888.7114556099716, + 868.9959650770462, + 942.1365890743222, + 895.2029094557312 + ], + "runSpreadPct": 8.190478853564914 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.0246741375888342, + "ci95": [ + 1.0192396600439457, + 1.0292381398317194 + ], + "rounds": 84 + } + ] + }, + { + "routes": 100, + "workload": "method miss", + "routers": [ + { + "router": "live", + "medianNs": 2524.8097530742098, + "runMediansNs": [ + 2424.246331746186, + 2513.7000803535557, + 2579.611719718892, + 2531.4964914064885 + ], + "runSpreadPct": 6.153548313235593 + }, + { + "router": "oracle", + "medianNs": 2515.2174348356484, + "runMediansNs": [ + 2473.3869047619046, + 2527.330633731525, + 2595.885239085239, + 2509.4653266331657 + ], + "runSpreadPct": 4.870288056481238 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.005511861226731, + "ci95": [ + 1.0032937012970706, + 1.007163639807688 + ], + "rounds": 84 + } + ] + }, + { + "routes": 100, + "workload": "path miss", + "routers": [ + { + "router": "live", + "medianNs": 3054.2355398963637, + "runMediansNs": [ + 2965.1615320566193, + 3023.7158662613983, + 3113.518333749065, + 3070.6457541967898 + ], + "runSpreadPct": 4.857411936784665 + }, + { + "router": "oracle", + "medianNs": 3075.578934385792, + "runMediansNs": [ + 3002.5177518353594, + 3087.8832017760237, + 3179.5457670273713, + 3064.2885462555064 + ], + "runSpreadPct": 5.755924948398871 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.0165029837927113, + "ci95": [ + 1.0118848076919917, + 1.0185190964015303 + ], + "rounds": 84 + } + ] + }, + { + "routes": 500, + "workload": "static hit", + "routers": [ + { + "router": "live", + "medianNs": 202.18880551645918, + "runMediansNs": [ + 201.77358104513647, + 202.30868143241565, + 195.06372173246456, + 210.28898387217018 + ], + "runSpreadPct": 7.5302201330163205 + }, + { + "router": "oracle", + "medianNs": 206.3196803217017, + "runMediansNs": [ + 212.11507650610676, + 197.81720378193523, + 213.2145057734214, + 201.09536181442357 + ], + "runSpreadPct": 7.462837266652452 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.0106563013965064, + "ci95": [ + 0.978195535057411, + 1.0453396428232007 + ], + "rounds": 84 + } + ] + }, + { + "routes": 500, + "workload": "late param hit", + "routers": [ + { + "router": "live", + "medianNs": 2930.5752801197277, + "runMediansNs": [ + 2829.5926137011284, + 2804.3130268629875, + 2979.955472228732, + 3016.2126533557853 + ], + "runSpreadPct": 7.230649488183108 + }, + { + "router": "oracle", + "medianNs": 2878.8087964030437, + "runMediansNs": [ + 2865.802915382792, + 2832.552589182969, + 2916.766528449666, + 2881.2465990315886 + ], + "runSpreadPct": 2.9253050557549773 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 0.9837600710849347, + "ci95": [ + 0.9784494525346648, + 1.0076061940749073 + ], + "rounds": 84 + } + ] + }, + { + "routes": 500, + "workload": "method miss", + "routers": [ + { + "router": "live", + "medianNs": 11903.599015391997, + "runMediansNs": [ + 11635.45982350209, + 11518.384650947757, + 11946.45537428023, + 12031.21875 + ], + "runSpreadPct": 4.308227271341387 + }, + { + "router": "oracle", + "medianNs": 12101.521085797383, + "runMediansNs": [ + 11822.522909777988, + 11856.431279620852, + 12275.554193231976, + 12189.959282598158 + ], + "runSpreadPct": 3.7435895887970227 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.0196784652663395, + "ci95": [ + 1.0161411887303275, + 1.0234720994814341 + ], + "rounds": 84 + } + ] + }, + { + "routes": 500, + "workload": "path miss", + "routers": [ + { + "router": "live", + "medianNs": 15513.68187539333, + "runMediansNs": [ + 15103.368832731649, + 14971.62108433735, + 15664.791063561988, + 16034.137443802183 + ], + "runSpreadPct": 6.848898720490839 + }, + { + "router": "oracle", + "medianNs": 15719.611499364677, + "runMediansNs": [ + 15158.752589884218, + 15479.024329382408, + 16084.038286826735, + 15885.728081321475 + ], + "runSpreadPct": 5.886186799081605 + } + ], + "ratios": [ + { + "b": "oracle", + "a": "live", + "medianRatio": 1.0160886334398382, + "ci95": [ + 1.0047155840349569, + 1.0256763082119897 + ], + "rounds": 84 + } + ] + } + ], + "runs": [ + { + "run": 1, + "importReversed": false, + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": { + "live": 154676, + "oracle": 118980 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 167.4207827975898, + 155.0836587447309, + 154.89342237968398, + 155.19377278957305, + 155.52787116294706, + 156.7730805037627, + 159.11930099045748, + 155.8683182911376, + 155.3079081434741, + 156.1825428637927, + 157.7172153404536, + 157.20654141560422, + 157.78282991543614, + 156.14678424577826, + 155.39295689053247, + 155.9071219840182, + 155.56505210892445, + 157.28083865628798, + 156.10234942718975, + 157.91807390933306, + 156.07637901161138 + ], + "oracle": [ + 210.76906202723146, + 200.49705832913094, + 199.56076651538075, + 200.78277021348126, + 197.95461422087746, + 200.05901832240713, + 201.43276180870734, + 200.3806858295512, + 199.54830223566987, + 198.2920238695579, + 200.88053454362077, + 202.94838628340898, + 199.66653219028407, + 199.70989241889393, + 197.80716927214658, + 198.5272987056648, + 199.30764834425955, + 201.5717011262397, + 199.85068919146076, + 197.5594301563288, + 200.19510001680956 + ] + } + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": { + "live": 77585, + "oracle": 70665 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 308.84735451440355, + 311.6437584584649, + 312.1250241670426, + 312.6792678997229, + 310.82193723013467, + 311.85926403299607, + 311.754166398144, + 311.22974801830253, + 311.1690532963846, + 310.3995488818715, + 311.0421215441129, + 312.0826835084101, + 309.9390474962944, + 314.5528774892054, + 312.22098343752015, + 312.6726944641361, + 312.67696075272283, + 313.1951665914803, + 311.9127408648579, + 313.4183025069279, + 311.59041051749693 + ], + "oracle": [ + 342.4574966390717, + 342.2337790985637, + 341.45952027170455, + 343.12883322719875, + 342.6721715134791, + 341.3898959881129, + 344.7686690723838, + 344.2255006014293, + 341.66580343876035, + 342.95771598386756, + 342.1549564848228, + 343.75492818226843, + 342.2091134224864, + 348.6647845468053, + 342.7851694615439, + 344.7651171018184, + 358.3534422981674, + 344.005462392981, + 343.97384843982167, + 342.7043373664473, + 345.0780301422203 + ] + } + }, + { + "routes": 10, + "workload": "method miss", + "iterations": { + "live": 32222, + "oracle": 31232 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 791.7118738749922, + 762.0131276767426, + 754.9704860033518, + 765.5900626900875, + 758.4607100738626, + 762.5936316802184, + 762.9502824157408, + 766.0685866799081, + 763.3243125814661, + 760.6014834585067, + 758.5399726894668, + 770.9589410961455, + 767.2389671652908, + 764.8817578052262, + 760.689777170877, + 766.1354664514928, + 763.129352616225, + 762.3445782384706, + 758.5555210725591, + 758.8089504065546, + 760.2958227298119 + ], + "oracle": [ + 814.708215932377, + 768.5778048155738, + 774.1347976434427, + 770.7989241803278, + 775.6527920081967, + 773.9073706454918, + 768.9546939036885, + 768.6233350409836, + 766.8031826331967, + 762.6665919569672, + 771.8587986680328, + 771.5547195184427, + 769.900390625, + 767.253233862705, + 769.9946849385246, + 767.6474769467213, + 770.5573450307377, + 767.8858222336065, + 772.0339395491803, + 768.077356557377, + 774.1207095286885 + ] + } + }, + { + "routes": 10, + "workload": "path miss", + "iterations": { + "live": 41649, + "oracle": 41537 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 592.1049244879829, + 597.5128574515595, + 598.4178011476866, + 595.1063410886215, + 597.5017887584336, + 598.4353765996783, + 598.2795025090638, + 596.0459554851257, + 590.92261518884, + 592.088093351581, + 592.1489351485029, + 591.6327162716992, + 590.9803116521405, + 589.5651516242887, + 588.9156522365483, + 594.6158371149368, + 593.2254315829912, + 596.196283224087, + 598.9374294700954, + 588.5300247304857, + 595.2444236356215 + ], + "oracle": [ + 603.672581072297, + 608.2882731059055, + 603.7577581433421, + 600.7805811685967, + 600.3968028504706, + 605.1094686664901, + 604.1410308881239, + 603.1069889496112, + 611.6880371716783, + 604.0457423501938, + 605.5906541156078, + 601.2977104749982, + 604.5064400414088, + 602.1204468305366, + 610.0620892216577, + 607.1596648770975, + 604.3180537833739, + 602.7565303223632, + 602.3483881840287, + 602.0917495245203, + 601.7347665936394 + ] + } + }, + { + "routes": 100, + "workload": "static hit", + "iterations": { + "live": 119459, + "oracle": 113978 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 201.84720280598364, + 202.77663466126452, + 205.02172293422848, + 203.90358198210265, + 199.9299676039478, + 203.71345817393416, + 203.33310173364922, + 203.9639625310776, + 200.62079039670513, + 198.37679873429377, + 203.22248637607882, + 201.0197557320922, + 202.17596832386008, + 199.85742388601946, + 202.2099297666982, + 200.08972953063395, + 205.83843829263597, + 198.45521894541224, + 202.76774458182305, + 201.48522924183192, + 203.65382265044911 + ], + "oracle": [ + 212.96406324027444, + 212.93619821369037, + 210.28551123901104, + 213.05565109056133, + 209.75538261769816, + 211.93218866798856, + 211.12568214918667, + 212.25258383196757, + 209.923274667041, + 211.4989998069803, + 211.72227096457212, + 211.3280369895945, + 211.43526820965448, + 211.47922406078365, + 213.3486374563512, + 211.9519556405622, + 212.1345259611504, + 211.97077506185406, + 210.39820842618752, + 212.19571320781205, + 211.30483075681272 + ] + } + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": { + "live": 29153, + "oracle": 27157 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 864.8303433608891, + 865.1248585051281, + 861.2097897300449, + 859.2292388433438, + 862.6559530751553, + 860.6795184029088, + 856.7380372517408, + 954.7576578739753, + 861.0647960758755, + 867.8772339038863, + 859.5444036634309, + 859.6945768874558, + 861.0606455596337, + 888.7281240352622, + 862.8466710115597, + 862.7501114808082, + 860.1966521455768, + 864.3615751380647, + 860.809419270744, + 858.9171954858848, + 856.1823139985594 + ], + "oracle": [ + 893.1983282394963, + 890.2900909526089, + 883.1665132378392, + 886.2105166255477, + 888.617741282174, + 909.5756158633134, + 885.4918437235335, + 902.5250948190154, + 890.0912471922525, + 1005.4214751261185, + 901.4703391390801, + 984.4289133556725, + 885.1022940678279, + 888.5554000810105, + 888.7114556099716, + 889.3884449681482, + 883.0403579187687, + 889.1585963103436, + 884.3795338218507, + 881.9066170784696, + 887.6644327429392 + ] + } + }, + { + "routes": 100, + "workload": "method miss", + "iterations": { + "live": 10291, + "oracle": 10080 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2421.686910893013, + 2424.218248955398, + 2424.246331746186, + 2430.568652220387, + 2424.1958021572245, + 2423.1656787484208, + 2427.168010883296, + 2420.5195802157223, + 2435.424740064134, + 2420.1875425128756, + 2436.2201924011274, + 2421.2498299484987, + 2437.597803906326, + 2434.5417354970364, + 2434.9789136138374, + 2423.211544067632, + 2417.1773394227966, + 2434.6761247692157, + 2426.599455835196, + 2431.846953648819, + 2420.825381401224 + ], + "oracle": [ + 2482.419742063492, + 2474.246626984127, + 2522.4088293650793, + 2465.9919642857144, + 2477.52748015873, + 2473.3869047619046, + 2463.761607142857, + 2456.425297619048, + 2459.2669642857145, + 2473.9424603174602, + 2461.5012896825397, + 2464.8469246031746, + 2469.631746031746, + 2477.846626984127, + 2458.659722222222, + 2466.1122023809526, + 2479.1218253968254, + 2474.60248015873, + 2505.6907738095238, + 2459.6983134920633, + 2476.0674603174602 + ] + } + }, + { + "routes": 100, + "workload": "path miss", + "iterations": { + "live": 8407, + "oracle": 8309 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2954.829071012252, + 2957.119662186273, + 2953.533721898418, + 2965.1615320566193, + 2944.5063637444987, + 2966.5212323064115, + 2956.061377423576, + 2965.996788390627, + 2960.035803497086, + 2969.123944332104, + 2957.9038896157963, + 2959.327941001546, + 2960.088259783514, + 3015.836326870465, + 3020.9059117402167, + 2983.586891875818, + 2989.003211609373, + 2987.918758177709, + 2982.1401213274653, + 2963.0996788390626, + 2969.5696443439992 + ], + "oracle": [ + 3007.2721145745577, + 3008.514141292574, + 2988.2303526296787, + 3001.3203754964497, + 3002.5177518353594, + 2997.8983030448912, + 2995.706222168733, + 3001.654350704056, + 2988.2375737152483, + 2996.3042484053435, + 2984.3634613070167, + 3001.749669033578, + 2993.5696233000363, + 3038.710554820075, + 3024.8393308460704, + 3037.383078589481, + 3024.0663136358166, + 3019.165964616681, + 3020.8443856059694, + 3029.9673847635095, + 3007.8195932121794 + ] + } + }, + { + "routes": 500, + "workload": "static hit", + "iterations": { + "live": 122185, + "oracle": 116592 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 205.18435978229735, + 203.63050292589108, + 201.0700413307689, + 198.8130539755289, + 201.3595776895691, + 200.47211196137005, + 203.17606907558212, + 200.17028276793388, + 201.77358104513647, + 200.54780046650572, + 201.17630642059171, + 200.10370340058108, + 202.6858861562385, + 200.81338953226665, + 202.22555141793183, + 201.62467569668945, + 219.82036256496298, + 206.7439538404878, + 205.7518680689119, + 202.83561812006383, + 204.90146089945574 + ], + "oracle": [ + 213.89916975435708, + 212.20005660765747, + 212.11507650610676, + 211.8932002195691, + 212.2202466721559, + 211.8691419651434, + 210.42549231508164, + 211.92069781803212, + 211.84035782901057, + 210.53866474543707, + 210.2550946891725, + 212.59250205846027, + 211.43218231096472, + 212.4295835048717, + 210.9266501989845, + 212.8664488129546, + 226.776133868533, + 250.34755386304377, + 214.56617092081788, + 212.0749365308083, + 213.63915191436806 + ] + } + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": { + "live": 8773, + "oracle": 8438 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2828.15479311524, + 2831.8206998746155, + 2823.846004787416, + 2829.5355066681864, + 2819.6685284395303, + 2829.5926137011284, + 2830.2767582354954, + 2875.210418328964, + 2823.7682662715147, + 2836.1501196853983, + 2835.6932634218624, + 2862.6527983586, + 2817.8162544169613, + 2851.7682662715147, + 2828.255442835974, + 2847.8944488772368, + 2820.8424712185115, + 2858.8305026786734, + 2822.1055511227632, + 2828.1034993730764, + 2833.6444773737603 + ], + "oracle": [ + 2905.1612941455323, + 2978.438729556767, + 2848.043730741882, + 2935.0399383740223, + 2867.2895235837877, + 2864.2321640199098, + 2855.6108082484, + 2952.093861104527, + 2845.305759658687, + 2870.0228727186536, + 2863.7808722446075, + 2865.802915382792, + 2865.9099312633325, + 2871.514102867978, + 2859.3556529983407, + 2899.1735008295805, + 2843.873666745674, + 2928.198269732164, + 2862.7895235837877, + 2848.1078454610097, + 2853.465157620289 + ] + } + }, + { + "routes": 500, + "workload": "method miss", + "iterations": { + "live": 2153, + "oracle": 2117 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 11624.09568044589, + 11636.3901532745, + 11620.679981421272, + 11661.281467719462, + 11779.255457501162, + 11655.976312122619, + 11594.481189038552, + 11649.764050162565, + 11640.9739897817, + 11653.165815141663, + 11650.155132373433, + 11607.143520668835, + 11659.01068276823, + 11591.233163028333, + 11625.296330701347, + 11590.609382257315, + 11590.311658151417, + 11606.640966093822, + 11635.45982350209, + 11625.491871806782, + 13501.60520204366 + ], + "oracle": [ + 11836.261691072272, + 11738.907416154936, + 11961.963627775154, + 11753.11950873878, + 11815.121398205007, + 11812.102031176193, + 11866.730278696268, + 11802.859234766178, + 11822.522909777988, + 11789.508738781295, + 11809.820973075106, + 11825.404818138875, + 11775.457250826641, + 11842.735947094945, + 11820.440717997166, + 11826.877184695324, + 11853.582900330657, + 11828.940481813888, + 11824.487009919698, + 12408.663202645253, + 11739.040151157298 + ] + } + }, + { + "routes": 500, + "workload": "path miss", + "iterations": { + "live": 1662, + "oracle": 1641 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 15149.093261131167, + 15060.261131167268, + 15085.085439229844, + 15043.918772563176, + 15099.72202166065, + 15123.298435619736, + 14970.501203369435, + 15434.703971119134, + 15128.495186522263, + 15167.72623345367, + 14959.090252707581, + 15309.335138387485, + 15027.703369434417, + 15107.32972322503, + 15137.085439229844, + 15103.368832731649, + 15241.113718411552, + 14996.959687123946, + 14974.492178098677, + 15115.70878459687, + 15009.009626955476 + ], + "oracle": [ + 15167.367458866545, + 15198.297379646558, + 15156.689213893967, + 15236.840341255333, + 15158.752589884218, + 15526.288848263253, + 15237.206581352833, + 15143.147471054235, + 15259.16758074345, + 15100.184034125534, + 15124.300426569165, + 15240.386959171237, + 15087.912248628885, + 15073.979890310786, + 15124.299817184643, + 15185.299207800123, + 15202.778793418647, + 15156.157830591103, + 15189.553930530165, + 15129.233394271785, + 15098.767215112735 + ] + } + } + ] + }, + { + "run": 2, + "importReversed": true, + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": { + "live": 124703, + "oracle": 147813 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 200.33242183427825, + 187.51490341050336, + 188.02154719613802, + 186.44491311355782, + 187.89396405860325, + 187.9198335244541, + 188.27389878350962, + 187.05423285726886, + 187.79055836667922, + 188.16358868671963, + 187.21201574942063, + 187.5002044858584, + 187.76606015893765, + 187.6950273850669, + 187.96578269969447, + 188.00837189161447, + 186.74169827510164, + 185.4701250170405, + 186.32496411473662, + 187.25250394938374, + 187.2036598959127 + ], + "oracle": [ + 161.35164024815137, + 161.18652621893878, + 161.65475296489484, + 162.56206828898675, + 162.16352418258205, + 162.12617293472158, + 162.31900441774405, + 161.93353764553862, + 161.73860215271998, + 161.7917368567041, + 162.53523032480228, + 162.241873177596, + 161.80781122093455, + 162.18059981192454, + 161.6112385243517, + 161.9226928619269, + 161.9537388457037, + 161.78564131706955, + 161.98600258434644, + 160.69525684479714, + 160.32110166223538 + ] + } + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": { + "live": 72337, + "oracle": 73082 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 336.18817479298286, + 335.417683896208, + 336.1729405421845, + 332.4956937666754, + 336.3523093299418, + 337.3619862587611, + 336.87598324508895, + 335.95355074166747, + 335.1107593624286, + 334.8898489016686, + 336.88914386828316, + 336.46628972724886, + 336.3039661583975, + 336.5711323389137, + 335.1012068512656, + 336.8751537940473, + 333.846371842902, + 334.6128537263088, + 336.41309426711086, + 334.1811244591288, + 333.87753155370007 + ], + "oracle": [ + 330.9749049013437, + 330.6294299553926, + 330.6612435346597, + 328.0404750827837, + 330.23392901124765, + 333.8292739662297, + 328.6090008483621, + 329.71408828439286, + 330.67426999808436, + 328.3644125776525, + 328.8645220437317, + 328.1169781888837, + 329.23083659451027, + 328.8950904463479, + 329.1154046139952, + 328.61695082236395, + 329.58205850961934, + 329.714621931529, + 328.8186010235078, + 329.5780903642484, + 328.74951424427354 + ] + } + }, + { + "routes": 10, + "workload": "method miss", + "iterations": { + "live": 30578, + "oracle": 31791 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 830.9857086794427, + 801.0024527438027, + 800.3218980966708, + 805.4647131924913, + 803.9653672575054, + 801.0738766433384, + 803.4975145529465, + 801.2036104388776, + 805.7235267185558, + 803.7582902740533, + 804.2641768591798, + 802.1534436522991, + 803.5869579436196, + 801.231113872719, + 800.490973902806, + 797.662371639741, + 798.9873765452286, + 796.6695990581463, + 798.4926417685919, + 800.4162796782, + 801.4926090653411 + ], + "oracle": [ + 773.3149318989651, + 768.9063256896605, + 767.4339592966563, + 761.0729766286056, + 763.9780126450883, + 769.1631593847316, + 767.6387971438457, + 762.5828693655437, + 764.5966783051807, + 768.3371394419804, + 769.4950143122268, + 764.0643892925671, + 768.0547953823409, + 759.8751218898431, + 769.27599006008, + 761.427196376333, + 760.3462615205561, + 757.4093611399453, + 764.9880783869648, + 762.5510364568588, + 763.2434336761977 + ] + } + }, + { + "routes": 10, + "workload": "path miss", + "iterations": { + "live": 39685, + "oracle": 41343 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 633.5965730124732, + 633.2913443366512, + 629.910142371173, + 633.7159884087187, + 632.8306161018016, + 631.3307294947713, + 631.6069295703667, + 631.1247322665995, + 627.5342320776111, + 629.8099029860149, + 627.5099911805468, + 631.5655285372306, + 630.1588005543656, + 631.4771576162278, + 627.5322162025955, + 628.2461887362983, + 636.0865566334887, + 627.2184200579565, + 633.0661458989542, + 635.3988912687413, + 631.2814917475116 + ], + "oracle": [ + 613.0898096412935, + 614.4100331374115, + 613.100234622548, + 615.4547565488716, + 619.4617952253102, + 616.4834675761314, + 616.6773335268365, + 615.4317538640157, + 606.5804126454296, + 606.6783494182812, + 605.2029847858162, + 607.154512251167, + 608.1325738335389, + 602.4720992671068, + 608.2241975666981, + 603.2611566649736, + 613.8068838739327, + 606.7052221657838, + 610.130880681131, + 607.2897467527756, + 610.7914761870207 + ] + } + }, + { + "routes": 100, + "workload": "static hit", + "iterations": { + "live": 119067, + "oracle": 121514 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 198.8722232020627, + 201.6072631375612, + 199.12692013740164, + 203.32658923127315, + 202.309959938522, + 200.57152695541166, + 199.56405217230636, + 200.924261130288, + 200.97618147765544, + 200.25051441625303, + 200.34711548959828, + 201.17240713211888, + 200.18597932256628, + 201.70924773446882, + 202.343537672067, + 201.29652212619786, + 198.95880470659375, + 201.9790202155089, + 200.54021685269637, + 200.65104520983985, + 200.84356706728144 + ], + "oracle": [ + 196.03804499893016, + 195.1189657158846, + 196.6844478825485, + 195.97422519215894, + 196.65337327386146, + 196.8453100054315, + 196.2388037592376, + 196.55252892670802, + 196.08808861530358, + 196.96346100037854, + 196.5746251460737, + 196.70968777260234, + 196.5621739058874, + 196.85405796862912, + 196.12296525503234, + 196.71866616192372, + 196.70160639926263, + 196.43701960267953, + 196.38977401780863, + 196.25125499942394, + 196.37443422157116 + ] + } + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": { + "live": 29243, + "oracle": 28749 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 854.931060424717, + 858.0128577779298, + 855.9040796087953, + 854.3044489279486, + 855.1623294463633, + 857.2745272372875, + 856.0805320931505, + 859.5223472283965, + 852.3769449098929, + 857.0065998700544, + 859.6271928324727, + 859.8324043360805, + 858.6572513080054, + 853.9971275176965, + 857.7545053517081, + 854.1379475430017, + 859.9807817255412, + 856.1826419997948, + 856.2251137024246, + 865.888007386383, + 883.0451390076257 + ], + "oracle": [ + 871.2702702702703, + 867.5204354934085, + 873.2009113360465, + 875.2075550453928, + 868.4265191832759, + 866.465929249713, + 867.8543253678389, + 868.9959650770462, + 869.1287349125187, + 865.0625413057845, + 872.6081255000174, + 876.1439702250514, + 869.2071724233887, + 872.2582350690459, + 866.7133465511844, + 871.412118682389, + 867.9989217016245, + 869.7469825037392, + 865.3894048488643, + 867.5939684858604, + 866.5000521757279 + ] + } + }, + { + "routes": 100, + "workload": "method miss", + "iterations": { + "live": 9956, + "oracle": 9878 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2526.011349939735, + 2522.2507030936117, + 2527.656588991563, + 2508.402872639614, + 2506.739353153877, + 2510.0853756528727, + 2505.561972679791, + 2513.4645439935716, + 2501.637304138208, + 2515.245781438329, + 2507.3089594214543, + 2520.0549417436723, + 2536.28284451587, + 2527.1785857774207, + 2518.998292486943, + 2513.7000803535557, + 2516.539875451989, + 2507.1227400562475, + 2515.5064282844514, + 2508.026516673363, + 2510.7464845319405 + ], + "oracle": [ + 2531.7477222109737, + 2534.7022676655192, + 2527.4015995140717, + 2526.033407572383, + 2517.136262401296, + 2529.5487953026927, + 2520.8565499088886, + 2530.2729297428627, + 2515.457683741648, + 2514.356144968617, + 2521.519943308362, + 2511.1297833569547, + 2534.778396436526, + 2535.461024498886, + 2524.9156711885, + 2531.161469933185, + 2527.330633731525, + 2531.7396234055477, + 2521.0066815144764, + 2529.417898359992, + 2524.5535533508805 + ] + } + }, + { + "routes": 100, + "workload": "path miss", + "iterations": { + "live": 8225, + "oracle": 8108 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 3034.2121580547114, + 3023.7158662613983, + 3027.291063829787, + 3023.053252279635, + 3040.983708206687, + 3021.2199392097264, + 3035.6824316109423, + 3022.539209726444, + 3018.140547112462, + 3019.609726443769, + 3050.961215805471, + 3023.9850455927053, + 3031.980668693009, + 3023.1981762917935, + 3019.4025531914895, + 3016.984680851064, + 3030.285106382979, + 3021.156595744681, + 3024.1325227963525, + 3015.888389057751, + 3037.4414589665653 + ], + "oracle": [ + 3104.71805624075, + 3089.840527873705, + 3093.703132708436, + 3084.6889491859893, + 3070.610878145042, + 3083.578194375925, + 3086.163172175629, + 3075.6462752836705, + 3094.3778983719785, + 3093.821780957079, + 3094.929082387765, + 3094.5669708929454, + 3096.688579181056, + 3079.585594474593, + 3086.4337691169217, + 3084.337937839171, + 3087.8832017760237, + 3080.5605574741, + 3075.511593487913, + 3091.9399358658115, + 3088.743093241243 + ] + } + }, + { + "routes": 500, + "workload": "static hit", + "iterations": { + "live": 120775, + "oracle": 124275 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 200.2638459946181, + 200.5362699234113, + 202.7408818050093, + 204.32166425170772, + 200.10299316911613, + 201.00131649761954, + 202.15205961498654, + 201.04552266611466, + 201.40397433243635, + 201.066677706479, + 202.90546056717037, + 203.05203891533844, + 202.0439660525771, + 202.49284206168494, + 200.12522459118196, + 202.92602773752847, + 202.30868143241565, + 207.28373421651833, + 204.6721506934382, + 206.4224218588284, + 205.40861933347134 + ], + "oracle": [ + 197.81720378193523, + 197.78915308790988, + 197.69716354858178, + 197.434834037417, + 197.33873264936634, + 197.88411989539327, + 196.95837457252063, + 197.95892979279822, + 197.23707905853954, + 197.8711406155703, + 197.3045503922752, + 198.3981492657413, + 197.09405753369543, + 197.58035003017503, + 198.05785556226112, + 198.1641923154295, + 198.19627439147052, + 198.38129149064574, + 197.43910681955342, + 198.81058137195734, + 198.82679541339772 + ] + } + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": { + "live": 8897, + "oracle": 8690 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2811.5381589299764, + 2820.072833539395, + 2820.7372147915025, + 2800.1386984376754, + 2798.8503990109025, + 2803.063054962347, + 2808.2465999775204, + 2824.701135214117, + 2812.690120265258, + 2800.4888164549848, + 2806.7511520737326, + 2886.881870293357, + 2795.951893896819, + 2794.797684612791, + 2808.458244352029, + 2789.2256940541756, + 2804.3130268629875, + 2793.919298639991, + 2789.9632460379903, + 2801.993368551197, + 2829.7471057659886 + ], + "oracle": [ + 2827.7944764096665, + 2885.4313003452244, + 2828.3306098964326, + 2825.1612197928653, + 2824.577905638665, + 2874.21001150748, + 2832.0545454545454, + 2852.8612197928655, + 2834.0248561565018, + 2843.565247410817, + 2832.552589182969, + 2820.2406214039124, + 2830.8878020713464, + 2824.6792865362486, + 2836.8161104718065, + 2837.192059838895, + 2829.282968929804, + 2821.8246260069045, + 2937.5756041426926, + 2842.293670886076, + 2843.0222094361334 + ] + } + }, + { + "routes": 500, + "workload": "method miss", + "iterations": { + "live": 2163, + "oracle": 2110 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 11534.267683772538, + 11507.726768377253, + 11477.818307905687, + 11567.135922330097, + 11518.384650947757, + 11590.221451687472, + 11500.061026352289, + 11631.46925566343, + 12022.654646324549, + 11598.989828941285, + 11434.857142857143, + 11467.730004623209, + 11474.298196948683, + 11455.932038834952, + 11489.060101710587, + 11443.727230698105, + 11484.294036061026, + 11579.647249190939, + 11826.21405455386, + 11841.429958391123, + 11629.329172445678 + ], + "oracle": [ + 11856.431279620852, + 11831.241232227489, + 11968.618957345972, + 11795.491943127961, + 11800.895734597156, + 11739.922748815166, + 11809.014691943128, + 11910.747393364929, + 11910.799052132701, + 11846.417061611375, + 11967.826066350712, + 11899.59289099526, + 11774.808530805687, + 11866.649763033176, + 11771.18056872038, + 11911.549289099527, + 11788.388151658768, + 11876.483412322275, + 11892.841232227489, + 11787.595260663507, + 11906.915165876777 + ] + } + }, + { + "routes": 500, + "workload": "path miss", + "iterations": { + "live": 1660, + "oracle": 1603 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 15016.006024096385, + 15017.478313253012, + 14999.184939759036, + 14972.381927710843, + 15068.447590361446, + 15152.97469879518, + 14971.62108433735, + 15135.405421686746, + 15019.868674698795, + 15075.726506024097, + 17411.34578313253, + 14844.109638554217, + 14780.242168674698, + 14776.053614457831, + 14724.80060240964, + 14955.69939759036, + 14821.494578313253, + 14931.840963855422, + 14762.90843373494, + 14768.351807228915, + 14736.394578313253 + ], + "oracle": [ + 15513.49344978166, + 15424.34809731753, + 15773.971303805365, + 15416.422956955708, + 15490.067997504679, + 15545.406113537118, + 15479.024329382408, + 15747.65252651279, + 15501.067997504679, + 15582.663131628196, + 15362.103555832813, + 15351.240798502808, + 15349.578914535246, + 15335.6219588272, + 15441.473487211479, + 15288.333749220212, + 15489.411728009982, + 15591.54398003743, + 15457.72301933874, + 15424.229569557081, + 15589.049906425453 + ] + } + } + ] + }, + { + "run": 3, + "importReversed": false, + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": { + "live": 161628, + "oracle": 124401 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 185.22269037543, + 175.39584725418862, + 173.83686613705547, + 175.44190363055907, + 175.28972084044844, + 174.89467790234366, + 174.12851733610512, + 175.22885267404163, + 173.71102779221422, + 173.94385873734748, + 173.89984408642067, + 174.11010468483184, + 173.3051389610711, + 174.49027396243224, + 174.43876061078527, + 173.97621080505854, + 173.84461231964758, + 173.91515084020097, + 174.17450565496077, + 173.30216299156086, + 173.96412131561362 + ], + "oracle": [ + 190.61738249692527, + 192.46223904952532, + 190.18030401684874, + 189.88328068102348, + 190.85873907766015, + 191.3444666843514, + 192.6210561008352, + 190.9986414900202, + 196.9187466338695, + 195.1599022515896, + 196.73190729978054, + 195.70425478894865, + 196.23113158254355, + 196.63937588926134, + 195.74387665694005, + 194.9699198559497, + 200.7169556514819, + 194.53735098592455, + 196.2517503878586, + 197.2052234306798, + 194.96524947548653 + ] + } + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": { + "live": 75627, + "oracle": 67615 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 323.02698771602735, + 322.32262287278354, + 322.49681991881204, + 324.12377854469963, + 321.8015788012218, + 322.5895645734989, + 322.07314847871794, + 322.4774881986592, + 324.10059899242333, + 322.124823145173, + 322.4282068573393, + 322.89452179777066, + 322.97121398442357, + 323.0431591891785, + 323.94864268052413, + 323.0321710500218, + 324.2028640564878, + 324.2101630370106, + 322.3158660266836, + 323.31540322900554, + 324.1652452166554 + ], + "oracle": [ + 355.3487243954744, + 355.7822820380093, + 361.84516749242033, + 355.6495156400207, + 354.7248983213784, + 356.5797678030023, + 356.1571692671744, + 357.4882200695112, + 359.26573985062487, + 358.04062707979, + 355.5680248465577, + 355.16883827553056, + 355.6052059454263, + 357.03213783923684, + 356.41305923241885, + 355.5318642313096, + 356.32890630777194, + 355.40116837979735, + 357.0248909265695, + 356.4987059084523, + 356.4720402277601 + ] + } + }, + { + "routes": 10, + "workload": "method miss", + "iterations": { + "live": 31035, + "oracle": 29293 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 812.2019655227969, + 808.8684710810376, + 796.1559207346544, + 798.6019655227968, + 795.5874335427743, + 798.7762848396972, + 792.3101014983083, + 792.6490736265507, + 797.7922990172386, + 791.52531013372, + 792.5444820364105, + 799.0942806508781, + 800.1628483969712, + 797.791364588368, + 795.0127920090221, + 802.1675527630096, + 802.2240695988401, + 808.7828902851619, + 800.7626228451747, + 797.9921379088127, + 807.2920895762849 + ], + "oracle": [ + 869.5253473526099, + 830.6609087495306, + 834.5709213805346, + 833.3392960775612, + 830.7347830539719, + 833.2561704161403, + 835.308640289489, + 830.3099716655856, + 829.8161335472638, + 833.5277370020141, + 832.7212644659134, + 828.4559109684908, + 832.4883419246919, + 834.5924623630219, + 831.5381831836958, + 828.7154951694944, + 832.3313760966784, + 836.9801317720958, + 839.4444065135015, + 833.1241593554774, + 834.5113849725191 + ] + } + }, + { + "routes": 10, + "workload": "path miss", + "iterations": { + "live": 39926, + "oracle": 37955 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 618.8415568802284, + 618.9020187346591, + 618.1743224966187, + 621.0826529078796, + 616.4232580273506, + 620.346891749737, + 615.055402494615, + 615.2087361618995, + 622.8760957771877, + 624.6426889746031, + 626.1139357811952, + 627.1764013424836, + 624.5254971697641, + 625.1004107599058, + 625.6875720082152, + 621.7970495416521, + 625.5598607423734, + 618.4606271602464, + 619.7933426839653, + 616.2313029103842, + 617.584856985423 + ], + "oracle": [ + 655.0171518903966, + 651.9569753655645, + 661.7562639968384, + 657.3648794625215, + 654.7537083388223, + 650.2673165590832, + 658.5894348570675, + 649.1792385719931, + 696.7841918060861, + 659.3570544065341, + 660.3221182979845, + 660.0473191937821, + 666.0668423132657, + 663.1341588723488, + 662.3910947174286, + 661.8554867606376, + 657.1373468581214, + 656.0925569753656, + 657.8848900013173, + 654.4448952707153, + 655.4294822816494 + ] + } + }, + { + "routes": 100, + "workload": "static hit", + "iterations": { + "live": 122541, + "oracle": 118340 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 198.10825764438025, + 197.50577357782294, + 197.77966558131564, + 197.87654744126456, + 195.76855093397313, + 196.91588121526672, + 197.22272545515378, + 200.35190670877503, + 198.07727209668602, + 198.06091838649922, + 197.3558319256412, + 196.98594756040836, + 195.98063505275786, + 196.35590537044743, + 196.7289805044842, + 197.55130935768437, + 199.6844158281718, + 197.5725675488204, + 197.83584269754613, + 196.21217388465902, + 199.18282044376983 + ], + "oracle": [ + 213.83575291532873, + 213.1517745479128, + 211.85957410850094, + 215.5411864120331, + 214.01651174581713, + 214.85635457157343, + 214.36481324995776, + 213.22136217677877, + 214.8572080446172, + 214.0837333107994, + 213.87995605881358, + 216.3699340882204, + 213.26183876964677, + 213.88537265506167, + 213.0512759844516, + 213.95910934595233, + 213.86368936961298, + 213.48338685144498, + 214.14731282744634, + 214.4783336150076, + 213.33252492817306 + ] + } + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": { + "live": 28803, + "oracle": 27623 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 907.3188209561504, + 902.6612505641773, + 907.2190049647606, + 904.4512377182932, + 910.5735860847828, + 908.6938166163247, + 906.9132382043537, + 901.5818838315453, + 909.1209943408672, + 907.9623303128146, + 905.7761344304413, + 906.7160365239732, + 907.7459639620873, + 903.6087560323577, + 907.894524875881, + 905.3615248411623, + 907.7950213519425, + 906.3855848349131, + 908.1999097316252, + 910.4949831614763, + 909.7867583237858 + ], + "oracle": [ + 937.7029649205373, + 939.9781703652753, + 935.9870035839699, + 937.9093147015169, + 942.1365890743222, + 950.6720486551062, + 940.0260290337762, + 944.0106433044926, + 943.4415885312964, + 951.083336350143, + 949.2447960033305, + 946.3722260435145, + 943.9460956449336, + 949.3311008941823, + 942.7375737609963, + 939.4986786373674, + 938.5922600731275, + 942.9940267168664, + 934.8898381783297, + 938.7235636969192, + 935.4944792383159 + ] + } + }, + { + "routes": 100, + "workload": "method miss", + "iterations": { + "live": 9676, + "oracle": 9620 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2585.0849524596943, + 2585.478503513849, + 2577.452873088053, + 2575.761988424969, + 2581.1773460107484, + 2579.611719718892, + 2583.0234601074826, + 2578.1507854485326, + 2583.9625878462175, + 2584.4275527077307, + 2576.5519842910294, + 2581.600764778834, + 2573.6517155849524, + 2589.9568003307154, + 2577.905332782141, + 2576.8751550227366, + 2579.3373294749895, + 2587.594977263332, + 2588.1685613890036, + 2578.334022323274, + 2576.996176105829 + ], + "oracle": [ + 2608.6046777546776, + 2593.7825363825364, + 2587.8191268191267, + 2589.4177754677753, + 2599.485550935551, + 2588.4127858627858, + 2585.5133056133054, + 2599.1846153846154, + 2592.4733887733887, + 2598.8075883575884, + 2595.885239085239, + 2600.389604989605, + 2602.213097713098, + 2590.9288981288983, + 2661.9245322245324, + 2602.970374220374, + 2590.65395010395, + 2606.314449064449, + 2591.9193347193345, + 2600.3510395010394, + 2592.1474012474014 + ] + } + }, + { + "routes": 100, + "workload": "path miss", + "iterations": { + "live": 8018, + "oracle": 7855 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 3116.6672486904463, + 3117.2082813669244, + 3105.8136692442004, + 3106.116113744076, + 3118.199176852083, + 3113.518333749065, + 3121.208156647543, + 3111.504240458967, + 3125.3104265402844, + 3106.68458468446, + 3115.6138687952107, + 3127.274632077825, + 3118.9963831379396, + 3101.951359441257, + 3110.6981790970317, + 3107.1694936393114, + 3125.352955849339, + 3120.2683961087555, + 3109.88351209778, + 3111.4141930656024, + 3103.3483412322275 + ], + "oracle": [ + 3189.658943348186, + 3179.575047740293, + 3181.2127307447486, + 3167.830426479949, + 3169.2654360280076, + 3166.8380649267983, + 3203.828262253342, + 3191.4446849140677, + 3161.1367281985995, + 3173.284404837683, + 3176.0151495862506, + 3167.6238064926797, + 3182.191088478676, + 3179.8543602800764, + 3173.266581795035, + 3171.542075111394, + 3203.389560789306, + 3180.6488860598347, + 3190.9433481858687, + 3170.3941438574157, + 3179.5457670273713 + ] + } + }, + { + "routes": 500, + "workload": "static hit", + "iterations": { + "live": 125232, + "oracle": 119773 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 196.79337549508114, + 195.91078957454963, + 194.55762904050084, + 195.6392615305992, + 194.31962278012008, + 197.4245240833014, + 195.4601379839019, + 195.06372173246456, + 195.17916347259487, + 194.92819726587453, + 195.16269004727226, + 194.93956017631277, + 194.79915676504407, + 194.0845710361569, + 194.6869090967165, + 198.85112431327457, + 195.2135636259103, + 194.7308275840041, + 194.76418966398364, + 195.32853424044973, + 194.47810463779226 + ], + "oracle": [ + 213.28033864059512, + 212.39240062451472, + 213.29974201197265, + 212.61624907115961, + 213.04268908685597, + 212.48390705751714, + 213.67340719527775, + 212.89303933273777, + 212.97618828951434, + 213.2947158374592, + 213.2145057734214, + 213.70694563883345, + 211.9270620256652, + 213.28292686999575, + 212.76982291501423, + 213.329022400708, + 214.98217461364413, + 212.1923137935929, + 215.1193591210039, + 212.02417907207803, + 213.4881985088459 + ] + } + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": { + "live": 8534, + "oracle": 8682 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2996.174244199672, + 2975.517811108507, + 2978.95758143895, + 2978.9552378720414, + 3021.6453011483477, + 2986.4088352472463, + 2979.760721818608, + 2980.062338879775, + 2976.7293180220295, + 2979.955472228732, + 2978.5502695101945, + 2983.09948441528, + 2984.753573939536, + 2978.0324584016876, + 2981.140028122803, + 2974.2686899460978, + 2986.486407311929, + 2975.718537614249, + 2978.4409421138976, + 2998.28509491446, + 2984.6386219826577 + ], + "oracle": [ + 2907.572794287031, + 2918.419027873762, + 2930.0384703985255, + 2923.3673116793366, + 2921.41131075789, + 2917.0412347385395, + 2914.9260539046304, + 2916.766528449666, + 2905.590186592951, + 2927.742110112877, + 2914.899447131997, + 2923.640866159871, + 2909.1503109882515, + 2916.4077401520385, + 2916.3557935959457, + 2926.2707901405206, + 2911.776779543884, + 2927.088919603778, + 2910.4486293480763, + 2930.667472932504, + 2909.409928587883 + ] + } + }, + { + "routes": 500, + "workload": "method miss", + "iterations": { + "live": 2084, + "oracle": 2039 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 12082.431381957773, + 11932.003838771592, + 11959.272072936661, + 12007.222648752399, + 11994.57869481766, + 11977.203934740883, + 11991.675143953935, + 11938.23944337812, + 11969.98320537428, + 12008.313339731287, + 11965.892034548944, + 11975.785988483685, + 11925.63387715931, + 11946.45537428023, + 11910.773992322456, + 11914.835892514395, + 11922.153071017274, + 11888.880518234166, + 11930.773032629559, + 11909.523992322456, + 11944.628598848369 + ], + "oracle": [ + 12321.737126042177, + 12279.902403138794, + 12208.988719960766, + 12242.74595389897, + 12353.538008827856, + 12344.717999019127, + 12302.264345267287, + 12218.349681216283, + 12285.675821481118, + 12217.931829328101, + 12275.828837665522, + 12132.921039725356, + 12281.154977930359, + 12249.521333987248, + 12296.65277096616, + 12250.16037273173, + 12257.461991172144, + 12239.306032368808, + 12232.952918097106, + 12279.302599313389, + 12275.554193231976 + ] + } + }, + { + "routes": 500, + "workload": "path miss", + "iterations": { + "live": 1589, + "oracle": 1541 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 15712.43926998112, + 15696.461925739459, + 15747.48961611076, + 15662.155443675267, + 15651.972938955318, + 15664.791063561988, + 15710.843926998112, + 15636.588420390182, + 15635.970421648835, + 15677.370044052863, + 15688.410320956576, + 15690.251101321586, + 15626.348646947767, + 15726.991189427314, + 15617.351164254247, + 15665.528634361233, + 15601.399622404027, + 18338.98804279421, + 15502.212712397735, + 15551.412208936437, + 15525.151038388924 + ], + "oracle": [ + 16115.876703439326, + 16133.001946787801, + 16165.672290720311, + 16144.360155743025, + 16045.705386112913, + 16078.08306294614, + 16014.829331602856, + 16084.038286826735, + 16077.316677482155, + 16055.419208306295, + 16032.221284879948, + 16004.869565217392, + 16200.357560025957, + 16110.09669046074, + 16157.967553536664, + 16119.472420506165, + 16171.022712524335, + 16117.09279688514, + 16015.29785853342, + 15983.19922128488, + 15946.30369889682 + ] + } + } + ] + }, + { + "run": 4, + "importReversed": true, + "cells": [ + { + "routes": 10, + "workload": "static hit", + "iterations": { + "live": 128668, + "oracle": 144964 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 211.16639723940685, + 197.03314732489818, + 195.02887275779526, + 195.63771100817607, + 195.8421052631579, + 193.01400503621724, + 194.07150962166196, + 193.89529642179875, + 193.52426399726428, + 195.107517020549, + 193.19434513631984, + 194.30145024403893, + 193.8277116299313, + 192.694601610346, + 194.25216059937202, + 192.40010725277457, + 194.17008891099573, + 192.965655796313, + 194.2790981440607, + 195.40605278701776, + 193.37328628718873 + ], + "oracle": [ + 163.0716177809663, + 162.1032049336387, + 162.22629756353302, + 162.96726083717337, + 161.80484810021798, + 162.96124555061945, + 162.40046494302032, + 162.41622057890234, + 162.3756518859855, + 163.62065064429788, + 163.01238928285645, + 162.30791782787452, + 162.4811125520819, + 163.06367098038135, + 162.2761996081786, + 162.41082613614415, + 162.28006263624073, + 163.41275765017522, + 163.32104522502138, + 163.45374023895587, + 162.69882177644104 + ] + } + }, + { + "routes": 10, + "workload": "late param hit", + "iterations": { + "live": 71187, + "oracle": 72581 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 343.0576931181255, + 342.24772781547193, + 343.36703330664307, + 342.39282453256914, + 342.3280795650891, + 342.3628471490581, + 342.3510191467543, + 342.0703920659671, + 341.6628036017812, + 340.3941730934019, + 344.63157598999817, + 343.22346776799134, + 342.86795341846124, + 342.4453200724851, + 343.32254484667146, + 342.8924522735893, + 342.60914211864525, + 342.16243134280137, + 344.4747917456839, + 343.63091575709046, + 341.18711281554215 + ], + "oracle": [ + 322.9002218211378, + 324.8908529780521, + 322.1252807208498, + 323.63002714208955, + 324.3432716551163, + 324.393932296331, + 323.7915294636337, + 323.39026742535924, + 322.55029553188854, + 324.29467767046475, + 324.9379314145575, + 324.3152477921219, + 327.38256568523445, + 322.56078036951817, + 324.3838470123035, + 321.4680839338119, + 326.1482343864097, + 323.01603725492896, + 326.30918559953705, + 325.7389537206707, + 323.3576831402158 + ] + } + }, + { + "routes": 10, + "workload": "method miss", + "iterations": { + "live": 30320, + "oracle": 31449 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 858.2382255936675, + 802.0373680738786, + 804.685488126649, + 804.7895448548812, + 807.3375659630607, + 802.5145118733509, + 805.4755606860158, + 805.8016820580475, + 802.4860817941952, + 801.9738786279684, + 804.4452176781002, + 806.187302110818, + 801.8202506596306, + 805.5710422163588, + 802.7986807387863, + 801.9494393139842, + 804.6355870712401, + 799.8204485488127, + 799.1423812664908, + 801.7006266490765, + 806.0914907651716 + ], + "oracle": [ + 771.6145187446342, + 761.7925212248402, + 762.6135012242042, + 762.4561353302172, + 759.5437056822157, + 764.0878565296193, + 759.5341346306719, + 757.975992877357, + 770.9576139145919, + 762.1107825368056, + 763.9132881808642, + 760.14359757067, + 761.088778657509, + 760.8339533848454, + 769.2175903844319, + 763.2302457947789, + 766.481954911126, + 762.2219784412858, + 765.5389996502273, + 761.0085217336004, + 765.782695793189 + ] + } + }, + { + "routes": 10, + "workload": "path miss", + "iterations": { + "live": 39855, + "oracle": 42052 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 643.509672563041, + 626.6657132103877, + 625.5400075272864, + 625.3982436331703, + 625.37310249655, + 628.1313009660017, + 623.7164973027224, + 629.8678459415381, + 631.0483251787731, + 626.884431062602, + 627.383163969389, + 628.2433822606951, + 627.7987203613097, + 629.9917701668548, + 631.17352904278, + 626.8927110776565, + 629.2612721114039, + 628.6214778572324, + 632.4686488520888, + 632.7542090076528, + 623.9178522142768 + ], + "oracle": [ + 591.472415105108, + 592.6457956815372, + 592.522139256159, + 590.9680157899743, + 593.441072957291, + 591.9431893845715, + 597.2268619804053, + 588.3949395985923, + 588.1295301055835, + 589.5997574431656, + 593.1909064967183, + 589.7899029772663, + 590.4279463521355, + 591.3913963664035, + 590.6623703985541, + 592.2433891372586, + 587.7836012555883, + 589.4032150670598, + 595.930538381052, + 592.1959716541425, + 594.7502615808999 + ] + } + }, + { + "routes": 100, + "workload": "static hit", + "iterations": { + "live": 119093, + "oracle": 119316 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 206.73206653623637, + 210.48049003719782, + 209.05816462764395, + 207.1707069265196, + 208.7074471211574, + 207.69044360289857, + 206.60991829914437, + 205.89694608415272, + 206.19896215562628, + 207.03711385219955, + 206.73173066427077, + 207.41963843382902, + 207.71416456046956, + 206.38765502590414, + 207.32297448212742, + 207.5808233901237, + 206.41516293988732, + 208.1590185821165, + 206.3272568496889, + 207.02020269873125, + 207.22101215016835 + ], + "oracle": [ + 201.10096717959033, + 201.1544553957558, + 202.21691977605687, + 201.6909299674813, + 201.2780599416675, + 202.1035569412317, + 202.00716584531833, + 203.9983237788729, + 201.8158838714003, + 202.93947165510073, + 202.14688725736698, + 202.18845754131885, + 201.43835696805124, + 200.82042643065472, + 201.14412987361294, + 201.68270810285293, + 200.10828388481008, + 202.23699252405376, + 201.71402829461263, + 201.5687669717389, + 201.50695631767744 + ] + } + }, + { + "routes": 100, + "workload": "late param hit", + "iterations": { + "live": 28267, + "oracle": 27909 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 883.3087699437507, + 884.486574450773, + 879.1954929776772, + 880.4927300385609, + 882.0334665864789, + 883.5894859730428, + 877.83765521633, + 881.5886723033926, + 882.382955389677, + 885.3666112427919, + 878.3590405773517, + 882.3641702338416, + 878.1116496267732, + 879.8476668907206, + 879.3727314536385, + 882.2546786004882, + 876.8969823469063, + 878.8247780096933, + 878.7116779283264, + 884.303675664202, + 877.2946899211095 + ], + "oracle": [ + 891.5064674477767, + 896.5250277688201, + 897.1475151384858, + 893.9105664839299, + 893.9482604177864, + 893.0737754846107, + 891.6223798774589, + 898.1821276290802, + 892.9176251388441, + 895.2029094557312, + 893.6373929556773, + 895.626536242789, + 897.352861084238, + 897.1686911032283, + 901.2517825790964, + 898.3070694041348, + 916.8403382421441, + 895.8454978680712, + 892.4922068150059, + 891.0354724282489, + 892.3220466516177 + ] + } + }, + { + "routes": 100, + "workload": "method miss", + "iterations": { + "live": 9833, + "oracle": 9950 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 2563.2149903386558, + 2546.2114308959626, + 2536.477880606122, + 2545.154886606326, + 2539.8932167192106, + 2584.9756940913253, + 2550.0160683412996, + 2520.937557205329, + 2531.1540730194242, + 2523.4236753788264, + 2530.2523136377504, + 2528.886097833825, + 2532.990236957185, + 2523.608156208685, + 2527.5736804637445, + 2523.141462422455, + 2534.012203803519, + 2532.852639072511, + 2530.243262483474, + 2531.4964914064885, + 2530.5967659920675 + ], + "oracle": [ + 2510.497386934673, + 2510.0493467336682, + 2506.993366834171, + 2501.3786934673367, + 2506.763718592965, + 2505.168743718593, + 2526.5658291457285, + 2511.790351758794, + 2510.73608040201, + 2504.6642211055278, + 2503.5506532663317, + 2507.7646231155777, + 2510.3996984924624, + 2507.999296482412, + 2507.0366834170854, + 2512.3099497487437, + 2514.8352763819094, + 2500.8711557788943, + 2512.870753768844, + 2509.4653266331657, + 2514.9771859296484 + ] + } + }, + { + "routes": 100, + "workload": "path miss", + "iterations": { + "live": 8161, + "oracle": 8172 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 3077.4788628844503, + 3080.2583016787157, + 3063.4321774292366, + 3068.654576645019, + 3066.2347751501043, + 3077.243229996324, + 3064.3233672344077, + 3073.996078911898, + 3071.609484131847, + 3076.6600906751623, + 3066.021198382551, + 3098.886656047053, + 3075.714740840583, + 3073.88922926112, + 3070.6457541967898, + 3065.8554098762406, + 3063.3179757382673, + 3071.2804803332924, + 3068.3046195319203, + 3067.9671608871463, + 3057.5098639872563 + ], + "oracle": [ + 3061.0592266275085, + 3063.421806167401, + 3073.582843857073, + 3054.889990210475, + 3081.7810817425357, + 3072.4672050905533, + 3077.3504650024474, + 3069.0282672540384, + 3067.5128487518355, + 3062.805066079295, + 3058.571708272149, + 3063.899902104748, + 3058.2137787567303, + 3060.5884728340675, + 3071.6139255996086, + 3072.3875428291726, + 3064.2885462555064, + 3065.547601566324, + 3061.672295643661, + 3068.4018600097897, + 3062.5500489476262 + ] + } + }, + { + "routes": 500, + "workload": "static hit", + "iterations": { + "live": 120723, + "oracle": 122397 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 207.22978222873851, + 210.692983110095, + 209.7449781731733, + 212.92543260190683, + 211.4127631023086, + 210.996810881108, + 209.6152680102383, + 211.07141969632963, + 211.16121203084748, + 211.7888720459233, + 210.10540659195016, + 208.138035005757, + 208.2003595006751, + 210.9987160690175, + 209.96921879012285, + 209.54621737365704, + 208.09703204857402, + 211.1277718413227, + 208.52020741697936, + 211.66745359210756, + 210.28898387217018 + ], + "oracle": [ + 200.12848354126328, + 200.49904817928544, + 202.3842659542309, + 201.08431579205373, + 201.26530062011324, + 201.53632033464874, + 201.81774063089782, + 200.67406063874114, + 201.40044282131097, + 200.3309966747551, + 201.956159056186, + 200.79012557497325, + 201.09536181442357, + 200.83212006830232, + 201.65681348399062, + 201.120411447993, + 202.33253266011423, + 201.07007524694234, + 201.69356275072101, + 200.6892816000392, + 201.05353889392714 + ] + } + }, + { + "routes": 500, + "workload": "late param hit", + "iterations": { + "live": 8314, + "oracle": 8674 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 3014.5509983160932, + 3012.405941784941, + 3030.1396439740197, + 3028.9141207601638, + 3019.8628818859756, + 3014.1472215540052, + 3009.8561462593216, + 3016.2126533557853, + 3055.7700264613904, + 3016.8406302622084, + 3012.1999037767623, + 3014.6401250902095, + 3024.7469328842917, + 3025.1639403415925, + 3006.8145297089245, + 3014.9618715419774, + 3015.3909069040174, + 3023.935891267741, + 3015.127014674044, + 3017.4419052201106, + 3017.0973057493384 + ], + "oracle": [ + 2876.2106294673736, + 2882.847475213281, + 2872.2025593728386, + 2891.288563523173, + 2878.912151256629, + 2881.2465990315886, + 2892.3477057874106, + 2892.087848743371, + 2869.6406502190453, + 2887.2042886788104, + 2885.7120129121513, + 2884.38136961033, + 2890.4326723541617, + 2874.9896241641686, + 2872.0778187687342, + 2880.5085312427946, + 2883.7507493659214, + 2878.705441549458, + 2871.7439474290986, + 2895.7135116439936, + 2875.7173161171318 + ] + } + }, + { + "routes": 500, + "workload": "method miss", + "iterations": { + "live": 2080, + "oracle": 2063 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 11944.599038461538, + 12023.623076923077, + 11949.295192307693, + 11897.674038461539, + 11966.495673076923, + 12233.759134615384, + 12121.865865384616, + 12123.676442307693, + 12138.23798076923, + 12149.39326923077, + 12173.246153846154, + 12031.21875, + 12021.715384615385, + 12010.790865384615, + 12007.968269230769, + 12034.912980769232, + 11993.233653846153, + 12070.032211538462, + 12190.904326923077, + 12028.757211538461, + 12066.44326923077 + ], + "oracle": [ + 12135.222491517208, + 12081.879301987397, + 12142.837615123606, + 12121.162869607368, + 12158.397479398933, + 12330.428017450315, + 12247.173533688803, + 12267.99321376636, + 12226.174018419777, + 12229.044595249636, + 12252.350460494426, + 12201.848279205042, + 12164.055259331071, + 12193.951526902569, + 12151.782840523509, + 12150.510421715948, + 12234.090644692196, + 12189.959282598158, + 12292.771206980125, + 12142.910324769753, + 12159.043625787688 + ] + } + }, + { + "routes": 500, + "workload": "path miss", + "iterations": { + "live": 1557, + "oracle": 1574 + }, + "orders": [ + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ], + [ + "oracle", + "live" + ], + [ + "live", + "oracle" + ] + ], + "samplesNs": { + "live": [ + 15973.097623635196, + 16034.137443802183, + 15966.720616570328, + 15961.225433526011, + 15999.106615285806, + 18806.839434810532, + 17054.51894669236, + 16131.913294797689, + 16100.988439306358, + 16157.350032113038, + 16423.11753371869, + 16168.932562620425, + 16131.314707771355, + 16077.366088631985, + 18636.299935773925, + 15796.612074502247, + 15887.07835581246, + 15890.154142581889, + 15912.32819524727, + 15889.529865125241, + 15860.020552344251 + ], + "oracle": [ + 15920.367852604828, + 15872.208386277001, + 15829.567344345616, + 15876.612452350699, + 15921.188691232528, + 15885.728081321475, + 16166.193138500636, + 16135.792884371029, + 16013.28081321474, + 16033.668996188057, + 16040.702033036849, + 15993.122617534942, + 15965.942185514612, + 15935.656925031766, + 15777.684879288438, + 15728.099110546378, + 15727.558449809403, + 15762.917407878018, + 15697.533672172809, + 15711.664548919949, + 15754.477128335451 + ] + } + } + ] + } + ] +} diff --git a/bench/baseline/router-ed47836/lookup-summary.txt b/bench/baseline/router-ed47836/lookup-summary.txt new file mode 100644 index 0000000..5f75a02 --- /dev/null +++ b/bench/baseline/router-ed47836/lookup-summary.txt @@ -0,0 +1,44 @@ +| routes | workload | router | median ns/op | run medians (ns) | run spread | +| --- | --- | --- | --- | --- | --- | +| 10 | static hit | live | 185.3 | 156.1 / 187.7 / 174.1 / 194.2 | 20.5% | +| 10 | static hit | oracle | 176.8 | 199.9 / 161.9 / 195.0 / 162.5 | 21.5% | +| 10 | late param hit | live | 328.4 | 311.9 / 336.2 / 323.0 / 342.4 | 9.3% | +| 10 | late param hit | oracle | 337.6 | 343.0 / 329.2 / 356.3 / 324.3 | 9.5% | +| 10 | method miss | live | 800.4 | 762.6 / 801.2 / 798.6 / 804.4 | 5.2% | +| 10 | method miss | oracle | 768.8 | 770.0 / 764.6 / 833.1 / 762.5 | 9.2% | +| 10 | path miss | live | 625.5 | 594.6 / 631.3 / 620.3 / 628.1 | 5.9% | +| 10 | path miss | oracle | 606.6 | 603.8 / 610.1 / 657.9 / 591.5 | 10.9% | +| 100 | static hit | live | 201.2 | 202.2 / 200.8 / 197.6 / 207.2 | 4.8% | +| 100 | static hit | oracle | 206.9 | 211.7 / 196.6 / 213.9 / 201.7 | 8.4% | +| 100 | late param hit | live | 878.0 | 861.1 / 857.0 / 907.3 / 880.5 | 5.7% | +| 100 | late param hit | oracle | 893.0 | 888.7 / 869.0 / 942.1 / 895.2 | 8.2% | +| 100 | method miss | live | 2524.8 | 2424.2 / 2513.7 / 2579.6 / 2531.5 | 6.2% | +| 100 | method miss | oracle | 2515.2 | 2473.4 / 2527.3 / 2595.9 / 2509.5 | 4.9% | +| 100 | path miss | live | 3054.2 | 2965.2 / 3023.7 / 3113.5 / 3070.6 | 4.9% | +| 100 | path miss | oracle | 3075.6 | 3002.5 / 3087.9 / 3179.5 / 3064.3 | 5.8% | +| 500 | static hit | live | 202.2 | 201.8 / 202.3 / 195.1 / 210.3 | 7.5% | +| 500 | static hit | oracle | 206.3 | 212.1 / 197.8 / 213.2 / 201.1 | 7.5% | +| 500 | late param hit | live | 2930.6 | 2829.6 / 2804.3 / 2980.0 / 3016.2 | 7.2% | +| 500 | late param hit | oracle | 2878.8 | 2865.8 / 2832.6 / 2916.8 / 2881.2 | 2.9% | +| 500 | method miss | live | 11903.6 | 11635.5 / 11518.4 / 11946.5 / 12031.2 | 4.3% | +| 500 | method miss | oracle | 12101.5 | 11822.5 / 11856.4 / 12275.6 / 12190.0 | 3.7% | +| 500 | path miss | live | 15513.7 | 15103.4 / 14971.6 / 15664.8 / 16034.1 | 6.8% | +| 500 | path miss | oracle | 15719.6 | 15158.8 / 15479.0 / 16084.0 / 15885.7 | 5.9% | + +| routes | workload | B / A | median ratio | 95% CI | rounds | +| --- | --- | --- | --- | --- | --- | +| 10 | static hit | oracle / live | 0.9507 (-4.9%) | 0.8629 – 1.1186 (-13.7% … +11.9%) | 84 | +| 10 | late param hit | oracle / live | 1.0415 (+4.1%) | 0.9840 – 1.0982 (-1.6% … +9.8%) | 84 | +| 10 | method miss | oracle / live | 0.9809 (-1.9%) | 0.9563 – 1.0076 (-4.4% … +0.8%) | 84 | +| 10 | path miss | oracle / live | 0.9919 (-0.8%) | 0.9676 – 1.0141 (-3.2% … +1.4%) | 84 | +| 100 | static hit | oracle / live | 1.0082 (+0.8%) | 0.9808 – 1.0453 (-1.9% … +4.5%) | 84 | +| 100 | late param hit | oracle / live | 1.0247 (+2.5%) | 1.0192 – 1.0292 (+1.9% … +2.9%) | 84 | +| 100 | method miss | oracle / live | 1.0055 (+0.6%) | 1.0033 – 1.0072 (+0.3% … +0.7%) | 84 | +| 100 | path miss | oracle / live | 1.0165 (+1.7%) | 1.0119 – 1.0185 (+1.2% … +1.9%) | 84 | +| 500 | static hit | oracle / live | 1.0107 (+1.1%) | 0.9782 – 1.0453 (-2.2% … +4.5%) | 84 | +| 500 | late param hit | oracle / live | 0.9838 (-1.6%) | 0.9784 – 1.0076 (-2.2% … +0.8%) | 84 | +| 500 | method miss | oracle / live | 1.0197 (+2.0%) | 1.0161 – 1.0235 (+1.6% … +2.3%) | 84 | +| 500 | path miss | oracle / live | 1.0161 (+1.6%) | 1.0047 – 1.0257 (+0.5% … +2.6%) | 84 | + +load average: start 0.27 0.11 0.04, end 0.79 0.31 0.12; cpuset 6-7,14-15 +raw samples: out/lookup-raw.json diff --git a/bench/lookup.ts b/bench/lookup.ts new file mode 100644 index 0000000..a38d8cb --- /dev/null +++ b/bench/lookup.ts @@ -0,0 +1,356 @@ +/** + * Focused route-lookup benchmark — the D4 instrument for the radix router (FPRD-001 CARD-08/10, #109). + * + * `bench:compare` measures req/s end to end, where lookup is a few percent of a request and drowns + * in socket and pipeline noise. This measures the lookup alone: exactly what `dispatch` in + * `src/http/core.ts` does with an already-normalized path — `resolveRoute`, and on a miss + * `allowedMethods` for the 404/405 decision. Normalization is excluded: CARD-07 does not touch it. + * + * Usage: + * + * npm run bench:lookup + * LOOKUP_ROUTERS="base=/tmp/base/src/http/router.ts,head=src/http/router.ts" npm run bench:lookup + * LOOKUP_ROUTERS="live=src/http/router.ts,oracle=test/router-parity/oracle.ts" npm run bench:lookup # A/A + * + * Each router is a module exporting `resolveRoute` and `allowedMethods` with the `src/http/router.ts` + * signatures. All routers are loaded into the same process and **interleaved**: per cell, every + * router is warmed, then each round takes one sample from each router, alternating which goes first + * (AB, BA, AB, ...). Every router after the first is reported against the first as the median of the + * per-round B/A ratios, with a bootstrap 95% CI. Interleaving puts drift and background load on both + * sides of each ratio instead of on whichever ran later. With one router it reports absolute numbers + * only. Do not edit the generator, the workloads or the defaults between a baseline and its + * comparison: they are the method. + * + * Env: `LOOKUP_ROUTERS` (label=path list, default `live=src/http/router.ts`), `LOOKUP_RUNS` (4 fresh + * processes, import order alternating), `LOOKUP_ROUNDS` (21 per cell per run, minimum 15), `LOOKUP_SAMPLE_MS` (25), + * `LOOKUP_WARMUP_MS` (250 per router per cell), `LOOKUP_OUT` (bench/lookup-results.json). Any other + * `LOOKUP_*` variable (e.g. `LOOKUP_HOST`, `LOOKUP_CPUSET`) is copied into the record as a note. + */ +import { spawn, execFileSync } from 'child_process'; +import { writeFileSync, readFileSync } from 'fs'; +import os from 'os'; +import { dirname, resolve } from 'path'; +import { pathToFileURL } from 'url'; + +const ROUTE_COUNTS = [10, 100, 500]; +const RUNS = Number(process.env.LOOKUP_RUNS ?? 4); +const ROUNDS = Math.max(15, Number(process.env.LOOKUP_ROUNDS ?? 21)); +const BOOTSTRAP = 4000; +const SAMPLE_MS = Number(process.env.LOOKUP_SAMPLE_MS ?? 25); +const WARMUP_MS = Number(process.env.LOOKUP_WARMUP_MS ?? 250); +const OUT = process.env.LOOKUP_OUT ?? 'bench/lookup-results.json'; + +interface Route { + method: string; + pattern: string; + transport: 'buffer'; + handler: () => Promise<{ status: number; headers: Record; body: string }>; +} + +interface RouterModule { + resolveRoute(routes: Route[], method: string, path: string): { def: Route } | undefined; + allowedMethods(routes: Route[], path: string): string[]; +} + +/** Five REST-shaped filler routes per resource, cycled, so every count has statics, params, constraints and catch-alls. */ +const FILLER: Array<(k: number) => [string, string]> = [ + (k) => ['GET', `/res${k}/items`], + (k) => ['POST', `/res${k}/items`], + (k) => ['GET', `/res${k}/items/:id`], + (k) => ['PUT', `/res${k}/items/:id(\\d+)`], + (k) => ['GET', `/res${k}/files/:path*`], +]; + +export const ROUTE_GENERATOR = + 'N total HTTP routes: N-2 fillers (i = 0..N-3, shape FILLER[i % 5] with k = floor(i / 5): GET /res{k}/items, ' + + 'POST /res{k}/items, GET /res{k}/items/:id, PUT /res{k}/items/:id(\\d+), GET /res{k}/files/:path*), then ' + + 'GET /static/target/leaf, then GET /late/:group/:id declared last. All buffer transport.'; + +const handler = async () => ({ status: 200, headers: {}, body: '' }); + +export function buildRoutes(total: number): Route[] { + const fillers = Array.from({ length: total - 2 }, (_, i): Route => { + const [method, pattern] = FILLER[i % FILLER.length](Math.floor(i / FILLER.length)); + return { method, pattern, transport: 'buffer', handler }; + }); + return [ + ...fillers, + { method: 'GET', pattern: '/static/target/leaf', transport: 'buffer', handler }, + { method: 'GET', pattern: '/late/:group/:id', transport: 'buffer', handler }, + ]; +} + +interface Workload { + name: string; + method: string; + path: string; + /** What the lookup must answer; checked before timing, so a broken implementation cannot post a number. */ + expect: string; +} + +export const WORKLOADS: Workload[] = [ + { name: 'static hit', method: 'GET', path: '/static/target/leaf', expect: 'hit /static/target/leaf' }, + { name: 'late param hit', method: 'GET', path: '/late/g1/42', expect: 'hit /late/:group/:id' }, + { name: 'method miss', method: 'DELETE', path: '/static/target/leaf', expect: 'allow GET,HEAD,OPTIONS' }, + { name: 'path miss', method: 'GET', path: '/nowhere/at/all', expect: 'allow ' }, +]; + +/** One lookup, as `dispatch` performs it. Returns a value so the work cannot be optimised away. */ +function lookup(router: RouterModule, routes: Route[], w: Workload): string { + const matched = router.resolveRoute(routes, w.method, w.path); + if (matched) return `hit ${matched.def.pattern}`; + return `allow ${router.allowedMethods(routes, w.path).join(',')}`; +} + +interface Cell { + routes: number; + workload: string; + /** Calibrated per router; a sample is `iterations` lookups. */ + iterations: Record; + /** Round order, e.g. ['live', 'oracle'] then ['oracle', 'live']. */ + orders: string[][]; + /** One entry per router, one sample (ns per lookup) per round, in round order. */ + samplesNs: Record; +} + +type Loaded = Array<{ label: string; router: RouterModule }>; + +let sink = 0; + +function warm(router: RouterModule, routes: Route[], w: Workload): number { + const answer = lookup(router, routes, w); + if (answer !== w.expect) throw new Error(`${w.name} @ ${routes.length}: expected '${w.expect}', got '${answer}'`); + + // Time-boxed; it also calibrates how many iterations make one sample last SAMPLE_MS. + let ops = 0; + const warmStart = process.hrtime.bigint(); + const warmBudget = BigInt(WARMUP_MS * 1_000_000); + while (process.hrtime.bigint() - warmStart < warmBudget) { + for (let i = 0; i < 100; i++) sink += lookup(router, routes, w).length; + ops += 100; + } + const nsPerOp = Number(process.hrtime.bigint() - warmStart) / ops; + return Math.max(100, Math.round((SAMPLE_MS * 1e6) / nsPerOp)); +} + +function sample(router: RouterModule, routes: Route[], w: Workload, iterations: number): number { + const start = process.hrtime.bigint(); + for (let i = 0; i < iterations; i++) sink += lookup(router, routes, w).length; + return Number(process.hrtime.bigint() - start) / iterations; +} + +function measureCell(loaded: Loaded, routes: Route[], w: Workload): Cell { + const iterations: Record = {}; + const samplesNs: Record = {}; + const orders: string[][] = []; + + for (const { label, router } of loaded) { + iterations[label] = warm(router, routes, w); + samplesNs[label] = []; + } + + for (let round = 0; round < ROUNDS; round++) { + const order = round % 2 === 0 ? loaded : [...loaded].reverse(); + orders.push(order.map(({ label }) => label)); + for (const { label, router } of order) samplesNs[label].push(sample(router, routes, w, iterations[label])); + } + + return { routes: routes.length, workload: w.name, iterations, orders, samplesNs }; +} + +async function child(routers: Array<[string, string]>): Promise { + // Import order alternates per run (LOOKUP_IMPORT_REVERSED): which copy V8 sees first can bias an + // in-process comparison of otherwise identical code, and alternating spreads that over both sides. + const imports = process.env.LOOKUP_IMPORT_REVERSED === '1' ? [...routers].reverse() : routers; + const modules = new Map(); + for (const [label, path] of imports) + modules.set(label, (await import(pathToFileURL(resolve(path)).href)) as RouterModule); + const loaded: Loaded = routers.map(([label]) => ({ label, router: modules.get(label)! })); + + const cells: Cell[] = []; + for (const count of ROUTE_COUNTS) { + const routes = buildRoutes(count); + for (const w of WORKLOADS) cells.push(measureCell(loaded, routes, w)); + } + + if (sink === 42) process.stderr.write(''); // keeps `sink` observable + process.stdout.write(`${JSON.stringify({ cells })}\n`); +} + +function runChild(spec: string, importReversed: boolean): Promise<{ cells: Cell[] }> { + return new Promise((resolvePromise, reject) => { + const proc = spawn(process.execPath, ['--import', 'tsx', 'bench/lookup.ts'], { + env: { ...process.env, LOOKUP_CHILD: spec, LOOKUP_IMPORT_REVERSED: importReversed ? '1' : '0' }, + stdio: ['ignore', 'pipe', 'inherit'], + }); + let out = ''; + proc.stdout.on('data', (d) => (out += d)); + proc.on('exit', (code) => + code === 0 ? resolvePromise(JSON.parse(out)) : reject(new Error(`child exited ${code}`)), + ); + }); +} + +const median = (xs: number[]): number => { + const s = [...xs].sort((a, b) => a - b); + const m = s.length >> 1; + return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2; +}; + +/** Deterministic PRNG for the bootstrap, so the same raw samples always give the same interval. */ +function mulberry32(seed: number): () => number { + let state = seed >>> 0; + return () => { + state = (state + 0x6d2b79f5) >>> 0; + let t = state; + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return ((t ^ (t >>> 14)) >>> 0) / 4294967296; + }; +} + +/** Percentile bootstrap 95% CI of the median of `xs`. */ +function bootstrapMedianCi(xs: number[]): [number, number] { + const rng = mulberry32(10908); + const medians: number[] = []; + for (let b = 0; b < BOOTSTRAP; b++) medians.push(median(xs.map(() => xs[Math.floor(rng() * xs.length)]))); + medians.sort((a, b) => a - b); + return [medians[Math.floor(BOOTSTRAP * 0.025)], medians[Math.ceil(BOOTSTRAP * 0.975) - 1]]; +} + +function git(cwd: string, ...args: string[]): string { + try { + return execFileSync('git', ['-C', cwd, ...args], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim(); + } catch { + return 'unavailable'; + } +} + +function cpuset(): string { + for (const file of ['/sys/fs/cgroup/cpuset.cpus.effective', '/sys/fs/cgroup/cpuset/cpuset.effective_cpus']) { + try { + return readFileSync(file, 'utf8').trim(); + } catch { + /* not Linux, or not this cgroup layout */ + } + } + return 'n/a'; +} + +function environment(routers: Array<[string, string]>) { + const pkg = JSON.parse(readFileSync('package.json', 'utf8')) as { name: string; version: string }; + return { + startedAt: new Date().toISOString(), + hostname: os.hostname(), + node: process.version, + v8: process.versions.v8, + platform: `${os.platform()} ${os.release()} ${os.arch()}`, + cpu: os.cpus()[0]?.model, + cpus: os.cpus().length, + cpuset: cpuset(), + memoryBytes: os.totalmem(), + loadavgAtStart: os.loadavg(), + package: `${pkg.name}@${pkg.version}`, + harnessCommit: process.env.LOOKUP_COMMIT ?? git('.', 'rev-parse', 'HEAD'), + routers: routers.map(([label, path]) => ({ label, path })), + env: Object.fromEntries( + Object.entries(process.env).filter(([k]) => k.startsWith('LOOKUP_') || k === 'NODE_OPTIONS'), + ), + method: { + routeCounts: ROUTE_COUNTS, + routeCountMeaning: 'total registered HTTP routes', + routeGenerator: ROUTE_GENERATOR, + workloads: WORKLOADS, + workloadOrder: + 'for each run (fresh process; module import order reversed on even-numbered runs): for count in routeCounts: ' + + 'for workload in workloads: warm every router, ' + + 'then ROUNDS rounds of one sample per router, order alternating AB/BA per round', + operation: 'resolveRoute(routes, method, path); on undefined, allowedMethods(routes, path)', + runs: RUNS, + roundsPerCellPerRun: ROUNDS, + sampleMs: SAMPLE_MS, + warmupMsPerRouterPerCell: WARMUP_MS, + ratio: 'per round, sample(B) / sample(A) with A the first router; median over all rounds of all runs', + ci: `percentile bootstrap of the median ratio, ${BOOTSTRAP} resamples, seed 10908`, + unit: 'ns per lookup (sample time / iterations)', + }, + }; +} + +function summarize(labels: string[], runs: Array<{ run: number; cells: Cell[] }>) { + return ROUTE_COUNTS.flatMap((count) => + WORKLOADS.map((w) => { + const cells = runs.map((r) => r.cells.find((c) => c.routes === count && c.workload === w.name)!); + const routers = labels.map((label) => { + const runMedians = cells.map((c) => median(c.samplesNs[label])); + const med = median(cells.flatMap((c) => c.samplesNs[label])); + return { + router: label, + medianNs: med, + runMediansNs: runMedians, + runSpreadPct: ((Math.max(...runMedians) - Math.min(...runMedians)) / med) * 100, + }; + }); + const ratios = labels.slice(1).map((label) => { + const paired = cells.flatMap((c) => c.samplesNs[label].map((b, i) => b / c.samplesNs[labels[0]][i])); + const [low, high] = bootstrapMedianCi(paired); + return { b: label, a: labels[0], medianRatio: median(paired), ci95: [low, high], rounds: paired.length }; + }); + return { routes: count, workload: w.name, routers, ratios }; + }), + ); +} + +const pct = (ratio: number): string => `${ratio >= 1 ? '+' : ''}${((ratio - 1) * 100).toFixed(1)}%`; + +async function main(): Promise { + const spec = process.env.LOOKUP_CHILD + ? process.env.LOOKUP_CHILD + : (process.env.LOOKUP_ROUTERS ?? 'live=src/http/router.ts'); + const routers = spec.split(',').map((entry) => entry.split('=') as [string, string]); + if (process.env.LOOKUP_CHILD) return child(routers); + + const labels = routers.map(([label]) => label); + const meta = environment(routers); + const runs: Array<{ run: number; importReversed: boolean; cells: Cell[] }> = []; + + for (let run = 0; run < RUNS; run++) { + runs.push({ run: run + 1, importReversed: run % 2 === 1, ...(await runChild(spec, run % 2 === 1)) }); + process.stderr.write(`[lookup] run ${run + 1}/${RUNS} done\n`); + } + + const summary = summarize(labels, runs); + const loadavgAtEnd = os.loadavg(); + writeFileSync(OUT, `${JSON.stringify({ meta: { ...meta, loadavgAtEnd }, summary, runs }, null, 2)}\n`); + + console.log('| routes | workload | router | median ns/op | run medians (ns) | run spread |'); + console.log('| --- | --- | --- | --- | --- | --- |'); + for (const cell of summary) + for (const r of cell.routers) + console.log( + `| ${cell.routes} | ${cell.workload} | ${r.router} | ${r.medianNs.toFixed(1)} | ` + + `${r.runMediansNs.map((n) => n.toFixed(1)).join(' / ')} | ${r.runSpreadPct.toFixed(1)}% |`, + ); + + if (labels.length > 1) { + console.log('\n| routes | workload | B / A | median ratio | 95% CI | rounds |'); + console.log('| --- | --- | --- | --- | --- | --- |'); + for (const cell of summary) + for (const r of cell.ratios) + console.log( + `| ${cell.routes} | ${cell.workload} | ${r.b} / ${r.a} | ${r.medianRatio.toFixed(4)} (${pct(r.medianRatio)}) | ` + + `${r.ci95.map((x) => x.toFixed(4)).join(' – ')} (${pct(r.ci95[0])} … ${pct(r.ci95[1])}) | ${r.rounds} |`, + ); + } + + console.log( + `\nload average: start ${meta.loadavgAtStart.map((n) => n.toFixed(2)).join(' ')}, ` + + `end ${loadavgAtEnd.map((n) => n.toFixed(2)).join(' ')}; cpuset ${meta.cpuset}`, + ); + console.log(`raw samples: ${OUT}`); +} + +main().catch((e) => { + console.error(e); + process.exit(1); +}); diff --git a/package.json b/package.json index 439cf6a..15aba06 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,8 @@ "complexity:cyclomatic": "cyclomatic-complexity \"src/**/*.ts\" -tw 15 -te 25", "bench": "tsx bench/run.ts", "bench:compare": "tsx bench/compare.ts", + "bench:lookup": "tsx bench/lookup.ts", + "parity:mutants": "tsx test/router-parity/mutants.ts", "prepublishOnly": "npm run lint && npm run complexity:check && npm run typecheck && npm test && npm run build", "prepare": "git config core.hooksPath .githooks || true" }, diff --git a/test/bun/router-parity.test.ts b/test/bun/router-parity.test.ts new file mode 100644 index 0000000..28b5e1c --- /dev/null +++ b/test/bun/router-parity.test.ts @@ -0,0 +1,22 @@ +// The frozen router-parity differential under the real Bun runtime: every matcher case (hand-picked, +// owner, generated v1/v2, WS) through the oracle and the live router, and the app.fetch cases, all +// against the same frozen files the Node suite uses. See test/router-parity/README.md. +// +// Run with: npm run test:bun +import 'reflect-metadata'; +import { test, expect } from 'bun:test'; +import { runDifferential } from '../router-parity/differential.ts'; +import { runAppDifferential } from '../router-parity/app-fixture.ts'; + +const load = (name: string) => Bun.file(new URL(`../router-parity/frozen/${name}.json`, import.meta.url)).json(); + +test('router parity on Bun: frozen matcher differential, oracle and live', async () => { + const report = await runDifferential(load); + expect(report.mismatches).toEqual([]); + expect(report.sets.length).toBe(5); +}); + +test('router parity on Bun: app.fetch cases', async () => { + const report = await runAppDifferential(load); + expect(report.mismatches).toEqual([]); +}); diff --git a/test/deno/router-parity.test.ts b/test/deno/router-parity.test.ts new file mode 100644 index 0000000..17e5ca3 --- /dev/null +++ b/test/deno/router-parity.test.ts @@ -0,0 +1,23 @@ +// The frozen router-parity differential under the real Deno runtime: every matcher case (hand-picked, +// owner, generated v1/v2, WS) through the oracle and the live router, and the app.fetch cases, all +// against the same frozen files the Node suite uses. See test/router-parity/README.md. +// +// Run with: npm run test:deno +import 'npm:reflect-metadata'; +import { assertEquals } from 'jsr:@std/assert'; +import { runDifferential } from '../router-parity/differential.ts'; +import { runAppDifferential } from '../router-parity/app-fixture.ts'; + +const load = async (name: string) => + JSON.parse(await Deno.readTextFile(new URL(`../router-parity/frozen/${name}.json`, import.meta.url))); + +Deno.test('router parity on Deno: frozen matcher differential, oracle and live', async () => { + const report = await runDifferential(load); + assertEquals(report.mismatches, []); + assertEquals(report.sets.length, 5); +}); + +Deno.test('router parity on Deno: app.fetch cases', async () => { + const report = await runAppDifferential(load); + assertEquals(report.mismatches, []); +}); diff --git a/test/edge/parity-worker.ts b/test/edge/parity-worker.ts new file mode 100644 index 0000000..68b82dc --- /dev/null +++ b/test/edge/parity-worker.ts @@ -0,0 +1,32 @@ +// Worker entry that runs the frozen router-parity differential inside workerd: every matcher case +// through the oracle and the live router, and the app.fetch cases, against the same frozen files the +// Node suite uses. The frozen JSON is bundled in, since a worker has no file system. Driven by +// test/edge/run.ts; see test/router-parity/README.md. +import { runDifferential } from '../router-parity/differential'; +import { runAppDifferential } from '../router-parity/app-fixture'; +import matcherHand from '../router-parity/frozen/matcher-hand.json'; +import matcherOwner from '../router-parity/frozen/matcher-owner.json'; +import matcherGenerated from '../router-parity/frozen/matcher-generated.json'; +import matcherGeneratedV2 from '../router-parity/frozen/matcher-generated-v2.json'; +import matcherWs from '../router-parity/frozen/matcher-ws.json'; +import appFetch from '../router-parity/frozen/app-fetch.json'; +import ownerAppAllow from '../router-parity/frozen/owner-app-allow.json'; + +const FROZEN: Record = { + 'matcher-hand': matcherHand, + 'matcher-owner': matcherOwner, + 'matcher-generated': matcherGenerated, + 'matcher-generated-v2': matcherGeneratedV2, + 'matcher-ws': matcherWs, + 'app-fetch': appFetch, + 'owner-app-allow': ownerAppAllow, +}; + +export default { + fetch: async (): Promise => { + const load = (name: string) => FROZEN[name]; + const matcher = await runDifferential(load); + const app = await runAppDifferential(load); + return Response.json({ matcher, app }); + }, +}; diff --git a/test/edge/run.ts b/test/edge/run.ts index 681857c..8a523e6 100644 --- a/test/edge/run.ts +++ b/test/edge/run.ts @@ -118,7 +118,9 @@ async function main() { const bad = badRes.webSocket; assert.ok(bad, 'expected a client webSocket on the 101 response'); const closed = new Promise<{ code: number; reason: string }>((resolve) => - bad.addEventListener('close', (e: { code: number; reason: string }) => resolve({ code: e.code, reason: e.reason })), + bad.addEventListener('close', (e: { code: number; reason: string }) => + resolve({ code: e.code, reason: e.reason }), + ), ); bad.accept(); assert.deepEqual(await closed, { code: 1008, reason: 'invalid request path' }); @@ -142,6 +144,57 @@ async function main() { } } +const PARITY_BUNDLE = 'test/edge/_parity-worker.mjs'; + +/** + * The frozen router-parity differential inside workerd (test/router-parity/README.md). Same bundling + * as the main worker; the worker runs every case itself and answers with its mismatch report. + */ +async function parity() { + await build({ + entryPoints: ['test/edge/parity-worker.ts'], + bundle: true, + format: 'esm', + outfile: PARITY_BUNDLE, + platform: 'browser', + target: 'esnext', + external: ['node:*', 'http', 'https'], + alias: { + crypto: 'node:crypto', + stream: 'node:stream', + zlib: 'node:zlib', + buffer: 'node:buffer', + events: 'node:events', + net: 'node:net', + tls: 'node:tls', + util: 'node:util', + }, + }); + + const mf = new Miniflare({ + modules: true, + scriptPath: PARITY_BUNDLE, + compatibilityDate: '2024-11-01', + compatibilityFlags: ['nodejs_compat'], + }); + + try { + const res = await mf.dispatchFetch('http://localhost/'); + const report = (await res.json()) as { + matcher: { sets: Array<{ name: string; requests: number }>; mismatches: string[] }; + app: { requests: number; mismatches: string[] }; + }; + assert.deepEqual(report.matcher.mismatches, [], 'matcher differential mismatches under workerd'); + assert.deepEqual(report.app.mismatches, [], 'app.fetch parity mismatches under workerd'); + const requests = report.matcher.sets.reduce((sum, set) => sum + set.requests, 0); + console.log( + `edge (workerd): router parity — ${requests} matcher cases + ${report.app.requests} app.fetch cases — PASS`, + ); + } finally { + await mf.dispose(); + } +} + /** Opens a ws on `url`, sends `frames`, and resolves with the replies and the close (or none within `ms`). */ async function exchange(mf: Miniflare, url: string, frames: string[], ms = 1000) { const res = await mf.dispatchFetch(url, { headers: { Upgrade: 'websocket' } }); @@ -164,7 +217,9 @@ async function exchange(mf: Miniflare, url: string, frames: string[], ms = 1000) return result; } -main().catch((err) => { - console.error(err); - process.exit(1); -}); +main() + .then(parity) + .catch((err) => { + console.error(err); + process.exit(1); + }); diff --git a/test/router-parity/README.md b/test/router-parity/README.md new file mode 100644 index 0000000..281394b --- /dev/null +++ b/test/router-parity/README.md @@ -0,0 +1,67 @@ +# Router parity corpus (frozen) + +The compatibility baseline for replacing the linear HTTP matcher with a radix index +(FPRD-001 CARD-07/08/09/10, issue #109). Everything here was captured from +`@green-tea/core` at **`ed47836c9820c47bf4ed5e902d91e019abdb110a`** (develop after #117 and #122). + +## The rule + +**The baseline is immutable through CARD-07 review.** If the router change makes a test here fail, +the router changed behaviour. That is a compatibility failure, not a stale fixture. + +A deliberate compatibility change needs its own maintainer approval, recorded on the card, and a +reviewed edit to the specific frozen file, in a commit that says why. Do not edit a golden to make a +test pass, do not edit `oracle.ts` to fit a new implementation, and do not delete a frozen file to +let a capture run recreate it. + +Nothing can regenerate the baseline by accident: + +- `vitest -u` is refused with an error. These are plain JSON files, not vitest snapshots. +- `ROUTER_PARITY_CAPTURE=1` only writes a frozen file that **does not exist**. It never + overwrites. It is how the files were first captured, and how a new fixture gets added later. + +## What is here + +| File | What it freezes | +|---|---| +| `manifest.json` | Existing tests retained unchanged (ROUTER-CORPUS §1), with the verification result at the pinned revision. `manifest.test.ts` fails if a named file or test disappears. | +| `oracle.ts` | Verbatim copy of the pre-radix `matchRoute`, `resolveRoute`, `allowedMethods`, `normalizeRequestPath`, `compilePattern` and `matchWsRoute`. Test-only; `src/` must never import it. | +| `cases.ts`, `generator.ts` | Matcher inputs: 24 hand-picked scenarios (§2), 9 owner-requested scenarios (backtracking, cross-pattern `Allow`, encoded slashes, zero-segment catch-alls), and a fixed-seed generator in two versions, both seed `10908`: `router-parity-gen-v1`, and `router-parity-gen-v2`, which forces static/param/constrained/catch-all siblings under shared prefixes. | +| `branches.ts` | Measures the share of generated requests that walk into sibling branches and backtrack; frozen with the v2 fixture. | +| `frozen/matcher-*.json` | Captured matcher outputs: declaration ID, decoded params, `implicitHead`, ordered `Allow`, or the normalization error. The generated file also stores the seed, the generator rules and every generated input. | +| `frozen/app-*.json` | Status, headers, `Allow` and body through `app.fetch` and through a Node socket, including HEAD body suppression. | +| `frozen/ws-*.json` | WS upgrade selection through `app.upgrade` and the Node listener, plus HTTP requests at the WS paths. | +| `frozen/owner-*.json` | Owner additions needing a running app: cross-pattern `Allow` through both adapters, and the mesh HTTP route table across a peer's lifetime (it is built once at boot and never changes — see `owner.test.ts`). | +| `frozen/boot-*.json` | Boot-time rejections: pattern compilation, local ambiguity, mesh splicing. | +| `frozen/golden-*.json` | `graph()`, `explain()`, `openapi({ title: 'Parity', version: '1' })`, and a mesh teacup before and after `ready()`. | + +## How the comparison works + +`matcher.test.ts` runs every scenario through the oracle **and** through the live +`src/http/router` exports, and requires both to equal the frozen capture. Today the live router is +the linear matcher, so this proves the oracle is a faithful copy. CARD-07 replaces the internals +behind the same exports, and the same test then compares oracle against radix with no edit here. + +Each run builds fresh `RouteDef` objects, so the two implementations never share a cached table, and +the answering route is identified by declaration ID, never by pattern text. + +Application-level, WS, boot and introspection files are compared against the live code only, +because there is no second implementation of `app.fetch` to diff against; the frozen capture plays +the oracle's role. + +### On every runtime + +`differential.ts` and `app-fixture.ts` hold the same comparison with no vitest and no file API, so +it runs unchanged on Deno (`test/deno/router-parity.test.ts`), Bun (`test/bun/router-parity.test.ts`) +and workerd (`test/edge/parity-worker.ts`, driven by `test/edge/run.ts`). Each runtime runs every frozen +matcher case through both the oracle and the live router, plus the `app.fetch` cases from +`app-fetch.json` and `owner-app-allow.json`. The Node-socket, WS-upgrade, boot and mesh files stay +Node-only: they need `http.request`, the `ws` client, or a mesh peer listening on a port. + +### Mutation check + +`npm run parity:mutants` (not part of `npm test`) applies targeted mutants modelling likely radix +bugs to a temporary copy of `src/`, runs this suite against each, and reports which were killed. +`src/` itself is never modified. + +The performance half of the baseline is in `bench/lookup.ts` and `bench/baseline/router-ed47836/`. diff --git a/test/router-parity/app-fixture.ts b/test/router-parity/app-fixture.ts new file mode 100644 index 0000000..d5e2a71 --- /dev/null +++ b/test/router-parity/app-fixture.ts @@ -0,0 +1,241 @@ +/** + * The application-level fetch fixtures, free of vitest and of any runtime API, so the same app and + * requests run through `app.fetch` on Node, Deno, Bun and workerd. `app.test.ts` and + * `owner.test.ts` use them with the frozen files; the runtime runners call {@link runAppDifferential}. + */ +import 'reflect-metadata'; +import { createApp, Route, Get, Head, Post, Put, Patch, Delete, Options, Sse, Module, param } from '../../src/index'; +import type { App } from '../../src/app/types'; +import type { FrozenLoader } from './differential'; + +const reply = (id: string, params: Record) => ({ id, params }); + +// Ordered on purpose: the overlapping declarations are registered least-specific first, so a +// lookup that fell back to registration order would answer differently from one that ranks. +@Route('/') +class ParityHttp { + @Get('/a/:rest*') aRest(@param() p: Record) { + return reply('aRest', p); + } + @Get('/a/:id') aId(@param() p: Record) { + return reply('aId', p); + } + @Get('/a/b') aB(@param() p: Record) { + return reply('aB', p); + } + @Get('/users/:value') usersValue(@param() p: Record) { + return reply('usersValue', p); + } + @Get('/users/:id(\\d+)') usersId(@param() p: Record) { + return reply('usersId', p); + } + @Get('/n/:num(\\d+)') nNum(@param() p: Record) { + return reply('nNum', p); + } + @Get('/n/:code([0-9a-f]+)') nCode(@param() p: Record) { + return reply('nCode', p); + } + @Get('/files') files(@param() p: Record) { + return reply('files', p); + } + @Get('/files/:rest*') filesRest(@param() p: Record) { + return reply('filesRest', p); + } + @Get('/m') mGet(@param() p: Record) { + return reply('mGet', p); + } + @Post('/m') mPost(@param() p: Record) { + return reply('mPost', p); + } + @Get('/h') hGet(@param() p: Record) { + return reply('hGet', p); + } + @Head('/h') hHead(@param() p: Record) { + return reply('hHead', p); + } + @Sse('/stream') stream() { + return (async function* () { + yield { id: 'stream' }; + })(); + } + @Sse('/s/live') sLive() { + return (async function* () { + yield { id: 'sLive' }; + })(); + } + @Get('/s/:id') sId(@param() p: Record) { + return reply('sId', p); + } + @Get('/Case') caseUpper(@param() p: Record) { + return reply('caseUpper', p); + } + @Get('/u/:name') uName(@param() p: Record) { + return reply('uName', p); + } + @Get('/admin') admin(@param() p: Record) { + return reply('admin', p); + } + @Get('/public/:file') publicFile(@param() p: Record) { + return reply('publicFile', p); + } + @Delete('/r') rDelete(@param() p: Record) { + return reply('rDelete', p); + } + @Patch('/r') rPatch(@param() p: Record) { + return reply('rPatch', p); + } + @Options('/r') rOptions(@param() p: Record) { + return reply('rOptions', p); + } + @Put('/r') rPut(@param() p: Record) { + return reply('rPut', p); + } + @Get('/') root(@param() p: Record) { + return reply('root', p); + } +} + +@Module({ mountpoint: '/', controllers: [ParityHttp] }) +export class ParityHttpModule {} + +export type Req = [method: string, raw: string]; + +export const REQUESTS: Req[] = [ + ['GET', '/a/b'], + ['GET', '/a/x'], + ['GET', '/a/x/y'], + ['GET', '/a'], + ['GET', '/users/42'], + ['GET', '/users/alice'], + ['GET', '/users/a%20b'], + ['GET', '/n/42'], + ['GET', '/n/ff'], + ['GET', '/files'], + ['GET', '/files/'], + ['GET', '/files/a%2Fb'], + ['GET', '/m'], + ['HEAD', '/m'], + ['OPTIONS', '/m'], + ['PUT', '/m'], + ['DELETE', '/m'], + ['POST', '/m'], + ['GET', '/h'], + ['HEAD', '/h'], + ['GET', '/stream'], + ['HEAD', '/stream'], + ['OPTIONS', '/stream'], + ['HEAD', '/s/live'], + ['HEAD', '/s/x'], + ['GET', '/absent'], + ['HEAD', '/absent'], + ['OPTIONS', '/absent'], + ['GET', '/users/%E0%A4%A'], + ['HEAD', '/users/%E0%A4%A'], + ['GET', '/a//b'], + ['GET', '/Case'], + ['GET', '/case'], + ['GET', '/caf%C3%A9'], + ['GET', '/u/caf%C3%A9'], + ['GET', '/public/../admin'], + ['GET', '/public/%2e%2e/admin'], + ['GET', '/public/..%2fadmin'], + ['GET', '/admin/'], + ['OPTIONS', '/r'], + ['HEAD', '/r'], + ['GET', '/r'], + ['PURGE', '/r'], // TRACE is a forbidden method for `new Request` + ['GET', '/'], + ['GET', '/?q=1'], +]; + +/** Headers that vary per run or per connection rather than per route decision. */ +const VOLATILE = new Set(['date', 'connection', 'keep-alive', 'x-request-id']); + +export function stableHeaders(entries: Iterable<[string, string]>): Record { + const out: Record = {}; + for (const [name, value] of [...entries].sort(([a], [b]) => a.localeCompare(b))) + if (!VOLATILE.has(name)) out[name] = value; + return out; +} + +export interface Observed { + method: string; + raw: string; + status: number; + headers: Record; + body: string; +} + +export async function viaFetch(app: App, [method, raw]: Req): Promise { + // `new Request` applies the URL parser first — exactly what Deno, Bun and workerd do. + const res = await app.fetch(new Request(`http://parity.test${raw}`, { method })); + return { method, raw, status: res.status, headers: stableHeaders(res.headers), body: await res.text() }; +} + +// `/ca` is GET :id + POST b; `/cb` adds DELETE :rest*. Two prefixes because one app cannot hold both +// variants at the same path. +@Route('/') +class CrossAllow { + @Get('/ca/:id') caGet(@param() p: Record) { + return { id: 'caGet', p }; + } + @Post('/ca/b') caPost() { + return { id: 'caPost' }; + } + @Get('/cb/:id') cbGet(@param() p: Record) { + return { id: 'cbGet', p }; + } + @Post('/cb/b') cbPost() { + return { id: 'cbPost' }; + } + @Delete('/cb/:rest*') cbDelete(@param() p: Record) { + return { id: 'cbDelete', p }; + } +} +@Module({ mountpoint: '/', controllers: [CrossAllow] }) +export class CrossAllowModule {} + +export const ALLOW_REQUESTS: Array<[string, string]> = ['/ca', '/cb'].flatMap((base): Array<[string, string]> => [ + ['PUT', `${base}/b`], + ['OPTIONS', `${base}/b`], + ['PUT', `${base}/x`], + ['HEAD', `${base}/b`], + ['PUT', `${base}/x/y`], +]); + +export interface Seen { + method: string; + path: string; + status: number; + allow: string | null; + body: string; +} + +export async function fetchRequest(app: App, method: string, path: string): Promise { + const res = await app.fetch(new Request(`http://parity.test${path}`, { method })); + return { method, path, status: res.status, allow: res.headers.get('allow'), body: await res.text() }; +} + +/** + * Runs the frozen `app.fetch` cases — `app-fetch.json` and the fetch rows of `owner-app-allow.json` + * — on whatever runtime calls it, and returns every mismatch. + */ +export async function runAppDifferential(load: FrozenLoader): Promise<{ requests: number; mismatches: string[] }> { + const mismatches: string[] = []; + const parity = createApp({ modules: [ParityHttpModule] }); + const appFetch = ((await load('app-fetch')) as { data: Observed[] }).data; + for (const [index, req] of REQUESTS.entries()) { + const seen = await viaFetch(parity, req); + if (JSON.stringify(seen) !== JSON.stringify(appFetch[index])) mismatches.push(`app-fetch ${req[0]} ${req[1]}`); + } + + const cross = createApp({ modules: [CrossAllowModule] }); + const allow = ((await load('owner-app-allow')) as { data: Array }).data; + const fetchRows = allow.filter((row) => row.adapter === 'fetch'); + for (const [index, [method, path]] of ALLOW_REQUESTS.entries()) { + const seen = { adapter: 'fetch', ...(await fetchRequest(cross, method, path)) }; + if (JSON.stringify(seen) !== JSON.stringify(fetchRows[index])) mismatches.push(`owner-app-allow ${method} ${path}`); + } + + return { requests: REQUESTS.length + ALLOW_REQUESTS.length, mismatches }; +} diff --git a/test/router-parity/app.test.ts b/test/router-parity/app.test.ts new file mode 100644 index 0000000..bdfe60a --- /dev/null +++ b/test/router-parity/app.test.ts @@ -0,0 +1,86 @@ +/** + * Application-level router parity: what a client sees through `app.fetch` and through a real Node + * socket — status, `Allow`, response headers, and HEAD body suppression. Matcher equality alone + * cannot prove these: the 404/405/OPTIONS decisions, the 400 for a bad path and the HEAD body rule + * live in `src/http/core.ts`, around the matcher. + */ +import http from 'http'; +import type { AddressInfo } from 'net'; +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { createApp } from '../../src/index'; +import { readFileSync } from 'fs'; +import { join } from 'path'; +import { + ParityHttpModule, + REQUESTS, + runAppDifferential, + stableHeaders, + viaFetch, + type Observed, + type Req, +} from './app-fixture'; +import type { App } from '../../src/app/types'; +import { frozen, expectFrozenEqual } from './frozen'; + +function viaNode(port: number, [method, raw]: Req): Promise { + // `http.request` sends the path bytes as given, so the server sees the raw target. + return new Promise((resolve, reject) => { + const req = http.request({ host: '127.0.0.1', port, method, path: raw, agent: false }, (res) => { + let body = ''; + res.setEncoding('utf8'); + res.on('data', (chunk) => (body += chunk)); + res.on('end', () => { + const headers = Object.entries(res.headers).map(([k, v]): [string, string] => [ + k, + Array.isArray(v) ? v.join(', ') : String(v), + ]); + resolve({ method, raw, status: res.statusCode ?? 0, headers: stableHeaders(headers), body }); + }); + }); + req.on('error', reject); + req.end(); + }); +} + +describe('router parity: application-level HTTP outcomes', () => { + let fetchApp: App; + let nodeApp: App; + let port: number; + + beforeAll(async () => { + fetchApp = createApp({ modules: [ParityHttpModule] }); + nodeApp = createApp({ modules: [ParityHttpModule] }); + const server = await nodeApp.listen(0); + port = (server.address() as AddressInfo).port; + }); + + afterAll(async () => { + await nodeApp.close(); + }); + + it('app.fetch outcomes equal the frozen capture', async () => { + const run = async () => { + const out: Observed[] = []; + for (const req of REQUESTS) out.push(await viaFetch(fetchApp, req)); + return out; + }; + const expected = await frozen('app-fetch', run); + expectFrozenEqual(await run(), expected, 'app.fetch'); + }); + + it('Node listener outcomes equal the frozen capture', async () => { + const run = async () => { + const out: Observed[] = []; + for (const req of REQUESTS) out.push(await viaNode(port, req)); + return out; + }; + const expected = await frozen('app-node', run); + expectFrozenEqual(await run(), expected, 'node listener'); + }); + + it('the runtime-neutral app differential (the one Deno, Bun and workerd run) reports no mismatch', async () => { + const dir = join(__dirname, 'frozen'); + const report = await runAppDifferential((name) => JSON.parse(readFileSync(join(dir, `${name}.json`), 'utf8'))); + expect(report.mismatches).toEqual([]); + }); +}); diff --git a/test/router-parity/boot.test.ts b/test/router-parity/boot.test.ts new file mode 100644 index 0000000..9c15121 --- /dev/null +++ b/test/router-parity/boot.test.ts @@ -0,0 +1,315 @@ +/** + * Boot-time rejection parity: invalid patterns, local ambiguity and mesh route splicing. These are + * not inputs to the differential matcher — a pattern that fails here never reaches a lookup — so + * they are frozen as their own expected-error fixture: the rejection point (pattern compile, app + * construction, mesh `ready()`), the error class and the exact message. + */ +import 'reflect-metadata'; +import type { AddressInfo } from 'net'; +import { describe, it } from 'vitest'; +import { createApp, Route, Get, Post, Sse, Ws, Module, param } from '../../src/index'; +import type { RouteDecorator } from '../../src/metadata'; +import type { Logger } from '../../src/logger'; +import * as live from '../../src/http/router'; +import * as oracle from './oracle'; +import { errorOutcome, type ErrorOutcome } from './matcher'; +import { frozen, expectFrozenEqual } from './frozen'; + +const PATTERNS = [ + '/', + '/users/:id', + '/users/:id(\\d+)', + '/files/:rest*', + '/:rest*', + '/t/', + '/café', + '/build/:version(\\d{2}\\.\\d{1,2})', + '/x/:id/:id', + '/x/:id/:rest*/tail', + '/x/:rest*/:rest*', + '/x/:', + '/x/:1x', + '/x//y', + 'x', + '', + '/x/:id((a+)+)', + '/x/:id((?=a)a)', + '/x/:id(\\1)', + '/x/:id(a|b)', + '/x/:id(\\d+\\w+)', + '/x/:id(\\d{5,2})', + '/x/:id(\\d{1,4096})', + '/x/:id(\\d+', + '/x/:id()', + `/x/:id(${'a'.repeat(129)})`, +]; + +type PatternOutcome = { pattern: string; shape: string } | { pattern: string; error: ErrorOutcome }; + +function compileAll(compile: (pattern: string) => { shape: string }): PatternOutcome[] { + return PATTERNS.map((pattern) => { + try { + return { pattern, shape: compile(pattern).shape }; + } catch (error) { + return { pattern, error: errorOutcome(error) }; + } + }); +} + +type Decl = [decorator: RouteDecorator, path: string]; + +/** One controller per case, its handlers declared in the given order (decorators applied by hand). */ +function moduleWith(decls: Decl[]) { + class ParityBoot {} + decls.forEach(([decorator, path], index) => { + const name = `h${index}`; + Object.defineProperty(ParityBoot.prototype, name, { + value: () => (async function* () {})(), + configurable: true, + }); + decorator(path)(ParityBoot.prototype, name, Object.getOwnPropertyDescriptor(ParityBoot.prototype, name)!); + }); + Route('/')(ParityBoot); + class ParityBootModule {} + Module({ mountpoint: '/', controllers: [ParityBoot] })(ParityBootModule); + return ParityBootModule; +} + +const APP_CASES: Array<{ id: string; decls: Decl[] }> = [ + { id: 'B01-duplicate-param', decls: [[Get, '/x/:id/:id']] }, + { id: 'B02-nonfinal-catch-all', decls: [[Get, '/x/:rest*/tail']] }, + { id: 'B03-nested-quantifier', decls: [[Get, '/x/:id((a+)+)']] }, + { id: 'B04-alternation', decls: [[Get, '/x/:id(a|b)']] }, + { id: 'B05-adjacent-unbounded', decls: [[Get, '/x/:id(\\d+\\w+)']] }, + { id: 'B06-inverted-quantifier', decls: [[Get, '/x/:id(\\d{5,2})']] }, + { id: 'B07-invalid-param-name', decls: [[Get, '/x/:1x']] }, + { id: 'B08-malformed-constraint', decls: [[Get, '/x/:id(\\d+']] }, + { + id: 'B09-same-shape-plain', + decls: [ + [Get, '/users/:id'], + [Get, '/users/:name'], + ], + }, + { + id: 'B10-same-shape-constrained', + decls: [ + [Get, '/c/:a(\\d+)'], + [Get, '/c/:b(\\d+)'], + ], + }, + { + id: 'B11-trailing-slash-twin', + decls: [ + [Get, '/t'], + [Get, '/t/'], + ], + }, + { + id: 'B12-get-and-ws-same-path', + decls: [ + [Get, '/live'], + [Ws, '/live'], + ], + }, + { + id: 'B13-get-and-sse-same-path', + decls: [ + [Get, '/feed'], + [Sse, '/feed'], + ], + }, + { + id: 'B14-ws-same-shape', + decls: [ + [Ws, '/w/:a'], + [Ws, '/w/:b'], + ], + }, + { + id: 'B15-ok-same-shape-different-methods', + decls: [ + [Get, '/users/:id'], + [Post, '/users/:name'], + ], + }, + { + id: 'B16-ok-different-constraints', + decls: [ + [Get, '/c/:a(\\d+)'], + [Get, '/c/:b([a-z]+)'], + ], + }, + { + id: 'B17-ok-static-and-param', + decls: [ + [Get, '/users/me'], + [Get, '/users/:id'], + ], + }, + { + id: 'B18-ok-exact-and-catch-all', + decls: [ + [Get, '/f'], + [Get, '/f/:rest*'], + ], + }, +]; + +const LABELS = new Map([ + [Get, '@Get'], + [Post, '@Post'], + [Sse, '@Sse'], + [Ws, '@Ws'], +]); + +function bootAll() { + return APP_CASES.map(({ id, decls }) => { + const declarations = decls.map(([decorator, path]) => `${LABELS.get(decorator)}('${path}')`); + try { + createApp({ modules: [moduleWith(decls)] }); + return { id, declarations, ok: true }; + } catch (error) { + return { id, declarations, error: errorOutcome(error) }; + } + }); +} + +// ── mesh ──────────────────────────────────────────────────────────────────────────────────────── + +const SECRET = 'parity-secret'; + +@Route('/dup') +class DupCtl { + @Get('/ping', { export: true }) ping() { + return { from: 'teapot' }; + } +} +@Module({ mountpoint: '/api', controllers: [DupCtl] }) +class DupTeapotModule {} + +@Route('/shape') +class ShapeIdCtl { + @Get('/:id', { export: true }) get(@param() p: Record) { + return { from: 'id', p }; + } +} +@Module({ mountpoint: '/api', controllers: [ShapeIdCtl] }) +class ShapeIdTeapotModule {} + +@Route('/shape') +class ShapeNameCtl { + @Get('/:name', { export: true }) get(@param() p: Record) { + return { from: 'name', p }; + } +} +@Module({ mountpoint: '/api', controllers: [ShapeNameCtl] }) +class ShapeNameTeapotModule {} + +// Same method and shape as the teapot's export: the local route wins, with a warning. +@Route('/dup') +class ShadowCtl { + @Get('/ping') local() { + return { from: 'local' }; + } +} +@Module({ mountpoint: '/api', controllers: [ShadowCtl] }) +class ShadowTeacupModule {} + +// A different shape that overlaps the export: no warning, and lookup ranks across local and remote. +@Route('/dup') +class OverlapCtl { + @Get('/:anything') local(@param() p: Record) { + return { from: 'local', p }; + } +} +@Module({ mountpoint: '/api', controllers: [OverlapCtl] }) +class OverlapTeacupModule {} + +@Route('/c') +class PlainCtl { + @Get('/ok') ok() { + return { from: 'teacup' }; + } +} +@Module({ mountpoint: '/', controllers: [PlainCtl] }) +class PlainTeacupModule {} + +type Ctor = new (...args: unknown[]) => unknown; + +function recordingLogger(): { logger: Logger; warnings: string[] } { + const warnings: string[] = []; + const noop = () => {}; + return { logger: { debug: noop, info: noop, error: noop, warn: (m) => warnings.push(m) }, warnings }; +} + +/** Starts one teapot per module and returns their control URLs plus a function that hides the ports. */ +async function teapots(modules: Ctor[]) { + const apps = modules.map((module) => createApp({ modules: [module], experimental: true, mesh: { secret: SECRET } })); + const servers = await Promise.all(apps.map((app) => app.listen(0))); + const urls = servers.map((s) => `ws://127.0.0.1:${(s.address() as AddressInfo).port}/__mesh__/control`); + const anonymize = (text: string) => urls.reduce((out, url, i) => out.split(url).join(``), text); + const close = () => Promise.all(apps.map((app) => app.close())); + return { urls, anonymize, close }; +} + +async function meshCase(id: string, teacupModule: Ctor, teapotModules: Ctor[], requests: string[]) { + const pots = await teapots(teapotModules); + const { logger, warnings } = recordingLogger(); + const teacup = createApp({ + modules: [teacupModule], + experimental: true, + logger, + mesh: { teapots: pots.urls.map((url) => ({ url, secret: SECRET })) }, + }); + + try { + await teacup.ready(); + const responses = []; + for (const path of requests) { + const res = await teacup.fetch(new Request(`http://parity.test${path}`)); + responses.push({ path, status: res.status, body: await res.text() }); + } + const routing = warnings.filter((w) => w.includes('precedence')).map(pots.anonymize); + return { id, ok: true, warnings: routing, responses }; + } catch (error) { + const { name, message } = errorOutcome(error); + return { id, error: { name, message: pots.anonymize(message) } }; + } finally { + await teacup.close(); + await pots.close(); + } +} + +async function meshAll() { + return [ + await meshCase('M01-two-teapots-same-route', PlainTeacupModule, [DupTeapotModule, DupTeapotModule], []), + await meshCase('M02-two-teapots-same-shape', PlainTeacupModule, [ShapeIdTeapotModule, ShapeNameTeapotModule], []), + await meshCase('M03-local-same-shape-wins', ShadowTeacupModule, [DupTeapotModule], ['/api/dup/ping']), + await meshCase('M04-unique-remote', PlainTeacupModule, [DupTeapotModule], ['/api/dup/ping', '/c/ok', '/api/nope']), + await meshCase( + 'M05-remote-static-outranks-local-param', + OverlapTeacupModule, + [DupTeapotModule], + ['/api/dup/ping', '/api/dup/x'], + ), + ]; +} + +describe('router parity: boot-time rejection', () => { + it('pattern compilation (oracle and live compilePattern) equals the frozen capture', async () => { + const expected = await frozen('boot-patterns', () => compileAll(live.compilePattern)); + expectFrozenEqual(compileAll(oracle.compilePattern), expected, 'oracle compilePattern'); + expectFrozenEqual(compileAll(live.compilePattern), expected, 'live compilePattern'); + }); + + it('createApp route-table validation equals the frozen capture', async () => { + const expected = await frozen('boot-app', bootAll); + expectFrozenEqual(bootAll(), expected, 'createApp'); + }); + + it('mesh route splicing equals the frozen capture', async () => { + const expected = await frozen('boot-mesh', meshAll); + expectFrozenEqual(await meshAll(), expected, 'mesh splice'); + }, 30_000); +}); diff --git a/test/router-parity/branches.ts b/test/router-parity/branches.ts new file mode 100644 index 0000000..89a2df7 --- /dev/null +++ b/test/router-parity/branches.ts @@ -0,0 +1,94 @@ +/** + * Measures how much of a corpus exercises sibling branches, so "the generator covers backtracking" + * is a number rather than a hope. Method-agnostic: a tree is walked by path before a method is + * chosen, so any declaration that shares the walk counts. + * + * - sibling hit: two declarations both match the request's leading segments through a segment + * where their patterns differ — the lookup has two branches to choose between at that point. + * - backtrack: a sibling hit where at least one of those declarations then fails to match the + * whole path — a branch the lookup walks into and has to leave. + */ +import { compilePattern, normalizeRequestPath, type CompiledSegment } from './oracle'; +import type { Scenario } from './matcher'; + +function segmentMatches(segment: CompiledSegment, value: string): boolean { + if (segment.kind === 'static') return segment.value === value; + if (segment.kind === 'catchAll') return true; + const decoded = value.includes('%') ? decodeURIComponent(value) : value; + return !segment.constraint || segment.constraint.test(decoded); +} + +/** Leading segments matched, and whether the whole path matched. */ +function walk(pattern: string, segs: string[]): { depth: number; full: boolean } { + const { segments } = compilePattern(pattern); + for (let i = 0; i < segments.length; i++) { + if (segments[i].kind === 'catchAll') return { depth: segments.length, full: true }; + if (i >= segs.length || !segmentMatches(segments[i], segs[i])) return { depth: i, full: false }; + } + return { depth: segments.length, full: segments.length === segs.length }; +} + +const sameSegment = (a: CompiledSegment, b: CompiledSegment): boolean => + JSON.stringify({ ...a, constraint: undefined }) === JSON.stringify({ ...b, constraint: undefined }); + +export interface BranchStats { + requests: number; + validPaths: number; + siblingHits: number; + backtracks: number; + siblingShare: string; + backtrackShare: string; +} + +export function branchStats(scenarios: Scenario[]): BranchStats { + let requests = 0; + let validPaths = 0; + let siblingHits = 0; + let backtracks = 0; + + for (const scenario of scenarios) { + const patterns = [...new Set(scenario.declarations.map((d) => d.pattern))]; + + for (const { raw } of scenario.requests) { + requests++; + let path: string; + try { + path = normalizeRequestPath(raw); + } catch { + continue; + } + validPaths++; + + const segs = path.split('/').filter(Boolean); + const walks = patterns.map((pattern) => ({ segments: compilePattern(pattern).segments, ...walk(pattern, segs) })); + let sibling = false; + let backtrack = false; + + for (let i = 0; i < walks.length; i++) { + for (let j = i + 1; j < walks.length; j++) { + const [a, b] = [walks[i], walks[j]]; + const shared = Math.min(a.depth, b.depth, a.segments.length, b.segments.length); + const diverge = Array.from({ length: shared }, (_, d) => d).find( + (d) => !sameSegment(a.segments[d], b.segments[d]), + ); + if (diverge === undefined) continue; + sibling = true; + if (!a.full || !b.full) backtrack = true; + } + } + + if (sibling) siblingHits++; + if (backtrack) backtracks++; + } + } + + const pct = (n: number) => `${((n / requests) * 100).toFixed(1)}%`; + return { + requests, + validPaths, + siblingHits, + backtracks, + siblingShare: pct(siblingHits), + backtrackShare: pct(backtracks), + }; +} diff --git a/test/router-parity/cases.ts b/test/router-parity/cases.ts new file mode 100644 index 0000000..bae434b --- /dev/null +++ b/test/router-parity/cases.ts @@ -0,0 +1,342 @@ +/** + * Hand-picked matcher scenarios (ROUTER-CORPUS §2). Declaration IDs are stable across a scenario + * and its reversed twin, so a reversed run is compared by which declaration answered, not by which + * pattern text happens to sit first. + * + * Inputs only. The expected outputs live in `frozen/matcher-hand.json`, captured from the pinned + * revision; nothing in this file states what the answer should be. + */ +import type { Declaration, Request, Scenario, Transport } from './matcher'; + +type Decl = [id: string, method: string, pattern: string, transport?: Transport]; +type Req = [method: string, raw: string]; + +function scenario(id: string, note: string, decls: Decl[], reqs: Req[]): Scenario { + const declarations = decls.map(([declId, method, pattern, transport = 'buffer']): Declaration => ({ + id: declId, + method, + pattern, + transport, + })); + const requests = reqs.map(([method, raw]): Request => ({ method, raw })); + return { id, note, declarations, requests }; +} + +/** The same scenario with its declarations in reverse registration order. */ +function reversed(base: Scenario, id: string): Scenario { + return { ...base, id, note: `${base.note} (declarations reversed)`, declarations: [...base.declarations].reverse() }; +} + +const get = (...paths: string[]): Req[] => paths.map((path): Req => ['GET', path]); +const methods = (path: string, ...verbs: string[]): Req[] => verbs.map((verb): Req => [verb, path]); + +const rank = scenario( + 'H01-rank', + 'static beats plain param beats catch-all', + [ + ['catchAll', 'GET', '/a/:rest*'], + ['param', 'GET', '/a/:id'], + ['static', 'GET', '/a/b'], + ], + [...get('/a/b', '/a/x', '/a/x/y', '/a', '/a/'), ['HEAD', '/a/x'], ['OPTIONS', '/a/b'], ['POST', '/a/b']], +); + +const constraint = scenario( + 'H03-constraint', + 'constrained param beats plain param; constraint tested against the decoded segment', + [ + ['plain', 'GET', '/users/:value'], + ['digits', 'GET', '/users/:id(\\d+)'], + ], + get('/users/42', '/users/alice', '/users/42x', '/users/%34%32', '/users/'), +); + +const constraintTie = scenario( + 'H05-constraint-tie', + 'two overlapping constraints of equal rank: registration order decides', + [ + ['digits', 'GET', '/n/:num(\\d+)'], + ['hex', 'GET', '/n/:code([0-9a-f]+)'], + ], + get('/n/42', '/n/ff', '/n/4f', '/n/zz'), +); + +const equalRank = scenario( + 'H08-equal-rank', + 'equal-specificity plain params: first registered wins', + [ + ['first', 'GET', '/t/:first'], + ['second', 'GET', '/t/:second'], + ], + [...get('/t/x', '/t/x/y'), ['HEAD', '/t/x']], +); + +const samePattern = scenario( + 'H10-same-pattern', + 'identical pattern text under two declaration IDs (mesh local/remote twins reach the matcher this way)', + [ + ['one', 'GET', '/same'], + ['two', 'GET', '/same'], + ], + [...get('/same'), ['HEAD', '/same'], ['OPTIONS', '/same']], +); + +export const HAND_SCENARIOS: Scenario[] = [ + rank, + reversed(rank, 'H02-rank-reversed'), + constraint, + reversed(constraint, 'H04-constraint-reversed'), + constraintTie, + reversed(constraintTie, 'H06-constraint-tie-reversed'), + scenario( + 'H07-exact-vs-catch-all', + 'exact route at /files, catch-all below it, decoded captures', + [ + ['exact', 'GET', '/files'], + ['rest', 'GET', '/files/:rest*'], + ], + [...get('/files', '/files/', '/files/a%2Fb', '/files/a/b/c', '/files/a%20b/c%2Fd'), ['HEAD', '/files/x']], + ), + equalRank, + reversed(equalRank, 'H09-equal-rank-reversed'), + samePattern, + reversed(samePattern, 'H11-same-pattern-reversed'), + scenario( + 'H12-method-implicit-head', + 'buffered GET supplies HEAD; OPTIONS and 405 share one canonical Allow', + [ + ['get', 'GET', '/m'], + ['post', 'POST', '/m'], + ], + methods('/m', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'DELETE', 'PATCH'), + ), + scenario( + 'H13-method-explicit-head', + 'an explicit HEAD wins over the buffered-GET fallback', + [ + ['get', 'GET', '/m'], + ['post', 'POST', '/m'], + ['head', 'HEAD', '/m'], + ], + methods('/m', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'DELETE'), + ), + scenario( + 'H14-streaming-head', + 'a streaming GET does not supply HEAD', + [['stream', 'GET', '/stream', 'sse']], + methods('/stream', 'GET', 'HEAD', 'OPTIONS', 'POST'), + ), + scenario( + 'H15-streaming-outranks-buffered', + 'HEAD skips a higher-ranked streaming GET and falls back to a lower-ranked buffered GET', + [ + ['live', 'GET', '/s/live', 'sse'], + ['byId', 'GET', '/s/:id'], + ], + [...methods('/s/live', 'GET', 'HEAD', 'OPTIONS'), ['HEAD', '/s/x']], + ), + scenario( + 'H16-negotiate-and-ndjson-head', + 'negotiate and ndjson GETs are streaming transports for the HEAD rule', + [ + ['negotiate', 'GET', '/neg', 'negotiate'], + ['ndjson', 'GET', '/nd', 'ndjson'], + ], + [...methods('/neg', 'GET', 'HEAD', 'OPTIONS'), ...methods('/nd', 'HEAD', 'OPTIONS')], + ), + scenario( + 'H17-allow-order', + 'Allow is canonical regardless of declaration order; explicit OPTIONS is a normal route', + [ + ['delete', 'DELETE', '/r'], + ['patch', 'PATCH', '/r'], + ['options', 'OPTIONS', '/r'], + ['put', 'PUT', '/r'], + ['get', 'GET', '/r', 'sse'], + ['post', 'POST', '/r'], + ], + methods('/r', 'OPTIONS', 'HEAD', 'GET', 'TRACE', 'POST'), + ), + scenario( + 'H18-path-miss', + 'a path no pattern matches: no route and an empty Allow', + [['a', 'GET', '/a']], + [...get('/absent', '/a/extra', '/'), ['OPTIONS', '/absent'], ['HEAD', '/absent']], + ), + scenario( + 'H19-encoding-case-unicode', + 'decoded params, malformed escapes, repeated slashes, exact case and Unicode literals', + [ + ['userId', 'GET', '/users/:id'], + ['upper', 'GET', '/Case'], + ['unicode', 'GET', '/café'], + ['unicodeParam', 'GET', '/u/:name'], + ], + get( + '/users/a%20b', + '/users/a+b', + '/users/%F0%9F%8D%B5', + '/users/%E0%A4%A', + '/users/%zz', + '/a//b', + '/users//x', + '/Case', + '/case', + '/CASE', + '/café', + '/caf%C3%A9', + '/u/caf%C3%A9', + '/u/café', + ), + ), + scenario( + 'H20-normalization', + 'one trailing slash removed; plain and encoded dot segments resolved before lookup', + [ + ['a', 'GET', '/a'], + ['admin', 'GET', '/admin'], + ['file', 'GET', '/public/:file'], + ], + get( + '/a/', + '/a//', + '/public/../admin', + '/public/%2e%2e/admin', + '/public/%2E%2E/admin', + '/public/./x', + '/a/.', + '/public/..%2fadmin', + '/..', + '/a/b/../../admin', + '', + 'a', + ), + ), + scenario( + 'H21-root', + 'the root pattern and a root catch-all', + [ + ['any', 'GET', '/:rest*'], + ['root', 'GET', '/'], + ], + get('/', '/x', '/x/y', '/x/'), + ), + scenario( + 'H22-first-differing-segment', + 'ranking is decided at the first segment whose kind differs', + [ + ['paramStatic', 'GET', '/a/:x/c'], + ['staticParam', 'GET', '/a/b/:y'], + ['paramConstrained', 'GET', '/a/:x/:y(\\d+)'], + ], + get('/a/b/c', '/a/z/c', '/a/z/5', '/a/b/5', '/a/z/q'), + ), + scenario( + 'H23-per-position-decode', + 'a decoded value is the same for every candidate the scan reaches', + [ + ['zzz', 'GET', '/a/:x/zzz'], + ['b', 'GET', '/a/:y/b'], + ], + get('/a/a%20b/b', '/a/a%20b/zzz'), + ), + scenario( + 'H24-constrained-catch-all', + 'two catch-alls ranked by the segments before them', + [ + ['named', 'GET', '/v/:name/:rest*'], + ['versioned', 'GET', '/v/:ver(\\d+)/:rest*'], + ], + get('/v/1/x', '/v/a/x', '/v/1', '/v'), + ), +]; + +/** + * Owner-requested additions (CARD-08 review), frozen separately in `frozen/matcher-owner.json` so the + * first capture stays untouched. Inputs only, like everything above. + */ +export const OWNER_SCENARIOS: Scenario[] = [ + scenario( + 'O01-backtrack', + 'a static branch that fails one level down must fall back to a sibling param branch', + [ + ['static', 'GET', '/a/b/c'], + ['param', 'GET', '/a/:x/d'], + ], + get('/a/b/d', '/a/b/c', '/a/z/d', '/a/b/x'), + ), + scenario( + 'O02-backtrack-deep', + 'the static branch fails at depth 5 (and a param branch at depth 3), after walking four or two levels', + [ + ['static', 'GET', '/p/q/r/s/t'], + ['paramDepth2', 'GET', '/p/:x/r/s/u'], + ['paramDepth3', 'GET', '/p/q/:y/s/v'], + ], + get('/p/q/r/s/u', '/p/q/r/s/t', '/p/z/r/s/u', '/p/q/r/s/v', '/p/q/z/s/v', '/p/q/r/s/w'), + ), + scenario( + 'O03-backtrack-constrained', + 'the fallback branch is a constrained param', + [ + ['static', 'GET', '/k/1/c'], + ['digits', 'GET', '/k/:n(\\d+)/d'], + ], + get('/k/1/d', '/k/1/c', '/k/2/d', '/k/x/d'), + ), + scenario( + 'O04-cross-pattern-allow', + 'Allow is the union of methods across different patterns matching the same path', + [ + ['getParam', 'GET', '/a/:id'], + ['postStatic', 'POST', '/a/b'], + ], + [ + ['PUT', '/a/b'], + ['OPTIONS', '/a/b'], + ['PUT', '/a/x'], + ['HEAD', '/a/b'], + ['GET', '/a/b'], + ['POST', '/a/x'], + ], + ), + scenario( + 'O05-cross-pattern-allow-catch-all', + 'the same, with a catch-all contributing a method', + [ + ['getParam', 'GET', '/a/:id'], + ['postStatic', 'POST', '/a/b'], + ['deleteRest', 'DELETE', '/a/:rest*'], + ], + [ + ['PUT', '/a/b'], + ['OPTIONS', '/a/b'], + ['PUT', '/a/x'], + ['HEAD', '/a/b'], + ['PUT', '/a/x/y'], + ['DELETE', '/a'], + ], + ), + scenario( + 'O06-encoded-slash-plain', + 'an encoded slash inside one segment, plain param', + [['userId', 'GET', '/users/:id']], + get('/users/a%2Fb', '/users/a%2fb', '/users/%2F', '/users/a/b'), + ), + scenario( + 'O07-encoded-slash-constrained', + 'an encoded slash against a word constraint and a non-space constraint (a / cannot appear inside a constraint: the pattern splits there)', + [ + ['word', 'GET', '/c/:id(\\w+)'], + ['nonSpace', 'GET', '/d/:id(\\S+)'], + ], + get('/c/a%2Fb', '/c/ab', '/d/a%2Fb', '/d/a%2fb', '/d/%2F', '/d/a/b'), + ), + scenario( + 'O08-zero-segment-catch-all', + 'a catch-all with no exact sibling route', + [['rest', 'GET', '/files/:rest*']], + [...get('/files', '/files/', '/files/a', '/filesx'), ['HEAD', '/files'], ['OPTIONS', '/files']], + ), + scenario('O09-root-catch-all', 'a root catch-all alone', [['rest', 'GET', '/:rest*']], get('/', '/a', '/a/b/')), +]; diff --git a/test/router-parity/differential.ts b/test/router-parity/differential.ts new file mode 100644 index 0000000..07aa004 --- /dev/null +++ b/test/router-parity/differential.ts @@ -0,0 +1,124 @@ +/** + * The frozen matcher differential, free of vitest and of any runtime's file API, so the same + * comparison runs on Node (vitest), Deno, Bun and workerd. Each runtime passes a loader that + * returns a frozen file's parsed JSON. + * + * It compares exactly what `matcher.test.ts` compares — regenerated inputs, oracle outputs and live + * outputs against the frozen capture, key and array order included — and returns mismatches instead + * of throwing, so a runner can report them all. + */ +import * as live from '../../src/http/router'; +import { matchWsRoute as liveMatchWsRoute } from '../../src/http/ws-core'; +import type { WsRouteDef } from '../../src/http/types'; +import * as oracle from './oracle'; +import { runScenario, type MatcherImpl, type Outcome, type Scenario } from './matcher'; +import { HAND_SCENARIOS, OWNER_SCENARIOS } from './cases'; +import { generateScenarios, generateScenariosV2, GENERATOR_SEED } from './generator'; + +export type FrozenLoader = (name: string) => unknown | Promise; + +interface CapturedScenario extends Scenario { + outcomes: Outcome[]; +} + +// ── WebSocket matcher cases (first registered wins) ───────────────────────────────────────────── + +type WsDecl = WsRouteDef & { id: string }; +export type WsMatcher = ( + routes: WsRouteDef[], + path: string, +) => { def: WsRouteDef; params: Record | undefined } | undefined; + +const ws = (id: string, pattern: string): WsDecl => ({ id, pattern, open: async () => (async function* () {})() }); +const overlap = [ws('param', '/ws/:id'), ws('static', '/ws/static'), ws('rest', '/ws/:rest*')]; +const WS_SCENARIOS = [ + { id: 'W01-overlap', routes: overlap }, + { id: 'W02-overlap-reversed', routes: [...overlap].reverse() }, + { id: 'W03-catch-all-first', routes: [ws('rest', '/w/:rest*'), ws('exact', '/w')] }, +]; +// Fed already normalized, as both upgrade adapters do since #117. +const WS_PATHS = ['/ws/static', '/ws/x', '/ws/a%20b', '/ws', '/ws/x/y', '/w', '/w/a%2Fb/c', '/nope']; + +export function runWsMatcher(matchWs: WsMatcher) { + return WS_SCENARIOS.map(({ id, routes }) => ({ + id, + declarations: routes.map((route) => ({ id: route.id, pattern: route.pattern })), + outcomes: WS_PATHS.map((path) => { + const hit = matchWs(routes, path); + return { path, route: hit ? { id: (hit.def as WsDecl).id, params: hit.params } : null }; + }), + })); +} + +export const LIVE_WS_MATCHER: WsMatcher = liveMatchWsRoute; +export const ORACLE_WS_MATCHER: WsMatcher = oracle.matchWsRoute; + +// ── the comparison ────────────────────────────────────────────────────────────────────────────── + +const same = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b); +const plain = (value: unknown): unknown => JSON.parse(JSON.stringify(value)); + +export interface DifferentialReport { + sets: Array<{ name: string; scenarios: number; requests: number }>; + mismatches: string[]; +} + +const SETS: Array<{ name: string; scenarios: () => Scenario[]; inFile: (data: any) => CapturedScenario[] }> = [ + { name: 'matcher-hand', scenarios: () => HAND_SCENARIOS, inFile: (data) => data }, + { name: 'matcher-owner', scenarios: () => OWNER_SCENARIOS, inFile: (data) => data }, + { name: 'matcher-generated', scenarios: () => generateScenarios(GENERATOR_SEED), inFile: (data) => data.scenarios }, + { + name: 'matcher-generated-v2', + scenarios: () => generateScenariosV2(GENERATOR_SEED), + inFile: (data) => data.scenarios, + }, +]; + +function compareSet(name: string, scenarios: Scenario[], expected: CapturedScenario[], mismatches: string[]): number { + const byId = new Map(expected.map((scenario) => [scenario.id, scenario])); + if ( + !same( + expected.map((s) => s.id), + scenarios.map((s) => s.id), + ) + ) + mismatches.push(`${name}: scenario ids differ from the frozen file`); + + let requests = 0; + for (const scenario of scenarios) { + const frozen = byId.get(scenario.id); + if (!frozen) continue; + const { outcomes, ...inputs } = frozen; + requests += scenario.requests.length; + if (!same(plain(scenario), inputs)) mismatches.push(`${name} ${scenario.id}: inputs`); + const impls: Array<[string, MatcherImpl]> = [ + ['oracle', oracle], + ['live', live], + ]; + for (const [label, impl] of impls) + if (!same(plain(runScenario(impl, scenario)), outcomes)) mismatches.push(`${name} ${scenario.id}: ${label}`); + } + return requests; +} + +export async function runDifferential(load: FrozenLoader): Promise { + const mismatches: string[] = []; + const sets: DifferentialReport['sets'] = []; + + for (const set of SETS) { + const scenarios = set.scenarios(); + const file = (await load(set.name)) as { data: unknown }; + const requests = compareSet(set.name, scenarios, set.inFile(file.data), mismatches); + sets.push({ name: set.name, scenarios: scenarios.length, requests }); + } + + const wsFile = (await load('matcher-ws')) as { data: unknown }; + for (const [label, matcher] of [ + ['oracle', ORACLE_WS_MATCHER], + ['live', LIVE_WS_MATCHER], + ] as const) + if (!same(plain(runWsMatcher(matcher)), wsFile.data)) mismatches.push(`matcher-ws: ${label}`); + sets.push({ name: 'matcher-ws', scenarios: WS_SCENARIOS.length, requests: WS_SCENARIOS.length * WS_PATHS.length }); + + return { sets, mismatches }; +} diff --git a/test/router-parity/frozen.ts b/test/router-parity/frozen.ts new file mode 100644 index 0000000..0ab4450 --- /dev/null +++ b/test/router-parity/frozen.ts @@ -0,0 +1,69 @@ +/** + * Reads the frozen router-parity baseline. Read README.md in this directory before touching it. + * + * Every expected output under `frozen/` was captured from the pinned revision below, by running + * these tests with `ROUTER_PARITY_CAPTURE=1` while the file did not exist yet. Nothing here ever + * overwrites a file: a capture only fills a gap, and `vitest -u` is refused outright, because a + * baseline that a flag can rewrite is a baseline a new implementation can quietly move. + */ +import { existsSync, readFileSync, writeFileSync } from 'fs'; +import { join } from 'path'; +import { expect } from 'vitest'; + +/** The `@green-tea/core` commit every frozen output was captured from (develop after #117 and #122). */ +export const PINNED_REVISION = 'ed47836c9820c47bf4ed5e902d91e019abdb110a'; + +const FROZEN_DIR = join(__dirname, 'frozen'); + +interface FrozenFile { + revision: string; + data: T; +} + +function refuseSnapshotUpdate(name: string): void { + // `_updateSnapshot` is vitest's private record of `-u` ('all') versus a normal run ('new'/'none'). + const state = expect.getState().snapshotState as unknown as { _updateSnapshot?: string } | undefined; + if (state?._updateSnapshot !== 'all') return; + + throw new Error( + `router-parity: '${name}' is a frozen baseline captured at ${PINNED_REVISION} and is never ` + + 'rewritten by `vitest -u`. A behaviour difference against it is a compatibility failure. ' + + 'If the change is deliberate, it needs its own maintainer approval and a reviewed edit of ' + + `test/router-parity/frozen/${name}.json — see test/router-parity/README.md.`, + ); +} + +/** + * Returns the frozen data for `name`. When the file is missing it fails, unless + * `ROUTER_PARITY_CAPTURE=1` is set, in which case `capture()` runs against the current code and its + * result is written. An existing file is never replaced. + */ +export async function frozen(name: string, capture: () => T | Promise): Promise { + refuseSnapshotUpdate(name); + const file = join(FROZEN_DIR, `${name}.json`); + + if (!existsSync(file)) { + if (process.env.ROUTER_PARITY_CAPTURE !== '1') + throw new Error( + `router-parity: frozen file ${file} is missing — the baseline cannot be regenerated by a test run`, + ); + const data = JSON.parse(JSON.stringify(await capture())) as T; + const record: FrozenFile = { revision: PINNED_REVISION, data }; + writeFileSync(file, `${JSON.stringify(record, null, 2)}\n`); + return data; + } + + const record = JSON.parse(readFileSync(file, 'utf8')) as FrozenFile; + expect(record.revision, `${name}.json was captured from a different revision`).toBe(PINNED_REVISION); + return record.data; +} + +/** + * Structural equality that also holds array order and object key order. `toEqual` alone ignores key + * order, which is observable in `openapi().paths` and in serialized introspection output. + */ +export function expectFrozenEqual(actual: unknown, expected: unknown, label: string): void { + const plain = JSON.parse(JSON.stringify(actual)); + expect(plain, label).toEqual(expected); + expect(JSON.stringify(plain), `${label} (key and array order)`).toBe(JSON.stringify(expected)); +} diff --git a/test/router-parity/frozen/app-fetch.json b/test/router-parity/frozen/app-fetch.json new file mode 100644 index 0000000..5cf4fa5 --- /dev/null +++ b/test/router-parity/frozen/app-fetch.json @@ -0,0 +1,597 @@ +{ + "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\":{}}" + } + ] +} diff --git a/test/router-parity/frozen/app-node.json b/test/router-parity/frozen/app-node.json new file mode 100644 index 0000000..9925087 --- /dev/null +++ b/test/router-parity/frozen/app-node.json @@ -0,0 +1,632 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "method": "GET", + "raw": "/a/b", + "status": 200, + "headers": { + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "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", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"id\":\"root\",\"params\":{}}" + } + ] +} diff --git a/test/router-parity/frozen/boot-app.json b/test/router-parity/frozen/boot-app.json new file mode 100644 index 0000000..64d500d --- /dev/null +++ b/test/router-parity/frozen/boot-app.json @@ -0,0 +1,183 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "id": "B01-duplicate-param", + "declarations": [ + "@Get('/x/:id/:id')" + ], + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:id/:id': duplicate parameter 'id'" + } + }, + { + "id": "B02-nonfinal-catch-all", + "declarations": [ + "@Get('/x/:rest*/tail')" + ], + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:rest*/tail': catch-all must be the final segment" + } + }, + { + "id": "B03-nested-quantifier", + "declarations": [ + "@Get('/x/:id((a+)+)')" + ], + "error": { + "name": "Error", + "message": "unsafe route constraint: unsupported expression '(a+)+'" + } + }, + { + "id": "B04-alternation", + "declarations": [ + "@Get('/x/:id(a|b)')" + ], + "error": { + "name": "Error", + "message": "unsafe route constraint: unsupported expression 'a|b'" + } + }, + { + "id": "B05-adjacent-unbounded", + "declarations": [ + "@Get('/x/:id(\\d+\\w+)')" + ], + "error": { + "name": "Error", + "message": "unsafe route constraint: adjacent unbounded quantifiers in '\\d+\\w+'" + } + }, + { + "id": "B06-inverted-quantifier", + "declarations": [ + "@Get('/x/:id(\\d{5,2})')" + ], + "error": { + "name": "Error", + "message": "unsafe route constraint: invalid quantifier '{5,2}'" + } + }, + { + "id": "B07-invalid-param-name", + "declarations": [ + "@Get('/x/:1x')" + ], + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:1x': invalid parameter name '1x'" + } + }, + { + "id": "B08-malformed-constraint", + "declarations": [ + "@Get('/x/:id(\\d+')" + ], + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:id(\\d+': malformed constraint" + } + }, + { + "id": "B09-same-shape-plain", + "declarations": [ + "@Get('/users/:id')", + "@Get('/users/:name')" + ], + "error": { + "name": "Error", + "message": "ambiguous route GET /users/:name at ParityBoot.h1 conflicts with GET /users/:id at ParityBoot.h0" + } + }, + { + "id": "B10-same-shape-constrained", + "declarations": [ + "@Get('/c/:a(\\d+)')", + "@Get('/c/:b(\\d+)')" + ], + "error": { + "name": "Error", + "message": "ambiguous route GET /c/:b(\\d+) at ParityBoot.h1 conflicts with GET /c/:a(\\d+) at ParityBoot.h0" + } + }, + { + "id": "B11-trailing-slash-twin", + "declarations": [ + "@Get('/t')", + "@Get('/t/')" + ], + "error": { + "name": "Error", + "message": "ambiguous route GET /t/ at ParityBoot.h1 conflicts with GET /t at ParityBoot.h0" + } + }, + { + "id": "B12-get-and-ws-same-path", + "declarations": [ + "@Get('/live')", + "@Ws('/live')" + ], + "error": { + "name": "Error", + "message": "ambiguous route GET /live at ParityBoot.h1 conflicts with GET /live at ParityBoot.h0" + } + }, + { + "id": "B13-get-and-sse-same-path", + "declarations": [ + "@Get('/feed')", + "@Sse('/feed')" + ], + "error": { + "name": "Error", + "message": "ambiguous route GET /feed at ParityBoot.h1 conflicts with GET /feed at ParityBoot.h0" + } + }, + { + "id": "B14-ws-same-shape", + "declarations": [ + "@Ws('/w/:a')", + "@Ws('/w/:b')" + ], + "error": { + "name": "Error", + "message": "ambiguous route GET /w/:b at ParityBoot.h1 conflicts with GET /w/:a at ParityBoot.h0" + } + }, + { + "id": "B15-ok-same-shape-different-methods", + "declarations": [ + "@Get('/users/:id')", + "@Post('/users/:name')" + ], + "ok": true + }, + { + "id": "B16-ok-different-constraints", + "declarations": [ + "@Get('/c/:a(\\d+)')", + "@Get('/c/:b([a-z]+)')" + ], + "ok": true + }, + { + "id": "B17-ok-static-and-param", + "declarations": [ + "@Get('/users/me')", + "@Get('/users/:id')" + ], + "ok": true + }, + { + "id": "B18-ok-exact-and-catch-all", + "declarations": [ + "@Get('/f')", + "@Get('/f/:rest*')" + ], + "ok": true + } + ] +} diff --git a/test/router-parity/frozen/boot-mesh.json b/test/router-parity/frozen/boot-mesh.json new file mode 100644 index 0000000..a472708 --- /dev/null +++ b/test/router-parity/frozen/boot-mesh.json @@ -0,0 +1,72 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "id": "M01-two-teapots-same-route", + "error": { + "name": "Error", + "message": "mesh: ambiguous remote route 'GET /api/dup/ping' from conflicts with 'GET /api/dup/ping' from — load balancing across teapots is not implemented yet, so green-tea will not choose one for you. Export it from a single teapot." + } + }, + { + "id": "M02-two-teapots-same-shape", + "error": { + "name": "Error", + "message": "mesh: ambiguous remote route 'GET /api/shape/:name' from conflicts with 'GET /api/shape/:id' from — load balancing across teapots is not implemented yet, so green-tea will not choose one for you. Export it from a single teapot." + } + }, + { + "id": "M03-local-same-shape-wins", + "ok": true, + "warnings": [ + "mesh: route 'GET /api/dup/ping' is exported by teapot but also declared locally — the local route takes precedence and the remote one will not be reached. Remove one if that is not what you meant." + ], + "responses": [ + { + "path": "/api/dup/ping", + "status": 200, + "body": "{\"from\":\"local\"}" + } + ] + }, + { + "id": "M04-unique-remote", + "ok": true, + "warnings": [], + "responses": [ + { + "path": "/api/dup/ping", + "status": 200, + "body": "{\"from\":\"teapot\"}" + }, + { + "path": "/c/ok", + "status": 200, + "body": "{\"from\":\"teacup\"}" + }, + { + "path": "/api/nope", + "status": 404, + "body": "{\"error\":\"Not Found\"}" + } + ] + }, + { + "id": "M05-remote-static-outranks-local-param", + "ok": true, + "warnings": [], + "responses": [ + { + "path": "/api/dup/ping", + "status": 200, + "body": "{\"from\":\"teapot\"}" + }, + { + "path": "/api/dup/x", + "status": 200, + "body": "{\"from\":\"local\",\"p\":{\"anything\":\"x\"}}" + } + ] + } + ] +} diff --git a/test/router-parity/frozen/boot-patterns.json b/test/router-parity/frozen/boot-patterns.json new file mode 100644 index 0000000..aab64a4 --- /dev/null +++ b/test/router-parity/frozen/boot-patterns.json @@ -0,0 +1,163 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "pattern": "/", + "shape": "" + }, + { + "pattern": "/users/:id", + "shape": "s:users/p" + }, + { + "pattern": "/users/:id(\\d+)", + "shape": "s:users/r:\\d+" + }, + { + "pattern": "/files/:rest*", + "shape": "s:files/c" + }, + { + "pattern": "/:rest*", + "shape": "c" + }, + { + "pattern": "/t/", + "shape": "s:t" + }, + { + "pattern": "/café", + "shape": "s:café" + }, + { + "pattern": "/build/:version(\\d{2}\\.\\d{1,2})", + "shape": "s:build/r:\\d{2}\\.\\d{1,2}" + }, + { + "pattern": "/x/:id/:id", + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:id/:id': duplicate parameter 'id'" + } + }, + { + "pattern": "/x/:id/:rest*/tail", + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:id/:rest*/tail': catch-all must be the final segment" + } + }, + { + "pattern": "/x/:rest*/:rest*", + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:rest*/:rest*': catch-all must be the final segment" + } + }, + { + "pattern": "/x/:", + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:': invalid parameter name ''" + } + }, + { + "pattern": "/x/:1x", + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:1x': invalid parameter name '1x'" + } + }, + { + "pattern": "/x//y", + "error": { + "name": "Error", + "message": "invalid route pattern '/x//y': repeated slash" + } + }, + { + "pattern": "x", + "error": { + "name": "Error", + "message": "invalid route pattern 'x': pattern must start with '/'" + } + }, + { + "pattern": "", + "error": { + "name": "Error", + "message": "invalid route pattern '': pattern must start with '/'" + } + }, + { + "pattern": "/x/:id((a+)+)", + "error": { + "name": "Error", + "message": "unsafe route constraint: unsupported expression '(a+)+'" + } + }, + { + "pattern": "/x/:id((?=a)a)", + "error": { + "name": "Error", + "message": "unsafe route constraint: unsupported expression '(?=a)a'" + } + }, + { + "pattern": "/x/:id(\\1)", + "error": { + "name": "Error", + "message": "unsafe route constraint: unsupported expression '\\1'" + } + }, + { + "pattern": "/x/:id(a|b)", + "error": { + "name": "Error", + "message": "unsafe route constraint: unsupported expression 'a|b'" + } + }, + { + "pattern": "/x/:id(\\d+\\w+)", + "error": { + "name": "Error", + "message": "unsafe route constraint: adjacent unbounded quantifiers in '\\d+\\w+'" + } + }, + { + "pattern": "/x/:id(\\d{5,2})", + "error": { + "name": "Error", + "message": "unsafe route constraint: invalid quantifier '{5,2}'" + } + }, + { + "pattern": "/x/:id(\\d{1,4096})", + "error": { + "name": "Error", + "message": "unsafe route constraint: invalid quantifier '{1,4096}'" + } + }, + { + "pattern": "/x/:id(\\d+", + "error": { + "name": "Error", + "message": "invalid route pattern '/x/:id(\\d+': malformed constraint" + } + }, + { + "pattern": "/x/:id()", + "error": { + "name": "Error", + "message": "unsafe route constraint: expression must contain 1-128 characters" + } + }, + { + "pattern": "/x/:id(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)", + "error": { + "name": "Error", + "message": "unsafe route constraint: expression must contain 1-128 characters" + } + } + ] +} diff --git a/test/router-parity/frozen/golden-explain.json b/test/router-parity/frozen/golden-explain.json new file mode 100644 index 0000000..44e22f0 --- /dev/null +++ b/test/router-parity/frozen/golden-explain.json @@ -0,0 +1,138 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "pattern": "/api/items/:id(\\d+)", + "explain": { + "pattern": "/api/items/:id(\\d+)", + "method": "GET", + "transport": "buffer", + "chain": [ + { + "name": "get", + "kind": "handler", + "origin": "module:IntrospectionModule", + "needs": [], + "provides": [] + } + ] + } + }, + { + "pattern": "/api/items", + "error": { + "name": "Error", + "message": "no route: /api/items" + } + }, + { + "pattern": "/api/live/:room", + "explain": { + "pattern": "/api/live/:room", + "method": "GET", + "transport": "ws", + "chain": [ + { + "name": "db", + "kind": "provider", + "origin": "module:IntrospectionModule", + "needs": [], + "provides": [ + "db" + ] + }, + { + "name": "user", + "kind": "step", + "origin": "module:IntrospectionModule", + "needs": [ + "db" + ], + "provides": [ + "user" + ] + }, + { + "name": "live", + "kind": "handler", + "origin": "module:IntrospectionModule", + "needs": [ + "user" + ], + "provides": [] + } + ] + } + }, + { + "pattern": "/api/items/:id/files/:path*", + "explain": { + "pattern": "/api/items/:id/files/:path*", + "method": "GET", + "transport": "buffer", + "chain": [ + { + "name": "files", + "kind": "handler", + "origin": "module:IntrospectionModule", + "needs": [], + "provides": [] + } + ] + } + }, + { + "pattern": "/api/missing", + "error": { + "name": "Error", + "message": "no route: /api/missing" + } + }, + { + "pattern": "/api/items/42", + "error": { + "name": "Error", + "message": "no route: /api/items/42" + } + }, + { + "pattern": "/api/items/", + "explain": { + "pattern": "/api/items/", + "method": "GET", + "transport": "buffer", + "chain": [ + { + "name": "db", + "kind": "provider", + "origin": "module:IntrospectionModule", + "needs": [], + "provides": [ + "db" + ] + }, + { + "name": "user", + "kind": "step", + "origin": "module:IntrospectionModule", + "needs": [ + "db" + ], + "provides": [ + "user" + ] + }, + { + "name": "list", + "kind": "handler", + "origin": "module:IntrospectionModule", + "needs": [ + "user" + ], + "provides": [] + } + ] + } + } + ] +} diff --git a/test/router-parity/frozen/golden-graph.json b/test/router-parity/frozen/golden-graph.json new file mode 100644 index 0000000..213b341 --- /dev/null +++ b/test/router-parity/frozen/golden-graph.json @@ -0,0 +1,168 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": { + "nodes": [ + { + "name": "db", + "kind": "provider", + "origin": "module:IntrospectionModule", + "needs": [], + "provides": [ + "db" + ] + }, + { + "name": "logger", + "kind": "provider", + "origin": "builtin", + "needs": [], + "provides": [ + "logger" + ] + }, + { + "name": "rooms", + "kind": "provider", + "origin": "builtin", + "needs": [], + "provides": [ + "rooms" + ] + }, + { + "name": "events", + "kind": "provider", + "origin": "builtin", + "needs": [], + "provides": [ + "events" + ] + }, + { + "name": "user", + "kind": "step", + "origin": "module:IntrospectionModule", + "needs": [ + "db" + ], + "provides": [ + "user" + ] + }, + { + "name": "audit", + "kind": "step", + "origin": "module:IntrospectionModule", + "needs": [], + "provides": [ + "audit" + ] + } + ], + "routes": [ + { + "pattern": "/api/items/:id/files/:path*", + "method": "GET", + "transport": "buffer", + "chain": [ + "files" + ] + }, + { + "pattern": "/api/items/", + "method": "GET", + "transport": "buffer", + "chain": [ + "db", + "user", + "list" + ] + }, + { + "pattern": "/api/items/", + "method": "POST", + "transport": "buffer", + "chain": [ + "db", + "user", + "create" + ] + }, + { + "pattern": "/api/items/:id(\\d+)", + "method": "GET", + "transport": "buffer", + "chain": [ + "get" + ] + }, + { + "pattern": "/api/items/:id(\\d+)", + "method": "HEAD", + "transport": "buffer", + "chain": [ + "head" + ] + }, + { + "pattern": "/api/items/:id(\\d+)", + "method": "OPTIONS", + "transport": "buffer", + "chain": [ + "options" + ] + }, + { + "pattern": "/api/items/:id(\\d+)", + "method": "DELETE", + "transport": "buffer", + "chain": [ + "audit", + "remove" + ] + }, + { + "pattern": "/api/items/:slug([a-z0-9-]+)", + "method": "PUT", + "transport": "buffer", + "chain": [ + "upsert" + ] + }, + { + "pattern": "/api/items/search", + "method": "GET", + "transport": "buffer", + "chain": [ + "search" + ] + }, + { + "pattern": "/api/events", + "method": "GET", + "transport": "sse", + "chain": [ + "events" + ] + }, + { + "pattern": "/api/feed", + "method": "GET", + "transport": "negotiate", + "chain": [ + "feed" + ] + }, + { + "pattern": "/api/live/:room", + "method": "GET", + "transport": "ws", + "chain": [ + "db", + "user", + "live" + ] + } + ] + } +} diff --git a/test/router-parity/frozen/golden-mesh.json b/test/router-parity/frozen/golden-mesh.json new file mode 100644 index 0000000..b47271b --- /dev/null +++ b/test/router-parity/frozen/golden-mesh.json @@ -0,0 +1,233 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": { + "before": { + "graph": { + "error": { + "name": "Error", + "message": "graph() unavailable until a mesh app has booted: a mesh graph is not knowable until its teapots are asked. Call `await app.ready()` first — it is a no-op on a non-mesh app" + } + }, + "explain": { + "error": { + "name": "Error", + "message": "explain() unavailable until a mesh app has booted: a mesh graph is not knowable until its teapots are asked. Call `await app.ready()` first — it is a no-op on a non-mesh app" + } + }, + "openapi": { + "value": { + "openapi": "3.1.0", + "info": { + "title": "Parity", + "version": "1" + }, + "paths": { + "/api/local/who": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/local/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + } + } + } + } + }, + "after": { + "graph": { + "nodes": [ + { + "name": "logger", + "kind": "provider", + "origin": "builtin", + "needs": [], + "provides": [ + "logger" + ] + }, + { + "name": "rooms", + "kind": "provider", + "origin": "builtin", + "needs": [], + "provides": [ + "rooms" + ] + }, + { + "name": "events", + "kind": "provider", + "origin": "builtin", + "needs": [], + "provides": [ + "events" + ] + }, + { + "name": "config", + "kind": "step", + "origin": "mesh:", + "needs": [], + "provides": [ + "config" + ] + } + ], + "routes": [ + { + "pattern": "/api/local/who", + "method": "GET", + "transport": "buffer", + "chain": [ + "config", + "who" + ] + }, + { + "pattern": "/api/local/:id", + "method": "GET", + "transport": "buffer", + "chain": [ + "byId" + ] + } + ] + }, + "explain": [ + { + "pattern": "/api/missing", + "error": { + "name": "Error", + "message": "no route: /api/missing" + } + } + ], + "explainLocal": { + "pattern": "/api/local/who", + "method": "GET", + "transport": "buffer", + "chain": [ + { + "name": "config", + "kind": "step", + "origin": "mesh:", + "needs": [], + "provides": [ + "config" + ] + }, + { + "name": "who", + "kind": "handler", + "origin": "module:TeacupModule", + "needs": [ + "config" + ], + "provides": [] + } + ] + }, + "explainRemote": { + "error": { + "name": "Error", + "message": "no route: /api/remote/ping" + } + }, + "openapi": { + "openapi": "3.1.0", + "info": { + "title": "Parity", + "version": "1" + }, + "paths": { + "/api/local/who": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/local/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + } + } + } + }, + "lookup": { + "path": "/api/remote/ping", + "status": 200, + "body": "{\"from\":\"teapot\"}" + } + } +} diff --git a/test/router-parity/frozen/golden-openapi.json b/test/router-parity/frozen/golden-openapi.json new file mode 100644 index 0000000..4d471df --- /dev/null +++ b/test/router-parity/frozen/golden-openapi.json @@ -0,0 +1,285 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": { + "openapi": "3.1.0", + "info": { + "title": "Parity", + "version": "1" + }, + "paths": { + "/api/items/{id}/files/{path}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/api/items": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + } + } + } + }, + "/api/items/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "\\d+" + } + }, + { + "name": "expand", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ] + }, + "head": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "\\d+" + } + } + ] + }, + "options": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "\\d+" + } + } + ] + }, + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "\\d+" + } + } + ] + } + }, + "/api/items/{slug}": { + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation failed" + }, + "500": { + "description": "Internal Server Error" + } + }, + "parameters": [ + { + "name": "slug", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9-]+" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + } + } + } + }, + "/api/items/search": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/events": { + "get": { + "responses": { + "200": { + "description": "Event stream", + "content": { + "text/event-stream": {} + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/feed": { + "get": { + "responses": { + "200": { + "description": "Stream", + "content": { + "application/x-ndjson": {} + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + } + } + } +} diff --git a/test/router-parity/frozen/matcher-generated-v2.json b/test/router-parity/frozen/matcher-generated-v2.json new file mode 100644 index 0000000..87b8253 --- /dev/null +++ b/test/router-parity/frozen/matcher-generated-v2.json @@ -0,0 +1,9808 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": { + "generator": "router-parity-gen-v2", + "seed": 10908, + "rules": [ + "PRNG: mulberry32(seed), fresh for v2; every choice below draws from it in program order.", + "40 scenarios; each has a shared static prefix of 0-3 segments (a|b|c|x), so siblings sit at depth 1-4.", + "Each scenario has 3-6 sibling declarations: prefix + one sibling segment + a tail. The first sibling segment is static, the second a plain or constrained param; the rest are static (p=0.35), plain (p=0.25), constrained (p=0.25) or a final catch-all (p=0.15). Tails are 0-2 segments, static/plain/constrained, none after a catch-all.", + "Then 0-3 unrelated declarations made by the v1 declaration rule.", + "Methods and transports follow the v1 declaration rule.", + "Requests (12): p=0.5 instantiate a sibling; p=0.25 cross two siblings (prefix and sibling segment of one, tail of another) to force a partial match; else prefix + 0-3 pool values. v1 decoration and request methods apply.", + "Unsupported patterns are never produced: every generated pattern must pass compilePattern." + ], + "branchStats": { + "v1": { + "requests": 480, + "validPaths": 459, + "siblingHits": 175, + "backtracks": 128, + "siblingShare": "36.5%", + "backtrackShare": "26.7%" + }, + "v2": { + "requests": 480, + "validPaths": 459, + "siblingHits": 345, + "backtracks": 323, + "siblingShare": "71.9%", + "backtrackShare": "67.3%" + } + }, + "scenarios": [ + { + "id": "S01", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S01.s1", + "method": "DELETE", + "pattern": "/x/x/x", + "transport": "buffer" + }, + { + "id": "S01.s2", + "method": "GET", + "pattern": "/x/:p1([0-9a-f]{2})/c/x", + "transport": "buffer" + }, + { + "id": "S01.s3", + "method": "GET", + "pattern": "/x/:p1", + "transport": "ndjson" + }, + { + "id": "S01.s4", + "method": "GET", + "pattern": "/x/:p1/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S01.s5", + "method": "PATCH", + "pattern": "/x/x", + "transport": "buffer" + }, + { + "id": "S01.s6", + "method": "POST", + "pattern": "/x/:p1*", + "transport": "buffer" + }, + { + "id": "S01.u1", + "method": "HEAD", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "S01.u2", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/x/7/" + }, + { + "method": "POST", + "raw": "/x/%34%32/7" + }, + { + "method": "DELETE", + "raw": "/x/c/x" + }, + { + "method": "PATCH", + "raw": "/x" + }, + { + "method": "POST", + "raw": "/x/x" + }, + { + "method": "OPTIONS", + "raw": "/x/c" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "DELETE", + "raw": "/x/0a" + }, + { + "method": "HEAD", + "raw": "/x/0a/7" + }, + { + "method": "PATCH", + "raw": "/x/x" + }, + { + "method": "PUT", + "raw": "/x/ff/" + }, + { + "method": "GET", + "raw": "/x/7" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/x/7/", + "normalized": "/x/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/%34%32/7", + "normalized": "/x/%34%32/7", + "match": { + "id": "S01.s6", + "params": { + "p1": "42/7" + } + }, + "resolve": { + "id": "S01.s6", + "params": { + "p1": "42/7" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/c/x", + "normalized": "/x/c/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/x", + "normalized": "/x/x", + "match": { + "id": "S01.s6", + "params": { + "p1": "x" + } + }, + "resolve": { + "id": "S01.s6", + "params": { + "p1": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/c", + "normalized": "/x/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": { + "id": "S01.u2", + "params": { + "p0": "x" + } + }, + "resolve": { + "id": "S01.u2", + "params": { + "p0": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/0a", + "normalized": "/x/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/0a/7", + "normalized": "/x/0a/7", + "match": { + "id": "S01.u1", + "params": { + "p0": "x/0a/7" + } + }, + "resolve": { + "id": "S01.u1", + "params": { + "p0": "x/0a/7" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/x", + "normalized": "/x/x", + "match": { + "id": "S01.s5", + "params": {} + }, + "resolve": { + "id": "S01.s5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x/ff/", + "normalized": "/x/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/7", + "normalized": "/x/7", + "match": { + "id": "S01.s3", + "params": { + "p1": "7" + } + }, + "resolve": { + "id": "S01.s3", + "params": { + "p1": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S02", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/x/x", + "declarations": [ + { + "id": "S02.s1", + "method": "GET", + "pattern": "/c/x/x/a/x/x", + "transport": "buffer" + }, + { + "id": "S02.s2", + "method": "PATCH", + "pattern": "/c/x/x/:p3/:p4", + "transport": "buffer" + }, + { + "id": "S02.s3", + "method": "HEAD", + "pattern": "/c/x/x/:p3*", + "transport": "buffer" + }, + { + "id": "S02.s4", + "method": "GET", + "pattern": "/c/x/x/:p3", + "transport": "buffer" + }, + { + "id": "S02.s5", + "method": "GET", + "pattern": "/c/x/x/c", + "transport": "buffer" + }, + { + "id": "S02.s6", + "method": "GET", + "pattern": "/c/x/x/:p3", + "transport": "buffer" + }, + { + "id": "S02.u1", + "method": "OPTIONS", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S02.u2", + "method": "GET", + "pattern": "/a/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S02.u3", + "method": "POST", + "pattern": "/:p0([0-9a-f]{2})/a/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/x/x/b" + }, + { + "method": "POST", + "raw": "/c/x/x" + }, + { + "method": "POST", + "raw": "/c/x/x/%34%32" + }, + { + "method": "GET", + "raw": "/c/x/x/a/x/x" + }, + { + "method": "GET", + "raw": "/c/x/x/a/." + }, + { + "method": "OPTIONS", + "raw": "/c/x/x/0a/a%20b" + }, + { + "method": "GET", + "raw": "/c/x/x/c" + }, + { + "method": "POST", + "raw": "/c/x/x/caf%C3%A9/42" + }, + { + "method": "DELETE", + "raw": "/c/x/x/q/../0a/7" + }, + { + "method": "POST", + "raw": "/c/x/x/a%20b/caf%C3%A9" + }, + { + "method": "PATCH", + "raw": "/c/x/x" + }, + { + "method": "POST", + "raw": "/c/x/x/ff" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/x/x/b", + "normalized": "/c/x/x/b", + "match": { + "id": "S02.s4", + "params": { + "p3": "b" + } + }, + "resolve": { + "id": "S02.s4", + "params": { + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/%34%32", + "normalized": "/c/x/x/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/a/x/x", + "normalized": "/c/x/x/a/x/x", + "match": { + "id": "S02.s1", + "params": {} + }, + "resolve": { + "id": "S02.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/a/.", + "normalized": "/c/x/x/a", + "match": { + "id": "S02.s4", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S02.s4", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/x/x/0a/a%20b", + "normalized": "/c/x/x/0a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/c", + "normalized": "/c/x/x/c", + "match": { + "id": "S02.s5", + "params": {} + }, + "resolve": { + "id": "S02.s5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/caf%C3%A9/42", + "normalized": "/c/x/x/caf%C3%A9/42", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/x/x/q/../0a/7", + "normalized": "/c/x/x/0a/7", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/a%20b/caf%C3%A9", + "normalized": "/c/x/x/a%20b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/ff", + "normalized": "/c/x/x/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S03", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a", + "declarations": [ + { + "id": "S03.s1", + "method": "GET", + "pattern": "/a/c/:p2(\\d+)/:p3(\\d+)", + "transport": "ndjson" + }, + { + "id": "S03.s2", + "method": "PUT", + "pattern": "/a/:p1/:p2/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S03.s3", + "method": "GET", + "pattern": "/a/:p1", + "transport": "buffer" + }, + { + "id": "S03.s4", + "method": "GET", + "pattern": "/a/:p1*", + "transport": "ndjson" + }, + { + "id": "S03.u1", + "method": "GET", + "pattern": "/c/b/:p2*", + "transport": "buffer" + }, + { + "id": "S03.u2", + "method": "GET", + "pattern": "/", + "transport": "sse" + }, + { + "id": "S03.u3", + "method": "GET", + "pattern": "/c/b/:p2([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/c/a/a%20b" + }, + { + "method": "PATCH", + "raw": "/a/a" + }, + { + "method": "PUT", + "raw": "/a/c/caf%C3%A9/a%20b" + }, + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "PATCH", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/a/c" + }, + { + "method": "HEAD", + "raw": "/a/c/7/ff" + }, + { + "method": "POST", + "raw": "/a/ff/caf%C3%A9/" + }, + { + "method": "PATCH", + "raw": "/a/a%20b/x" + }, + { + "method": "DELETE", + "raw": "/a/42/a%20b/42" + }, + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "PATCH", + "raw": "/q/../a/0a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/c/a/a%20b", + "normalized": "/a/c/a/a%20b", + "match": { + "id": "S03.s4", + "params": { + "p1": "c/a/a b" + } + }, + "resolve": { + "id": "S03.s4", + "params": { + "p1": "c/a/a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/a", + "normalized": "/a/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/c/caf%C3%A9/a%20b", + "normalized": "/a/c/caf%C3%A9/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c", + "normalized": "/a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/c/7/ff", + "normalized": "/a/c/7/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/ff/caf%C3%A9/", + "normalized": "/a/ff/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/a%20b/x", + "normalized": "/a/a%20b/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/42/a%20b/42", + "normalized": "/a/42/a%20b/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/q/../a/0a", + "normalized": "/a/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S04", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S04.s1", + "method": "HEAD", + "pattern": "/c/x/x", + "transport": "buffer" + }, + { + "id": "S04.s2", + "method": "POST", + "pattern": "/:p0([a-c]+)/b/:p2", + "transport": "buffer" + }, + { + "id": "S04.s3", + "method": "PATCH", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S04.u1", + "method": "OPTIONS", + "pattern": "/:p0", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "OPTIONS", + "raw": "/c/b/b" + }, + { + "method": "HEAD", + "raw": "/b/b/0a" + }, + { + "method": "GET", + "raw": "/ff" + }, + { + "method": "DELETE", + "raw": "/c" + }, + { + "method": "PUT", + "raw": "/42/x/x" + }, + { + "method": "GET", + "raw": "/c/x/x" + }, + { + "method": "PUT", + "raw": "/a%20b" + }, + { + "method": "HEAD", + "raw": "/c/x/x" + }, + { + "method": "HEAD", + "raw": "/7/q/.." + }, + { + "method": "GET", + "raw": "/c/x/x" + }, + { + "method": "DELETE", + "raw": "/42" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "S04.s3", + "params": { + "p0": "c" + } + }, + "resolve": { + "id": "S04.s3", + "params": { + "p0": "c" + }, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/b/b", + "normalized": "/c/b/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/b/0a", + "normalized": "/b/b/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/42/x/x", + "normalized": "/42/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": { + "id": "S04.s1", + "params": {} + }, + "resolve": { + "id": "S04.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/7/q/..", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "S05", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a/c", + "declarations": [ + { + "id": "S05.s1", + "method": "PUT", + "pattern": "/a/c/b/b", + "transport": "buffer" + }, + { + "id": "S05.s2", + "method": "GET", + "pattern": "/a/c/:p2", + "transport": "buffer" + }, + { + "id": "S05.s3", + "method": "OPTIONS", + "pattern": "/a/c/a/:p3", + "transport": "buffer" + }, + { + "id": "S05.s4", + "method": "OPTIONS", + "pattern": "/a/c/a/:p3([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/a/c/ff/b" + }, + { + "method": "PUT", + "raw": "/a/c/a/a" + }, + { + "method": "POST", + "raw": "/a/c/x" + }, + { + "method": "OPTIONS", + "raw": "/a/c/b" + }, + { + "method": "PATCH", + "raw": "/a/c/a/b" + }, + { + "method": "HEAD", + "raw": "/a/c/" + }, + { + "method": "GET", + "raw": "/a/c" + }, + { + "method": "PUT", + "raw": "/a/c/a/%34%32" + }, + { + "method": "PATCH", + "raw": "/a/c/./b/a%20b/ff" + }, + { + "method": "PUT", + "raw": "/a/c/0a/ff/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/a/c/b/b/" + }, + { + "method": "GET", + "raw": "/a/c/b/b" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/a/c/ff/b", + "normalized": "/a/c/ff/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/a/a", + "normalized": "/a/c/a/a", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/c/x", + "normalized": "/a/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/c/b", + "normalized": "/a/c/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/a/b", + "normalized": "/a/c/a/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/c/", + "normalized": "/a/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/c", + "normalized": "/a/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/a/%34%32", + "normalized": "/a/c/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/./b/a%20b/ff", + "normalized": "/a/c/b/a%20b/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/0a/ff/caf%C3%A9", + "normalized": "/a/c/0a/ff/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a/c/b/b/", + "normalized": "/a/c/b/b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/c/b/b", + "normalized": "/a/c/b/b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S06", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S06.s1", + "method": "POST", + "pattern": "/b/b/x", + "transport": "buffer" + }, + { + "id": "S06.s2", + "method": "POST", + "pattern": "/b/:p1(\\d+)/:p2/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S06.s3", + "method": "PUT", + "pattern": "/b/c", + "transport": "buffer" + }, + { + "id": "S06.s4", + "method": "PATCH", + "pattern": "/b/x", + "transport": "buffer" + }, + { + "id": "S06.u1", + "method": "OPTIONS", + "pattern": "/b/:p1([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S06.u2", + "method": "DELETE", + "pattern": "/x/x", + "transport": "buffer" + }, + { + "id": "S06.u3", + "method": "GET", + "pattern": "/:p0/:p1([a-c]+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/b/./x" + }, + { + "method": "GET", + "raw": "/b/c" + }, + { + "method": "POST", + "raw": "/b/b/a/a" + }, + { + "method": "DELETE", + "raw": "/b/7/b" + }, + { + "method": "DELETE", + "raw": "/b" + }, + { + "method": "POST", + "raw": "/b/c/x/a%20b" + }, + { + "method": "DELETE", + "raw": "/b/c" + }, + { + "method": "HEAD", + "raw": "/b/42/c/ff" + }, + { + "method": "OPTIONS", + "raw": "/b/b/caf%C3%A9/q/../0a" + }, + { + "method": "OPTIONS", + "raw": "/b/" + }, + { + "method": "POST", + "raw": "/b/b/x" + }, + { + "method": "POST", + "raw": "/b/ff/0a/0a" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/b/./x", + "normalized": "/b/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/c", + "normalized": "/b/c", + "match": { + "id": "S06.u3", + "params": { + "p0": "b", + "p1": "c" + } + }, + "resolve": { + "id": "S06.u3", + "params": { + "p0": "b", + "p1": "c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b/7/b", + "normalized": "/b/7/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/b/c/x/a%20b", + "normalized": "/b/c/x/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b/c", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/42/c/ff", + "normalized": "/b/42/c/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/b/caf%C3%A9/q/../0a", + "normalized": "/b/b/caf%C3%A9/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/b/b/x", + "normalized": "/b/b/x", + "match": { + "id": "S06.s1", + "params": {} + }, + "resolve": { + "id": "S06.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/ff/0a/0a", + "normalized": "/b/ff/0a/0a", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S07", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S07.s1", + "method": "HEAD", + "pattern": "/c/c/b/:p3", + "transport": "buffer" + }, + { + "id": "S07.s2", + "method": "GET", + "pattern": "/c/:p1([0-9a-f]{2})", + "transport": "sse" + }, + { + "id": "S07.s3", + "method": "DELETE", + "pattern": "/c/a/c", + "transport": "buffer" + }, + { + "id": "S07.s4", + "method": "PATCH", + "pattern": "/c/:p1(\\d+)/:p2([0-9a-f]{2})/x", + "transport": "buffer" + }, + { + "id": "S07.u1", + "method": "GET", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "S07.u2", + "method": "HEAD", + "pattern": "/:p0([a-c]+)/:p1*", + "transport": "buffer" + }, + { + "id": "S07.u3", + "method": "PUT", + "pattern": "/:p0/x/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/c/a/a" + }, + { + "method": "GET", + "raw": "/c/a/c" + }, + { + "method": "PUT", + "raw": "/c/a/c" + }, + { + "method": "PUT", + "raw": "/c/c/ff/x" + }, + { + "method": "POST", + "raw": "/c/ff/c" + }, + { + "method": "GET", + "raw": "/c/0a/0a/x/" + }, + { + "method": "PATCH", + "raw": "/c/b/x/x" + }, + { + "method": "PATCH", + "raw": "/c/7/c" + }, + { + "method": "PUT", + "raw": "/c/a%20b/a%20b/" + }, + { + "method": "DELETE", + "raw": "/c/b" + }, + { + "method": "GET", + "raw": "/c/caf%C3%A9" + }, + { + "method": "HEAD", + "raw": "/c/b" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/c/a/a", + "normalized": "/c/a/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/c", + "normalized": "/c/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/a/c", + "normalized": "/c/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/c/ff/x", + "normalized": "/c/c/ff/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/ff/c", + "normalized": "/c/ff/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/0a/0a/x/", + "normalized": "/c/0a/0a/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/b/x/x", + "normalized": "/c/b/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/7/c", + "normalized": "/c/7/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/a%20b/a%20b/", + "normalized": "/c/a%20b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/caf%C3%A9", + "normalized": "/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/b", + "normalized": "/c/b", + "match": { + "id": "S07.u2", + "params": { + "p0": "c", + "p1": "b" + } + }, + "resolve": { + "id": "S07.u2", + "params": { + "p0": "c", + "p1": "b" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S08", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/x/c", + "declarations": [ + { + "id": "S08.s1", + "method": "PUT", + "pattern": "/x/x/c/c/x/x", + "transport": "buffer" + }, + { + "id": "S08.s2", + "method": "HEAD", + "pattern": "/x/x/c/:p3/c", + "transport": "buffer" + }, + { + "id": "S08.s3", + "method": "PATCH", + "pattern": "/x/x/c/:p3/:p4(\\d+)", + "transport": "buffer" + }, + { + "id": "S08.s4", + "method": "POST", + "pattern": "/x/x/c/c/:p4([a-c]+)", + "transport": "buffer" + }, + { + "id": "S08.u1", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/x/x/c/a/a/x" + }, + { + "method": "POST", + "raw": "/x/x/c/b" + }, + { + "method": "GET", + "raw": "/x/x/c/x/ff" + }, + { + "method": "DELETE", + "raw": "/x/x/c/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/x/c/42/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/x/c/ff" + }, + { + "method": "HEAD", + "raw": "/x/x/c/x/x/x/" + }, + { + "method": "PATCH", + "raw": "/x/x/c/" + }, + { + "method": "GET", + "raw": "/x/x/c/c/%34%32" + }, + { + "method": "HEAD", + "raw": "/x/x/c/b/c" + }, + { + "method": "HEAD", + "raw": "/x/x/c/c/x/./x" + }, + { + "method": "DELETE", + "raw": "/x/x/c/c/x/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/x/x/c/a/a/x", + "normalized": "/x/x/c/a/a/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/x/c/b", + "normalized": "/x/x/c/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/x/c/x/ff", + "normalized": "/x/x/c/x/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/c/caf%C3%A9", + "normalized": "/x/x/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/c/42/caf%C3%A9", + "normalized": "/x/x/c/42/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/c/ff", + "normalized": "/x/x/c/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x/x/c/x/x/x/", + "normalized": "/x/x/c/x/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/x/c/", + "normalized": "/x/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/x/c/c/%34%32", + "normalized": "/x/x/c/c/%34%32", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/x/c/b/c", + "normalized": "/x/x/c/b/c", + "match": { + "id": "S08.s2", + "params": { + "p3": "b" + } + }, + "resolve": { + "id": "S08.s2", + "params": { + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/x/c/c/x/./x", + "normalized": "/x/x/c/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/x/c/c/x/x", + "normalized": "/x/x/c/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S09", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/a", + "declarations": [ + { + "id": "S09.s1", + "method": "OPTIONS", + "pattern": "/x/a/c/:p3([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S09.s2", + "method": "GET", + "pattern": "/x/a/:p2/a", + "transport": "negotiate" + }, + { + "id": "S09.s3", + "method": "OPTIONS", + "pattern": "/x/a/x/:p3(\\d+)/x", + "transport": "buffer" + }, + { + "id": "S09.s4", + "method": "HEAD", + "pattern": "/x/a/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S09.s5", + "method": "PUT", + "pattern": "/x/a/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S09.s6", + "method": "HEAD", + "pattern": "/x/a/:p2*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/x/a/7/a" + }, + { + "method": "HEAD", + "raw": "/x/a/x/0a/x" + }, + { + "method": "DELETE", + "raw": "/x/a" + }, + { + "method": "GET", + "raw": "/x/a/a%20b/a%20b/x/" + }, + { + "method": "POST", + "raw": "/x/a/x/caf%C3%A9/x" + }, + { + "method": "GET", + "raw": "//x/a/ff/7/0a" + }, + { + "method": "PUT", + "raw": "//x/a/q/../c" + }, + { + "method": "DELETE", + "raw": "/x/a/" + }, + { + "method": "OPTIONS", + "raw": "/x/q/../a" + }, + { + "method": "POST", + "raw": "/x/a" + }, + { + "method": "OPTIONS", + "raw": "/x/a" + }, + { + "method": "DELETE", + "raw": "/x/a/c" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/x/a/7/a", + "normalized": "/x/a/7/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/a/x/0a/x", + "normalized": "/x/a/x/0a/x", + "match": { + "id": "S09.s6", + "params": { + "p2": "x/0a/x" + } + }, + "resolve": { + "id": "S09.s6", + "params": { + "p2": "x/0a/x" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/a/a%20b/a%20b/x/", + "normalized": "/x/a/a%20b/a%20b/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/a/x/caf%C3%A9/x", + "normalized": "/x/a/x/caf%C3%A9/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//x/a/ff/7/0a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "//x/a/q/../c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/x/a/", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/q/../a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/a/c", + "normalized": "/x/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S10", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S10.s1", + "method": "GET", + "pattern": "/c/a/:p2(\\d+)", + "transport": "sse" + }, + { + "id": "S10.s2", + "method": "PUT", + "pattern": "/c/:p1/b/:p3", + "transport": "buffer" + }, + { + "id": "S10.s3", + "method": "POST", + "pattern": "/c/:p1/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S10.s4", + "method": "PATCH", + "pattern": "/c/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/c/b" + }, + { + "method": "GET", + "raw": "/q/../c/b" + }, + { + "method": "GET", + "raw": "//c/%34%32/42" + }, + { + "method": "OPTIONS", + "raw": "/c" + }, + { + "method": "PUT", + "raw": "/c/x/b/ff" + }, + { + "method": "PATCH", + "raw": "/c/42/0a/0a" + }, + { + "method": "DELETE", + "raw": "/c/x/b/0a" + }, + { + "method": "DELETE", + "raw": "/c/7/b/a/" + }, + { + "method": "HEAD", + "raw": "/c/a/a%20b/" + }, + { + "method": "PUT", + "raw": "/c/%34%32/b/%34%32" + }, + { + "method": "GET", + "raw": "/c/%34%32/b/7" + }, + { + "method": "GET", + "raw": "/c/a/%34%32/" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/q/../c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//c/%34%32/42", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/x/b/ff", + "normalized": "/c/x/b/ff", + "match": { + "id": "S10.s2", + "params": { + "p1": "x", + "p3": "ff" + } + }, + "resolve": { + "id": "S10.s2", + "params": { + "p1": "x", + "p3": "ff" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/42/0a/0a", + "normalized": "/c/42/0a/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/x/b/0a", + "normalized": "/c/x/b/0a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/7/b/a/", + "normalized": "/c/7/b/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/a/a%20b/", + "normalized": "/c/a/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/%34%32/b/%34%32", + "normalized": "/c/%34%32/b/%34%32", + "match": { + "id": "S10.s2", + "params": { + "p1": "42", + "p3": "42" + } + }, + "resolve": { + "id": "S10.s2", + "params": { + "p1": "42", + "p3": "42" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/%34%32/b/7", + "normalized": "/c/%34%32/b/7", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/%34%32/", + "normalized": "/c/a/%34%32", + "match": { + "id": "S10.s1", + "params": { + "p2": "42" + } + }, + "resolve": { + "id": "S10.s1", + "params": { + "p2": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S11", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/x", + "declarations": [ + { + "id": "S11.s1", + "method": "GET", + "pattern": "/b/x/x/:p3(\\d+)", + "transport": "ndjson" + }, + { + "id": "S11.s2", + "method": "DELETE", + "pattern": "/b/x/:p2([a-c]+)/:p3", + "transport": "buffer" + }, + { + "id": "S11.s3", + "method": "GET", + "pattern": "/b/x/:p2/c/c", + "transport": "buffer" + }, + { + "id": "S11.s4", + "method": "PUT", + "pattern": "/b/x/:p2*", + "transport": "buffer" + }, + { + "id": "S11.u1", + "method": "POST", + "pattern": "/:p0([0-9a-f]{2})/x/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/b/x/a%20b/42/" + }, + { + "method": "PUT", + "raw": "/b/x/ff/c/c" + }, + { + "method": "HEAD", + "raw": "/b/x/42/c/c" + }, + { + "method": "PATCH", + "raw": "/b/x/b/c/c" + }, + { + "method": "PATCH", + "raw": "/b/x/x/a%20b" + }, + { + "method": "GET", + "raw": "/b/x/ff/c/c" + }, + { + "method": "OPTIONS", + "raw": "/b/x/ff/a%20b" + }, + { + "method": "GET", + "raw": "/b/x/a%20b/a%20b" + }, + { + "method": "HEAD", + "raw": "/b/x/7/0a/./a%20b" + }, + { + "method": "OPTIONS", + "raw": "/b/x/c/c" + }, + { + "method": "POST", + "raw": "/b/x/b/a%20b" + }, + { + "method": "POST", + "raw": "/b/x/x/b" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/b/x/a%20b/42/", + "normalized": "/b/x/a%20b/42", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/x/ff/c/c", + "normalized": "/b/x/ff/c/c", + "match": { + "id": "S11.s4", + "params": { + "p2": "ff/c/c" + } + }, + "resolve": { + "id": "S11.s4", + "params": { + "p2": "ff/c/c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/x/42/c/c", + "normalized": "/b/x/42/c/c", + "match": null, + "resolve": { + "id": "S11.s3", + "params": { + "p2": "42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/b/c/c", + "normalized": "/b/x/b/c/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/x/a%20b", + "normalized": "/b/x/x/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/ff/c/c", + "normalized": "/b/x/ff/c/c", + "match": { + "id": "S11.s3", + "params": { + "p2": "ff" + } + }, + "resolve": { + "id": "S11.s3", + "params": { + "p2": "ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/x/ff/a%20b", + "normalized": "/b/x/ff/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/a%20b/a%20b", + "normalized": "/b/x/a%20b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/x/7/0a/./a%20b", + "normalized": "/b/x/7/0a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/x/c/c", + "normalized": "/b/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/b/a%20b", + "normalized": "/b/x/b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/b", + "normalized": "/b/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S12", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S12.s1", + "method": "GET", + "pattern": "/c/c/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S12.s2", + "method": "GET", + "pattern": "/c/:p1/b/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S12.s3", + "method": "DELETE", + "pattern": "/c/:p1*", + "transport": "buffer" + }, + { + "id": "S12.s4", + "method": "GET", + "pattern": "/c/c/:p2/c", + "transport": "ndjson" + }, + { + "id": "S12.s5", + "method": "GET", + "pattern": "/c/:p1([0-9a-f]{2})/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S12.s6", + "method": "POST", + "pattern": "/c/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S12.u1", + "method": "HEAD", + "pattern": "/x", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/c/./0a" + }, + { + "method": "PATCH", + "raw": "/c/caf%C3%A9/42" + }, + { + "method": "GET", + "raw": "/c/c/0a" + }, + { + "method": "PUT", + "raw": "//c/%34%32/ff/c" + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32" + }, + { + "method": "PATCH", + "raw": "/c/a/ff/c/." + }, + { + "method": "PATCH", + "raw": "/c/42/b/0a" + }, + { + "method": "DELETE", + "raw": "/c" + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32/7" + }, + { + "method": "PUT", + "raw": "/c/b/c/" + }, + { + "method": "PUT", + "raw": "/c/ff/b/b/" + }, + { + "method": "DELETE", + "raw": "/c/c/q/../%34%32" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/c/./0a", + "normalized": "/c/c/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/caf%C3%A9/42", + "normalized": "/c/caf%C3%A9/42", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/0a", + "normalized": "/c/c/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//c/%34%32/ff/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32", + "normalized": "/c/%34%32", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/a/ff/c/.", + "normalized": "/c/a/ff/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/42/b/0a", + "normalized": "/c/42/b/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "S12.s3", + "params": { + "p1": "" + } + }, + "resolve": { + "id": "S12.s3", + "params": { + "p1": "" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32/7", + "normalized": "/c/%34%32/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/b/c/", + "normalized": "/c/b/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/ff/b/b/", + "normalized": "/c/ff/b/b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/c/q/../%34%32", + "normalized": "/c/c/%34%32", + "match": { + "id": "S12.s3", + "params": { + "p1": "c/42" + } + }, + "resolve": { + "id": "S12.s3", + "params": { + "p1": "c/42" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S13", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/c/c", + "declarations": [ + { + "id": "S13.s1", + "method": "GET", + "pattern": "/x/c/c/x", + "transport": "buffer" + }, + { + "id": "S13.s2", + "method": "HEAD", + "pattern": "/x/c/c/:p3/x", + "transport": "buffer" + }, + { + "id": "S13.s3", + "method": "HEAD", + "pattern": "/x/c/c/x", + "transport": "buffer" + }, + { + "id": "S13.s4", + "method": "GET", + "pattern": "/x/c/c/:p3/c", + "transport": "buffer" + }, + { + "id": "S13.s5", + "method": "GET", + "pattern": "/x/c/c/:p3(\\d+)/:p4([0-9a-f]{2})/b", + "transport": "buffer" + }, + { + "id": "S13.u1", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S13.u2", + "method": "HEAD", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/x/c/c/x" + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/b/." + }, + { + "method": "PUT", + "raw": "/x/c/c" + }, + { + "method": "GET", + "raw": "//x/c/c/caf%C3%A9/c" + }, + { + "method": "DELETE", + "raw": "/x/c/c/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/ff" + }, + { + "method": "PATCH", + "raw": "/x/c/c/c/x" + }, + { + "method": "HEAD", + "raw": "/x/c/c/b/" + }, + { + "method": "DELETE", + "raw": "/x/c/c/42/x/b/" + }, + { + "method": "PATCH", + "raw": "/./x/c/c/x/x" + }, + { + "method": "GET", + "raw": "//x/c/c/0a/x" + }, + { + "method": "GET", + "raw": "/x/c/c/a/caf%C3%A9/7" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/x/c/c/x", + "normalized": "/x/c/c/x", + "match": { + "id": "S13.s1", + "params": {} + }, + "resolve": { + "id": "S13.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/b/.", + "normalized": "/x/c/c/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/x/c/c", + "normalized": "/x/c/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "//x/c/c/caf%C3%A9/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/x/c/c/caf%C3%A9", + "normalized": "/x/c/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/ff", + "normalized": "/x/c/c/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/c/c/c/x", + "normalized": "/x/c/c/c/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/c/c/b/", + "normalized": "/x/c/c/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/c/c/42/x/b/", + "normalized": "/x/c/c/42/x/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/./x/c/c/x/x", + "normalized": "/x/c/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//x/c/c/0a/x", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/x/c/c/a/caf%C3%A9/7", + "normalized": "/x/c/c/a/caf%C3%A9/7", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S14", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S14.s1", + "method": "GET", + "pattern": "/b/x/x", + "transport": "negotiate" + }, + { + "id": "S14.s2", + "method": "DELETE", + "pattern": "/b/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S14.s3", + "method": "GET", + "pattern": "/b/a/b/a", + "transport": "sse" + }, + { + "id": "S14.u1", + "method": "POST", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S14.u2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S14.u3", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/b/7/b" + }, + { + "method": "HEAD", + "raw": "/b/x/x" + }, + { + "method": "OPTIONS", + "raw": "/b/q/../42/a%20b" + }, + { + "method": "OPTIONS", + "raw": "/b/a/b/a" + }, + { + "method": "GET", + "raw": "/b/c/." + }, + { + "method": "GET", + "raw": "/b/a/b/a" + }, + { + "method": "PATCH", + "raw": "/b/a/b/a" + }, + { + "method": "POST", + "raw": "/b/42/./a/b" + }, + { + "method": "DELETE", + "raw": "/b/a" + }, + { + "method": "GET", + "raw": "/b/a/b/a" + }, + { + "method": "PUT", + "raw": "/b/a" + }, + { + "method": "PUT", + "raw": "/b/ff/" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/b/7/b", + "normalized": "/b/7/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/b/x/x", + "normalized": "/b/x/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/q/../42/a%20b", + "normalized": "/b/42/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/c/.", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": { + "id": "S14.s3", + "params": {} + }, + "resolve": { + "id": "S14.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/42/./a/b", + "normalized": "/b/42/a/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": { + "id": "S14.s3", + "params": {} + }, + "resolve": { + "id": "S14.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/b/ff/", + "normalized": "/b/ff", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S15", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/b", + "declarations": [ + { + "id": "S15.s1", + "method": "HEAD", + "pattern": "/x/b/b/a/:p4", + "transport": "buffer" + }, + { + "id": "S15.s2", + "method": "DELETE", + "pattern": "/x/b/:p2([a-c]+)/:p3", + "transport": "buffer" + }, + { + "id": "S15.s3", + "method": "PATCH", + "pattern": "/x/b/:p2([a-c]+)/a/:p4", + "transport": "buffer" + }, + { + "id": "S15.s4", + "method": "PATCH", + "pattern": "/x/b/c/a", + "transport": "buffer" + }, + { + "id": "S15.u1", + "method": "GET", + "pattern": "/:p0/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S15.u2", + "method": "POST", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/x/b/a%20b/a/0a" + }, + { + "method": "POST", + "raw": "/x/b/a/42" + }, + { + "method": "POST", + "raw": "/x/b" + }, + { + "method": "PATCH", + "raw": "/x/b/ff" + }, + { + "method": "HEAD", + "raw": "/x/b/b/a/a" + }, + { + "method": "POST", + "raw": "/x/b/c/a" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/ff" + }, + { + "method": "DELETE", + "raw": "/x/b/c/b" + }, + { + "method": "DELETE", + "raw": "/x/b/caf%C3%A9/a" + }, + { + "method": "PUT", + "raw": "/x/b" + }, + { + "method": "PATCH", + "raw": "/x/b/7/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/./b/b/a" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/x/b/a%20b/a/0a", + "normalized": "/x/b/a%20b/a/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/b/a/42", + "normalized": "/x/b/a/42", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/b", + "normalized": "/x/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/b/ff", + "normalized": "/x/b/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x/b/b/a/a", + "normalized": "/x/b/b/a/a", + "match": { + "id": "S15.s1", + "params": { + "p4": "a" + } + }, + "resolve": { + "id": "S15.s1", + "params": { + "p4": "a" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/b/c/a", + "normalized": "/x/b/c/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/ff", + "normalized": "/x/b/b/ff", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/b/c/b", + "normalized": "/x/b/c/b", + "match": { + "id": "S15.s2", + "params": { + "p2": "c", + "p3": "b" + } + }, + "resolve": { + "id": "S15.s2", + "params": { + "p2": "c", + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/b/caf%C3%A9/a", + "normalized": "/x/b/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/x/b", + "normalized": "/x/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/b/7/caf%C3%A9", + "normalized": "/x/b/7/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/./b/b/a", + "normalized": "/x/b/b/a", + "match": { + "id": "S15.s2", + "params": { + "p2": "b", + "p3": "a" + } + }, + "resolve": { + "id": "S15.s2", + "params": { + "p2": "b", + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S16", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S16.s1", + "method": "HEAD", + "pattern": "/c/x/:p2([0-9a-f]{2})/c", + "transport": "buffer" + }, + { + "id": "S16.s2", + "method": "DELETE", + "pattern": "/c/:p1(\\d+)/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S16.s3", + "method": "POST", + "pattern": "/c/:p1", + "transport": "buffer" + }, + { + "id": "S16.s4", + "method": "PATCH", + "pattern": "/c/b/:p2/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S16.s5", + "method": "POST", + "pattern": "/c/:p1/:p2", + "transport": "buffer" + }, + { + "id": "S16.u1", + "method": "PATCH", + "pattern": "/c/:p1/a", + "transport": "buffer" + }, + { + "id": "S16.u2", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/c/x/c/c/" + }, + { + "method": "GET", + "raw": "/c/a%20b/42/c" + }, + { + "method": "PATCH", + "raw": "/c/x/b/c" + }, + { + "method": "DELETE", + "raw": "/c/0a" + }, + { + "method": "GET", + "raw": "/c/c" + }, + { + "method": "GET", + "raw": "/c/b/a/a%20b" + }, + { + "method": "DELETE", + "raw": "/c/" + }, + { + "method": "OPTIONS", + "raw": "/c/c/c/42" + }, + { + "method": "OPTIONS", + "raw": "/c/ff" + }, + { + "method": "GET", + "raw": "/c/b/b/caf%C3%A9" + }, + { + "method": "PATCH", + "raw": "/c/b/caf%C3%A9/a" + }, + { + "method": "HEAD", + "raw": "/c/a" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/c/x/c/c/", + "normalized": "/c/x/c/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/a%20b/42/c", + "normalized": "/c/a%20b/42/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/x/b/c", + "normalized": "/c/x/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/0a", + "normalized": "/c/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c", + "normalized": "/c/c", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/b/a/a%20b", + "normalized": "/c/b/a/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/c/c/42", + "normalized": "/c/c/c/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/ff", + "normalized": "/c/ff", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/b/b/caf%C3%A9", + "normalized": "/c/b/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/b/caf%C3%A9/a", + "normalized": "/c/b/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/c/a", + "normalized": "/c/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S17", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a/c/c", + "declarations": [ + { + "id": "S17.s1", + "method": "DELETE", + "pattern": "/a/c/c/a", + "transport": "buffer" + }, + { + "id": "S17.s2", + "method": "OPTIONS", + "pattern": "/a/c/c/:p3(\\d+)/:p4", + "transport": "buffer" + }, + { + "id": "S17.s3", + "method": "GET", + "pattern": "/a/c/c/:p3", + "transport": "buffer" + }, + { + "id": "S17.s4", + "method": "POST", + "pattern": "/a/c/c/:p3([0-9a-f]{2})/:p4", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/a/c/c/42/7/." + }, + { + "method": "PATCH", + "raw": "/./a/c/c/c/x" + }, + { + "method": "DELETE", + "raw": "//a/c/c/7/b" + }, + { + "method": "OPTIONS", + "raw": "//a/c/c/a%20b" + }, + { + "method": "GET", + "raw": "/a/./c/c/x/0a" + }, + { + "method": "PUT", + "raw": "/a/c/c/a" + }, + { + "method": "GET", + "raw": "/a/c/c/a" + }, + { + "method": "PATCH", + "raw": "/a/c/c/ff/" + }, + { + "method": "OPTIONS", + "raw": "/a/c/c/b" + }, + { + "method": "DELETE", + "raw": "/a/c/c/a" + }, + { + "method": "DELETE", + "raw": "/a/c/c/42/%34%32" + }, + { + "method": "DELETE", + "raw": "/a/c/c/caf%C3%A9/b" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/a/c/c/42/7/.", + "normalized": "/a/c/c/42/7", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/./a/c/c/c/x", + "normalized": "/a/c/c/c/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "//a/c/c/7/b", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "//a/c/c/a%20b", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/a/./c/c/x/0a", + "normalized": "/a/c/c/x/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/c/a", + "normalized": "/a/c/c/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/c/c/a", + "normalized": "/a/c/c/a", + "match": { + "id": "S17.s3", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S17.s3", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/c/ff/", + "normalized": "/a/c/c/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/c/c/b", + "normalized": "/a/c/c/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c/c/a", + "normalized": "/a/c/c/a", + "match": { + "id": "S17.s1", + "params": {} + }, + "resolve": { + "id": "S17.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c/c/42/%34%32", + "normalized": "/a/c/c/42/%34%32", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c/c/caf%C3%A9/b", + "normalized": "/a/c/c/caf%C3%A9/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S18", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S18.s1", + "method": "DELETE", + "pattern": "/x/x/b/a", + "transport": "buffer" + }, + { + "id": "S18.s2", + "method": "PUT", + "pattern": "/x/:p1/:p2([0-9a-f]{2})/:p3", + "transport": "buffer" + }, + { + "id": "S18.s3", + "method": "OPTIONS", + "pattern": "/x/x", + "transport": "buffer" + }, + { + "id": "S18.s4", + "method": "POST", + "pattern": "/x/c/x", + "transport": "buffer" + }, + { + "id": "S18.u1", + "method": "OPTIONS", + "pattern": "/b/b/:p2([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/x/ff/x/" + }, + { + "method": "OPTIONS", + "raw": "/x/x/x/" + }, + { + "method": "OPTIONS", + "raw": "/x/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/x/x" + }, + { + "method": "POST", + "raw": "/x/0a/." + }, + { + "method": "POST", + "raw": "/x/x" + }, + { + "method": "HEAD", + "raw": "/x/0a/b/a" + }, + { + "method": "GET", + "raw": "/x/x/b/a/" + }, + { + "method": "GET", + "raw": "/x/7/" + }, + { + "method": "DELETE", + "raw": "/x/c/x/" + }, + { + "method": "HEAD", + "raw": "/x/x/" + }, + { + "method": "PATCH", + "raw": "/x/x" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/x/ff/x/", + "normalized": "/x/ff/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/x/x/", + "normalized": "/x/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/caf%C3%A9", + "normalized": "/x/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/x", + "normalized": "/x/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/0a/.", + "normalized": "/x/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/x", + "normalized": "/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/0a/b/a", + "normalized": "/x/0a/b/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/x/b/a/", + "normalized": "/x/x/b/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/7/", + "normalized": "/x/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/c/x/", + "normalized": "/x/c/x", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/x/", + "normalized": "/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/x", + "normalized": "/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + } + ] + }, + { + "id": "S19", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S19.s1", + "method": "DELETE", + "pattern": "/x/:p1(\\d+)/:p2", + "transport": "buffer" + }, + { + "id": "S19.s2", + "method": "GET", + "pattern": "/:p0/c", + "transport": "ndjson" + }, + { + "id": "S19.s3", + "method": "GET", + "pattern": "/:p0([a-c]+)/a", + "transport": "buffer" + }, + { + "id": "S19.u1", + "method": "GET", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S19.u2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/a" + }, + { + "method": "OPTIONS", + "raw": "/ff/a" + }, + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/0a/c" + }, + { + "method": "GET", + "raw": "/x/b/c" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "//b/c" + }, + { + "method": "DELETE", + "raw": "/7/c/" + }, + { + "method": "HEAD", + "raw": "/42/c/" + }, + { + "method": "HEAD", + "raw": "/42/a" + }, + { + "method": "GET", + "raw": "/ff/a%20b/" + }, + { + "method": "OPTIONS", + "raw": "/x/a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/a", + "normalized": "/c/a", + "match": { + "id": "S19.s3", + "params": { + "p0": "c" + } + }, + "resolve": { + "id": "S19.s3", + "params": { + "p0": "c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/ff/a", + "normalized": "/ff/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/0a/c", + "normalized": "/0a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/c", + "normalized": "/x/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "//b/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/7/c/", + "normalized": "/7/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/42/c/", + "normalized": "/42/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/42/a", + "normalized": "/42/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/ff/a%20b/", + "normalized": "/ff/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S20", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a", + "declarations": [ + { + "id": "S20.s1", + "method": "OPTIONS", + "pattern": "/a/x/b", + "transport": "buffer" + }, + { + "id": "S20.s2", + "method": "OPTIONS", + "pattern": "/a/:p1", + "transport": "buffer" + }, + { + "id": "S20.s3", + "method": "GET", + "pattern": "/a/:p1(\\d+)/a/c", + "transport": "sse" + }, + { + "id": "S20.s4", + "method": "HEAD", + "pattern": "/a/x/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/x/caf%C3%A9/7" + }, + { + "method": "GET", + "raw": "/a/0a/b" + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/ff" + }, + { + "method": "HEAD", + "raw": "/a/x/b" + }, + { + "method": "PUT", + "raw": "/q/../a/x/b" + }, + { + "method": "DELETE", + "raw": "//a/x/a/" + }, + { + "method": "GET", + "raw": "/a/x/a" + }, + { + "method": "PATCH", + "raw": "/a/x/b" + }, + { + "method": "GET", + "raw": "/a/a%20b" + }, + { + "method": "GET", + "raw": "/a/%34%32" + }, + { + "method": "PUT", + "raw": "/a/%34%32" + }, + { + "method": "OPTIONS", + "raw": "/a/c/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/x/caf%C3%A9/7", + "normalized": "/a/x/caf%C3%A9/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/0a/b", + "normalized": "/a/0a/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/ff", + "normalized": "/a/caf%C3%A9/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/a/x/b", + "normalized": "/a/x/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/q/../a/x/b", + "normalized": "/a/x/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//a/x/a/", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/a/x/a", + "normalized": "/a/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/x/b", + "normalized": "/a/x/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/a%20b", + "normalized": "/a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/%34%32", + "normalized": "/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/%34%32", + "normalized": "/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/c/", + "normalized": "/a/c", + "match": { + "id": "S20.s2", + "params": { + "p1": "c" + } + }, + "resolve": { + "id": "S20.s2", + "params": { + "p1": "c" + }, + "implicitHead": false + }, + "allow": [ + "OPTIONS" + ] + } + ] + }, + { + "id": "S21", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/b/x", + "declarations": [ + { + "id": "S21.s1", + "method": "GET", + "pattern": "/b/b/x/x/:p4([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S21.s2", + "method": "PATCH", + "pattern": "/b/b/x/:p3/x/a", + "transport": "buffer" + }, + { + "id": "S21.s3", + "method": "PATCH", + "pattern": "/b/b/x/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S21.s4", + "method": "OPTIONS", + "pattern": "/b/b/x/c/x/:p5", + "transport": "buffer" + }, + { + "id": "S21.s5", + "method": "GET", + "pattern": "/b/b/x/:p3*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/b/b/x/7/x/a" + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/x/ff" + }, + { + "method": "POST", + "raw": "/b/b/x/0a" + }, + { + "method": "GET", + "raw": "//b/b/x/42/c" + }, + { + "method": "GET", + "raw": "/b/b/x/x/" + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/a%20b/x/a" + }, + { + "method": "GET", + "raw": "/b/b/x/c/x/a%20b" + }, + { + "method": "GET", + "raw": "/b/b/x/x/x/a" + }, + { + "method": "POST", + "raw": "/b/b/x/b" + }, + { + "method": "PUT", + "raw": "/b/b/x/c/b/a%20b" + }, + { + "method": "DELETE", + "raw": "/b/b/x/c/x/a" + }, + { + "method": "PATCH", + "raw": "/b/q/../b/x/x" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/b/b/x/7/x/a", + "normalized": "/b/b/x/7/x/a", + "match": { + "id": "S21.s2", + "params": { + "p3": "7" + } + }, + "resolve": { + "id": "S21.s2", + "params": { + "p3": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/x/ff", + "normalized": "/b/b/x/x/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/x/0a", + "normalized": "/b/b/x/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//b/b/x/42/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/b/b/x/x/", + "normalized": "/b/b/x/x", + "match": { + "id": "S21.s5", + "params": { + "p3": "x" + } + }, + "resolve": { + "id": "S21.s5", + "params": { + "p3": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/a%20b/x/a", + "normalized": "/b/b/x/a%20b/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/b/x/c/x/a%20b", + "normalized": "/b/b/x/c/x/a%20b", + "match": { + "id": "S21.s5", + "params": { + "p3": "c/x/a b" + } + }, + "resolve": { + "id": "S21.s5", + "params": { + "p3": "c/x/a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/b/x/x/x/a", + "normalized": "/b/b/x/x/x/a", + "match": { + "id": "S21.s5", + "params": { + "p3": "x/x/a" + } + }, + "resolve": { + "id": "S21.s5", + "params": { + "p3": "x/x/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/x/b", + "normalized": "/b/b/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/b/x/c/b/a%20b", + "normalized": "/b/b/x/c/b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/x/c/x/a", + "normalized": "/b/b/x/c/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/q/../b/x/x", + "normalized": "/b/b/x/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S22", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S22.s1", + "method": "PUT", + "pattern": "/x/b/c", + "transport": "buffer" + }, + { + "id": "S22.s2", + "method": "PATCH", + "pattern": "/:p0/:p1([0-9a-f]{2})/x", + "transport": "buffer" + }, + { + "id": "S22.s3", + "method": "HEAD", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "S22.s4", + "method": "PATCH", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S22.s5", + "method": "DELETE", + "pattern": "/b/:p1([a-c]+)/:p2", + "transport": "buffer" + }, + { + "id": "S22.u1", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/a" + }, + { + "method": "PATCH", + "raw": "/x/b/q/../c" + }, + { + "method": "OPTIONS", + "raw": "/b/ff/a%20b" + }, + { + "method": "OPTIONS", + "raw": "/a%20b" + }, + { + "method": "PUT", + "raw": "/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/b/42/a/" + }, + { + "method": "OPTIONS", + "raw": "/x" + }, + { + "method": "GET", + "raw": "/42" + }, + { + "method": "GET", + "raw": "/." + }, + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "GET", + "raw": "/x/b/c" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "a" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/b/q/../c", + "normalized": "/x/b/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/ff/a%20b", + "normalized": "/b/ff/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/42/a/", + "normalized": "/b/42/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/42", + "normalized": "/42", + "match": { + "id": "S22.u1", + "params": { + "p0": "42" + } + }, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/.", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/c", + "normalized": "/x/b/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S23", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/x/c", + "declarations": [ + { + "id": "S23.s1", + "method": "HEAD", + "pattern": "/c/x/c/b/x/a", + "transport": "buffer" + }, + { + "id": "S23.s2", + "method": "POST", + "pattern": "/c/x/c/:p3", + "transport": "buffer" + }, + { + "id": "S23.s3", + "method": "DELETE", + "pattern": "/c/x/c/a", + "transport": "buffer" + }, + { + "id": "S23.s4", + "method": "DELETE", + "pattern": "/c/x/c/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S23.s5", + "method": "OPTIONS", + "pattern": "/c/x/c/:p3([a-c]+)/x", + "transport": "buffer" + }, + { + "id": "S23.s6", + "method": "POST", + "pattern": "/c/x/c/:p3([a-c]+)/:p4(\\d+)", + "transport": "buffer" + }, + { + "id": "S23.u1", + "method": "POST", + "pattern": "/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/c/x/q/../c/b/x" + }, + { + "method": "PUT", + "raw": "/c/x/c/b/x/a" + }, + { + "method": "PATCH", + "raw": "/c/x/c" + }, + { + "method": "GET", + "raw": "/c/x/c/c" + }, + { + "method": "GET", + "raw": "/c/x/c/7" + }, + { + "method": "HEAD", + "raw": "/c/x/c/a" + }, + { + "method": "DELETE", + "raw": "/c/x/c/7/7" + }, + { + "method": "OPTIONS", + "raw": "/c/x/c" + }, + { + "method": "PATCH", + "raw": "/c/x/c/0a/." + }, + { + "method": "HEAD", + "raw": "/c/x/c/ff/x" + }, + { + "method": "HEAD", + "raw": "/c/x/c/x/c" + }, + { + "method": "GET", + "raw": "/c/x/c/a" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/c/x/q/../c/b/x", + "normalized": "/c/x/c/b/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/x/c/b/x/a", + "normalized": "/c/x/c/b/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/x/c", + "normalized": "/c/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/x/c/c", + "normalized": "/c/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/c/7", + "normalized": "/c/x/c/7", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/c/a", + "normalized": "/c/x/c/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/x/c/7/7", + "normalized": "/c/x/c/7/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/x/c", + "normalized": "/c/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/x/c/0a/.", + "normalized": "/c/x/c/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/c/ff/x", + "normalized": "/c/x/c/ff/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/c/x/c/x/c", + "normalized": "/c/x/c/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/x/c/a", + "normalized": "/c/x/c/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S24", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S24.s1", + "method": "HEAD", + "pattern": "/b/x/x/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S24.s2", + "method": "OPTIONS", + "pattern": "/b/:p1/:p2", + "transport": "buffer" + }, + { + "id": "S24.s3", + "method": "GET", + "pattern": "/b/:p1*", + "transport": "ndjson" + }, + { + "id": "S24.s4", + "method": "OPTIONS", + "pattern": "/b/b/:p2", + "transport": "buffer" + }, + { + "id": "S24.u1", + "method": "GET", + "pattern": "/c/c/b/:p3*", + "transport": "buffer" + }, + { + "id": "S24.u2", + "method": "HEAD", + "pattern": "/x/b/:p2", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/b/x/a/." + }, + { + "method": "OPTIONS", + "raw": "/b/42/7" + }, + { + "method": "POST", + "raw": "/b" + }, + { + "method": "DELETE", + "raw": "/b/x/c/" + }, + { + "method": "DELETE", + "raw": "/b/b/ff/" + }, + { + "method": "PUT", + "raw": "//b/b/ff" + }, + { + "method": "PUT", + "raw": "/b/b/caf%C3%A9/" + }, + { + "method": "PATCH", + "raw": "/b/x/x/b/" + }, + { + "method": "HEAD", + "raw": "/b" + }, + { + "method": "GET", + "raw": "//b/b/q/../7" + }, + { + "method": "GET", + "raw": "/b/x/x/0a" + }, + { + "method": "PUT", + "raw": "/b/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/b/x/a/.", + "normalized": "/b/x/a", + "match": { + "id": "S24.s3", + "params": { + "p1": "x/a" + } + }, + "resolve": { + "id": "S24.s3", + "params": { + "p1": "x/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/42/7", + "normalized": "/b/42/7", + "match": { + "id": "S24.s2", + "params": { + "p1": "42", + "p2": "7" + } + }, + "resolve": { + "id": "S24.s2", + "params": { + "p1": "42", + "p2": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/x/c/", + "normalized": "/b/x/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/ff/", + "normalized": "/b/b/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//b/b/ff", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "/b/b/caf%C3%A9/", + "normalized": "/b/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/x/b/", + "normalized": "/b/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//b/b/q/../7", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/b/x/x/0a", + "normalized": "/b/x/x/0a", + "match": { + "id": "S24.s3", + "params": { + "p1": "x/x/0a" + } + }, + "resolve": { + "id": "S24.s3", + "params": { + "p1": "x/x/0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/b", + "normalized": "/b/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "S25", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a", + "declarations": [ + { + "id": "S25.s1", + "method": "GET", + "pattern": "/a/x", + "transport": "negotiate" + }, + { + "id": "S25.s2", + "method": "PATCH", + "pattern": "/a/:p1/:p2/:p3", + "transport": "buffer" + }, + { + "id": "S25.s3", + "method": "GET", + "pattern": "/a/:p1/:p2/:p3([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S25.s4", + "method": "GET", + "pattern": "/a/b", + "transport": "buffer" + }, + { + "id": "S25.s5", + "method": "PUT", + "pattern": "/a/:p1(\\d+)/a", + "transport": "buffer" + }, + { + "id": "S25.s6", + "method": "DELETE", + "pattern": "/a/:p1*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "GET", + "raw": "/a/b" + }, + { + "method": "PATCH", + "raw": "/a/c/a%20b" + }, + { + "method": "GET", + "raw": "/a/%34%32/a" + }, + { + "method": "PATCH", + "raw": "/a/7" + }, + { + "method": "HEAD", + "raw": "/a/42/b/a" + }, + { + "method": "POST", + "raw": "/a/42/b/" + }, + { + "method": "GET", + "raw": "/a/7/%34%32/a" + }, + { + "method": "OPTIONS", + "raw": "/a/./7/0a/x" + }, + { + "method": "DELETE", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "/a/b/" + }, + { + "method": "POST", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "S25.s4", + "params": {} + }, + "resolve": { + "id": "S25.s4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/a%20b", + "normalized": "/a/c/a%20b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/%34%32/a", + "normalized": "/a/%34%32/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/7", + "normalized": "/a/7", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/42/b/a", + "normalized": "/a/42/b/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/42/b/", + "normalized": "/a/42/b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/7/%34%32/a", + "normalized": "/a/7/%34%32/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/./7/0a/x", + "normalized": "/a/7/0a/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "S25.s6", + "params": { + "p1": "b" + } + }, + "resolve": { + "id": "S25.s6", + "params": { + "p1": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/", + "normalized": "/a/b", + "match": { + "id": "S25.s4", + "params": {} + }, + "resolve": { + "id": "S25.s4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S26", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S26.s1", + "method": "DELETE", + "pattern": "/c/:p1([0-9a-f]{2})/x", + "transport": "buffer" + }, + { + "id": "S26.s2", + "method": "DELETE", + "pattern": "/:p0/b/:p2", + "transport": "buffer" + }, + { + "id": "S26.s3", + "method": "GET", + "pattern": "/:p0/:p1([0-9a-f]{2})/:p2", + "transport": "buffer" + }, + { + "id": "S26.s4", + "method": "GET", + "pattern": "/:p0/:p1", + "transport": "buffer" + }, + { + "id": "S26.s5", + "method": "PATCH", + "pattern": "/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/b/a%20b" + }, + { + "method": "DELETE", + "raw": "/%34%32/b/7" + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/a" + }, + { + "method": "PATCH", + "raw": "/q/.." + }, + { + "method": "PUT", + "raw": "/a%20b/./0a/x" + }, + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "GET", + "raw": "/c/%34%32/a%20b" + }, + { + "method": "HEAD", + "raw": "/c/0a/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/42" + }, + { + "method": "PATCH", + "raw": "/c/a%20b/x" + }, + { + "method": "GET", + "raw": "/caf%C3%A9/b/b" + }, + { + "method": "GET", + "raw": "/caf%C3%A9" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/b/a%20b", + "normalized": "/caf%C3%A9/b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/%34%32/b/7", + "normalized": "/%34%32/b/7", + "match": { + "id": "S26.s2", + "params": { + "p0": "42", + "p2": "7" + } + }, + "resolve": { + "id": "S26.s2", + "params": { + "p0": "42", + "p2": "7" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/a", + "normalized": "/a/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a%20b/./0a/x", + "normalized": "/a%20b/0a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "S26.s5", + "params": {} + }, + "resolve": { + "id": "S26.s5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/%34%32/a%20b", + "normalized": "/c/%34%32/a%20b", + "match": { + "id": "S26.s3", + "params": { + "p0": "c", + "p1": "42", + "p2": "a b" + } + }, + "resolve": { + "id": "S26.s3", + "params": { + "p0": "c", + "p1": "42", + "p2": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/0a/caf%C3%A9", + "normalized": "/c/0a/caf%C3%A9", + "match": null, + "resolve": { + "id": "S26.s3", + "params": { + "p0": "c", + "p1": "0a", + "p2": "café" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/a%20b/x", + "normalized": "/c/a%20b/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/caf%C3%A9/b/b", + "normalized": "/caf%C3%A9/b/b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S27", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S27.s1", + "method": "PUT", + "pattern": "/c/x", + "transport": "buffer" + }, + { + "id": "S27.s2", + "method": "HEAD", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S27.s3", + "method": "POST", + "pattern": "/b/:p1", + "transport": "buffer" + }, + { + "id": "S27.s4", + "method": "GET", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "S27.u1", + "method": "HEAD", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S27.u2", + "method": "OPTIONS", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/b/x" + }, + { + "method": "PATCH", + "raw": "/b" + }, + { + "method": "GET", + "raw": "/42" + }, + { + "method": "GET", + "raw": "/c/x" + }, + { + "method": "POST", + "raw": "/b/%34%32" + }, + { + "method": "HEAD", + "raw": "/c/x/" + }, + { + "method": "OPTIONS", + "raw": "/c/x" + }, + { + "method": "PUT", + "raw": "/b/42" + }, + { + "method": "HEAD", + "raw": "/b/c/." + }, + { + "method": "HEAD", + "raw": "/0a/q/.." + }, + { + "method": "HEAD", + "raw": "/b/%34%32" + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/42" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/b/x", + "normalized": "/b/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/42", + "normalized": "/42", + "match": { + "id": "S27.s4", + "params": { + "p0": "42" + } + }, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x", + "normalized": "/c/x", + "match": { + "id": "S27.s4", + "params": { + "p0": "c/x" + } + }, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "c/x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/%34%32", + "normalized": "/b/%34%32", + "match": { + "id": "S27.s3", + "params": { + "p1": "42" + } + }, + "resolve": { + "id": "S27.s3", + "params": { + "p1": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/", + "normalized": "/c/x", + "match": null, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "c/x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/x", + "normalized": "/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/42", + "normalized": "/b/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/c/.", + "normalized": "/b/c", + "match": null, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "b/c" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/0a/q/..", + "normalized": "/0a", + "match": { + "id": "S27.u1", + "params": { + "p0": "0a" + } + }, + "resolve": { + "id": "S27.u1", + "params": { + "p0": "0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/%34%32", + "normalized": "/b/%34%32", + "match": null, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "b/42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/42", + "normalized": "/x/caf%C3%A9/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S28", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S28.s1", + "method": "OPTIONS", + "pattern": "/c/c/c", + "transport": "buffer" + }, + { + "id": "S28.s2", + "method": "GET", + "pattern": "/c/:p1", + "transport": "negotiate" + }, + { + "id": "S28.s3", + "method": "PUT", + "pattern": "/c/a/a", + "transport": "buffer" + }, + { + "id": "S28.s4", + "method": "PATCH", + "pattern": "/c/:p1*", + "transport": "buffer" + }, + { + "id": "S28.u1", + "method": "HEAD", + "pattern": "/b/:p1*", + "transport": "buffer" + }, + { + "id": "S28.u2", + "method": "POST", + "pattern": "/:p0/:p1", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/42/x" + }, + { + "method": "PUT", + "raw": "/c/a/a" + }, + { + "method": "GET", + "raw": "/c/b/" + }, + { + "method": "GET", + "raw": "/c/a/a/" + }, + { + "method": "GET", + "raw": "/c/a" + }, + { + "method": "GET", + "raw": "/c/ff/" + }, + { + "method": "DELETE", + "raw": "/c/./%34%32" + }, + { + "method": "HEAD", + "raw": "/c/x" + }, + { + "method": "HEAD", + "raw": "/c/c/c" + }, + { + "method": "POST", + "raw": "/c/a/7" + }, + { + "method": "PATCH", + "raw": "/c/a/" + }, + { + "method": "HEAD", + "raw": "/c/a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/42/x", + "normalized": "/c/42/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/a/a", + "normalized": "/c/a/a", + "match": { + "id": "S28.s3", + "params": {} + }, + "resolve": { + "id": "S28.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/b/", + "normalized": "/c/b", + "match": { + "id": "S28.s2", + "params": { + "p1": "b" + } + }, + "resolve": { + "id": "S28.s2", + "params": { + "p1": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/a/", + "normalized": "/c/a/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a", + "normalized": "/c/a", + "match": { + "id": "S28.s2", + "params": { + "p1": "a" + } + }, + "resolve": { + "id": "S28.s2", + "params": { + "p1": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/ff/", + "normalized": "/c/ff", + "match": { + "id": "S28.s2", + "params": { + "p1": "ff" + } + }, + "resolve": { + "id": "S28.s2", + "params": { + "p1": "ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/./%34%32", + "normalized": "/c/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x", + "normalized": "/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/c/c", + "normalized": "/c/c/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/a/7", + "normalized": "/c/a/7", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/a/", + "normalized": "/c/a", + "match": { + "id": "S28.s4", + "params": { + "p1": "a" + } + }, + "resolve": { + "id": "S28.s4", + "params": { + "p1": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/a", + "normalized": "/c/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "S29", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S29.s1", + "method": "GET", + "pattern": "/x/a/:p2", + "transport": "buffer" + }, + { + "id": "S29.s2", + "method": "PUT", + "pattern": "/x/:p1/a/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S29.s3", + "method": "HEAD", + "pattern": "/x/:p1/:p2/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S29.s4", + "method": "POST", + "pattern": "/x/:p1/:p2/:p3", + "transport": "buffer" + }, + { + "id": "S29.u1", + "method": "DELETE", + "pattern": "/x", + "transport": "buffer" + }, + { + "id": "S29.u2", + "method": "GET", + "pattern": "/x/:p1(\\d+)/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "DELETE", + "raw": "/x/%34%32/7/" + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/a/0a/" + }, + { + "method": "HEAD", + "raw": "/x/ff/a/./caf%C3%A9" + }, + { + "method": "GET", + "raw": "/x/7/a%20b" + }, + { + "method": "DELETE", + "raw": "/q/../x/%34%32/a/0a" + }, + { + "method": "OPTIONS", + "raw": "/x/7/x/42" + }, + { + "method": "OPTIONS", + "raw": "/x/a/a%20b" + }, + { + "method": "GET", + "raw": "/x/0a/b/x" + }, + { + "method": "PATCH", + "raw": "/x/42/%34%32/c" + }, + { + "method": "OPTIONS", + "raw": "/x/a%20b/c/./7" + }, + { + "method": "DELETE", + "raw": "/x" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/%34%32/7/", + "normalized": "/x/%34%32/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/a/0a/", + "normalized": "/x/caf%C3%A9/a/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/ff/a/./caf%C3%A9", + "normalized": "/x/ff/a/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/7/a%20b", + "normalized": "/x/7/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/q/../x/%34%32/a/0a", + "normalized": "/x/%34%32/a/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/7/x/42", + "normalized": "/x/7/x/42", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/a/a%20b", + "normalized": "/x/a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/0a/b/x", + "normalized": "/x/0a/b/x", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/42/%34%32/c", + "normalized": "/x/42/%34%32/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/a%20b/c/./7", + "normalized": "/x/a%20b/c/7", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x", + "normalized": "/x", + "match": { + "id": "S29.u1", + "params": {} + }, + "resolve": { + "id": "S29.u1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S30", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a/a", + "declarations": [ + { + "id": "S30.s1", + "method": "GET", + "pattern": "/a/a/c/c", + "transport": "buffer" + }, + { + "id": "S30.s2", + "method": "HEAD", + "pattern": "/a/a/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S30.s3", + "method": "GET", + "pattern": "/a/a/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S30.u1", + "method": "GET", + "pattern": "/c", + "transport": "sse" + }, + { + "id": "S30.u2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S30.u3", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/q/../a/a/42/caf%C3%A9" + }, + { + "method": "POST", + "raw": "/a/a/a" + }, + { + "method": "DELETE", + "raw": "//a/a/c/c" + }, + { + "method": "PUT", + "raw": "/a/a/c" + }, + { + "method": "GET", + "raw": "/./a/a/c/c" + }, + { + "method": "OPTIONS", + "raw": "/a/a/c/c" + }, + { + "method": "GET", + "raw": "/./a/a/b" + }, + { + "method": "GET", + "raw": "/a/a/b/" + }, + { + "method": "HEAD", + "raw": "/a/a/c" + }, + { + "method": "HEAD", + "raw": "/a/a/7/" + }, + { + "method": "DELETE", + "raw": "/a/a/0a" + }, + { + "method": "DELETE", + "raw": "/a/a/%34%32/" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/q/../a/a/42/caf%C3%A9", + "normalized": "/a/a/42/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/a/a/a", + "normalized": "/a/a/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//a/a/c/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "/a/a/c", + "normalized": "/a/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/./a/a/c/c", + "normalized": "/a/a/c/c", + "match": { + "id": "S30.s1", + "params": {} + }, + "resolve": { + "id": "S30.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/a/c/c", + "normalized": "/a/a/c/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/./a/a/b", + "normalized": "/a/a/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/a/b/", + "normalized": "/a/a/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/a/c", + "normalized": "/a/a/c", + "match": { + "id": "S30.s2", + "params": { + "p2": "c" + } + }, + "resolve": { + "id": "S30.s2", + "params": { + "p2": "c" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/a/7/", + "normalized": "/a/a/7", + "match": null, + "resolve": { + "id": "S30.s3", + "params": { + "p2": "7" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/a/0a", + "normalized": "/a/a/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/a/a/%34%32/", + "normalized": "/a/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S31", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/x/x", + "declarations": [ + { + "id": "S31.s1", + "method": "HEAD", + "pattern": "/b/x/x/x/c/c", + "transport": "buffer" + }, + { + "id": "S31.s2", + "method": "PATCH", + "pattern": "/b/x/x/:p3/c", + "transport": "buffer" + }, + { + "id": "S31.s3", + "method": "GET", + "pattern": "/b/x/x/b", + "transport": "buffer" + }, + { + "id": "S31.u1", + "method": "OPTIONS", + "pattern": "/:p0/:p1/x/:p3*", + "transport": "buffer" + }, + { + "id": "S31.u2", + "method": "PUT", + "pattern": "/c/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S31.u3", + "method": "PUT", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/b/x/x/c/0a" + }, + { + "method": "PATCH", + "raw": "/b/x/x/x/c/c" + }, + { + "method": "POST", + "raw": "/b/x/x/c/c" + }, + { + "method": "GET", + "raw": "/b/x/x/x" + }, + { + "method": "PUT", + "raw": "/b/x/x/b/c" + }, + { + "method": "HEAD", + "raw": "/b/x/x/c" + }, + { + "method": "GET", + "raw": "/b/x/x/42/c" + }, + { + "method": "POST", + "raw": "/b/x/x/c/ff/ff/" + }, + { + "method": "PUT", + "raw": "/b/x/x/caf%C3%A9/a%20b" + }, + { + "method": "POST", + "raw": "/b/x/x/42/c" + }, + { + "method": "DELETE", + "raw": "/b/x/x/b/." + }, + { + "method": "GET", + "raw": "/b/x/x/c" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/b/x/x/c/0a", + "normalized": "/b/x/x/c/0a", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/x/x/c/c", + "normalized": "/b/x/x/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/c/c", + "normalized": "/b/x/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/x/x", + "normalized": "/b/x/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/x/x/b/c", + "normalized": "/b/x/x/b/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/x/x/c", + "normalized": "/b/x/x/c", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/x/42/c", + "normalized": "/b/x/x/42/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/c/ff/ff/", + "normalized": "/b/x/x/c/ff/ff", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/x/x/caf%C3%A9/a%20b", + "normalized": "/b/x/x/caf%C3%A9/a%20b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/42/c", + "normalized": "/b/x/x/42/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/x/x/b/.", + "normalized": "/b/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/x/c", + "normalized": "/b/x/x/c", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + } + ] + }, + { + "id": "S32", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S32.s1", + "method": "HEAD", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S32.s2", + "method": "DELETE", + "pattern": "/:p0/c", + "transport": "buffer" + }, + { + "id": "S32.s3", + "method": "GET", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S32.u1", + "method": "PATCH", + "pattern": "/a/:p1([a-c]+)/:p2", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/caf%C3%A9/7" + }, + { + "method": "OPTIONS", + "raw": "/x/c" + }, + { + "method": "HEAD", + "raw": "//a" + }, + { + "method": "OPTIONS", + "raw": "/a" + }, + { + "method": "PATCH", + "raw": "/0a/c" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/a/" + }, + { + "method": "DELETE", + "raw": "/a" + }, + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "PUT", + "raw": "/%34%32" + }, + { + "method": "GET", + "raw": "/./a" + }, + { + "method": "GET", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/caf%C3%A9/7", + "normalized": "/caf%C3%A9/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/c", + "normalized": "/x/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "//a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/0a/c", + "normalized": "/0a/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "S32.s3", + "params": {} + }, + "resolve": { + "id": "S32.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/./a", + "normalized": "/a", + "match": { + "id": "S32.s3", + "params": {} + }, + "resolve": { + "id": "S32.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "S32.s3", + "params": {} + }, + "resolve": { + "id": "S32.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S33", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/x", + "declarations": [ + { + "id": "S33.s1", + "method": "PATCH", + "pattern": "/c/x/x/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S33.s2", + "method": "GET", + "pattern": "/c/x/:p2", + "transport": "sse" + }, + { + "id": "S33.s3", + "method": "GET", + "pattern": "/c/x/x/:p3([a-c]+)", + "transport": "negotiate" + }, + { + "id": "S33.s4", + "method": "PUT", + "pattern": "/c/x/b/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S33.s5", + "method": "HEAD", + "pattern": "/c/x/a/:p3/b", + "transport": "buffer" + }, + { + "id": "S33.u1", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S33.u2", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S33.u3", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/x/b/caf%C3%A9" + }, + { + "method": "PUT", + "raw": "/c/x/a/caf%C3%A9/b" + }, + { + "method": "PUT", + "raw": "/c/x/x/ff" + }, + { + "method": "PUT", + "raw": "/c/x/x/b" + }, + { + "method": "DELETE", + "raw": "/c/./x/a/a%20b/b" + }, + { + "method": "HEAD", + "raw": "/c/x" + }, + { + "method": "PUT", + "raw": "//c/x/c" + }, + { + "method": "PATCH", + "raw": "/c/x/b/42" + }, + { + "method": "GET", + "raw": "/c/x/x/7" + }, + { + "method": "POST", + "raw": "/c/x/a/x" + }, + { + "method": "OPTIONS", + "raw": "/c/x/./a%20b/c/a%20b" + }, + { + "method": "DELETE", + "raw": "/c/x/a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/x/b/caf%C3%A9", + "normalized": "/c/x/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/x/a/caf%C3%A9/b", + "normalized": "/c/x/a/caf%C3%A9/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/x/x/ff", + "normalized": "/c/x/x/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/x/x/b", + "normalized": "/c/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/./x/a/a%20b/b", + "normalized": "/c/x/a/a%20b/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x", + "normalized": "/c/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "//c/x/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PATCH", + "raw": "/c/x/b/42", + "normalized": "/c/x/b/42", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/7", + "normalized": "/c/x/x/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/c/x/a/x", + "normalized": "/c/x/a/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/x/./a%20b/c/a%20b", + "normalized": "/c/x/a%20b/c/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/x/a", + "normalized": "/c/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "S34", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/c/b", + "declarations": [ + { + "id": "S34.s1", + "method": "OPTIONS", + "pattern": "/c/c/b/b/b", + "transport": "buffer" + }, + { + "id": "S34.s2", + "method": "OPTIONS", + "pattern": "/c/c/b/:p3(\\d+)/c/:p5(\\d+)", + "transport": "buffer" + }, + { + "id": "S34.s3", + "method": "GET", + "pattern": "/c/c/b/x/b", + "transport": "buffer" + }, + { + "id": "S34.s4", + "method": "DELETE", + "pattern": "/c/c/b/a/b/:p5(\\d+)", + "transport": "buffer" + }, + { + "id": "S34.u1", + "method": "OPTIONS", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S34.u2", + "method": "POST", + "pattern": "/c/:p1/:p2*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/c/b/b/b" + }, + { + "method": "GET", + "raw": "/c/c/b/a/a" + }, + { + "method": "DELETE", + "raw": "/c/c/b/b/b" + }, + { + "method": "PUT", + "raw": "/c/c/b/x/b" + }, + { + "method": "POST", + "raw": "/c/c/b/b/./b" + }, + { + "method": "DELETE", + "raw": "/c/c/b/x/c/42/" + }, + { + "method": "GET", + "raw": "/c/c/b/a/b/%34%32/" + }, + { + "method": "GET", + "raw": "/c/c/b/a/b" + }, + { + "method": "DELETE", + "raw": "//c/c/b/b/b/" + }, + { + "method": "PATCH", + "raw": "/c/c/b" + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/b/c/c" + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/x/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/c/b/b/b", + "normalized": "/c/c/b/b/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/b/a/a", + "normalized": "/c/c/b/a/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/c/b/b/b", + "normalized": "/c/c/b/b/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/c/b/x/b", + "normalized": "/c/c/b/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/c/b/b/./b", + "normalized": "/c/c/b/b/b", + "match": { + "id": "S34.u2", + "params": { + "p1": "c", + "p2": "b/b/b" + } + }, + "resolve": { + "id": "S34.u2", + "params": { + "p1": "c", + "p2": "b/b/b" + }, + "implicitHead": false + }, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/c/b/x/c/42/", + "normalized": "/c/c/b/x/c/42", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/b/a/b/%34%32/", + "normalized": "/c/c/b/a/b/%34%32", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/b/a/b", + "normalized": "/c/c/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//c/c/b/b/b/", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PATCH", + "raw": "/c/c/b", + "normalized": "/c/c/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/b/c/c", + "normalized": "/c/c/b/b/c/c", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/x/b", + "normalized": "/c/c/b/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S35", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S35.s1", + "method": "GET", + "pattern": "/b/a/b", + "transport": "buffer" + }, + { + "id": "S35.s2", + "method": "GET", + "pattern": "/b/:p1([a-c]+)", + "transport": "buffer" + }, + { + "id": "S35.s3", + "method": "PUT", + "pattern": "/b/b/x", + "transport": "buffer" + }, + { + "id": "S35.s4", + "method": "GET", + "pattern": "/b/:p1(\\d+)/x/c", + "transport": "buffer" + }, + { + "id": "S35.u1", + "method": "DELETE", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "S35.u2", + "method": "POST", + "pattern": "/b", + "transport": "buffer" + }, + { + "id": "S35.u3", + "method": "GET", + "pattern": "/:p0([a-c]+)/:p1/b", + "transport": "negotiate" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/b/a%20b/x/c" + }, + { + "method": "POST", + "raw": "/b/b/x" + }, + { + "method": "OPTIONS", + "raw": "/b/a/b" + }, + { + "method": "GET", + "raw": "/b/a/b" + }, + { + "method": "POST", + "raw": "/b/b" + }, + { + "method": "OPTIONS", + "raw": "/b/c/" + }, + { + "method": "DELETE", + "raw": "/b/a%20b/x/c/" + }, + { + "method": "HEAD", + "raw": "/b/a/b" + }, + { + "method": "OPTIONS", + "raw": "/b/7" + }, + { + "method": "GET", + "raw": "/b/a/x/c" + }, + { + "method": "DELETE", + "raw": "/b/a" + }, + { + "method": "GET", + "raw": "/b/7/x/c" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/b/a%20b/x/c", + "normalized": "/b/a%20b/x/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/x", + "normalized": "/b/b/x", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": { + "id": "S35.s1", + "params": {} + }, + "resolve": { + "id": "S35.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b", + "normalized": "/b/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/c/", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/a%20b/x/c/", + "normalized": "/b/a%20b/x/c", + "match": { + "id": "S35.u1", + "params": { + "p0": "b/a b/x/c" + } + }, + "resolve": { + "id": "S35.u1", + "params": { + "p0": "b/a b/x/c" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": null, + "resolve": { + "id": "S35.s1", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/7", + "normalized": "/b/7", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a/x/c", + "normalized": "/b/a/x/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/a", + "normalized": "/b/a", + "match": { + "id": "S35.u1", + "params": { + "p0": "b/a" + } + }, + "resolve": { + "id": "S35.u1", + "params": { + "p0": "b/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/7/x/c", + "normalized": "/b/7/x/c", + "match": { + "id": "S35.s4", + "params": { + "p1": "7" + } + }, + "resolve": { + "id": "S35.s4", + "params": { + "p1": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S36", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S36.s1", + "method": "POST", + "pattern": "/x/a/:p2", + "transport": "buffer" + }, + { + "id": "S36.s2", + "method": "GET", + "pattern": "/x/:p1/:p2([a-c]+)", + "transport": "sse" + }, + { + "id": "S36.s3", + "method": "HEAD", + "pattern": "/x/a/b", + "transport": "buffer" + }, + { + "id": "S36.s4", + "method": "GET", + "pattern": "/x/:p1*", + "transport": "buffer" + }, + { + "id": "S36.s5", + "method": "PUT", + "pattern": "/x/c/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S36.s6", + "method": "PATCH", + "pattern": "/x/:p1/x/:p3", + "transport": "buffer" + }, + { + "id": "S36.u1", + "method": "OPTIONS", + "pattern": "/c/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S36.u2", + "method": "PUT", + "pattern": "/:p0([a-c]+)/:p1", + "transport": "buffer" + }, + { + "id": "S36.u3", + "method": "PUT", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/x/0a/b/ff/" + }, + { + "method": "GET", + "raw": "/x/a/42" + }, + { + "method": "PUT", + "raw": "/x/a" + }, + { + "method": "OPTIONS", + "raw": "/x/" + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b" + }, + { + "method": "POST", + "raw": "/x/a/b/" + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b" + }, + { + "method": "HEAD", + "raw": "/x/caf%C3%A9/x/%34%32" + }, + { + "method": "HEAD", + "raw": "//x/a/42" + }, + { + "method": "HEAD", + "raw": "/x/c/c" + }, + { + "method": "PATCH", + "raw": "/x/b/./a" + }, + { + "method": "PATCH", + "raw": "/x/a/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/x/0a/b/ff/", + "normalized": "/x/0a/b/ff", + "match": { + "id": "S36.s4", + "params": { + "p1": "0a/b/ff" + } + }, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "0a/b/ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/a/42", + "normalized": "/x/a/42", + "match": { + "id": "S36.s4", + "params": { + "p1": "a/42" + } + }, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "a/42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b", + "normalized": "/x/a/a%20b", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "a/a b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/a/b/", + "normalized": "/x/a/b", + "match": { + "id": "S36.s1", + "params": { + "p2": "b" + } + }, + "resolve": { + "id": "S36.s1", + "params": { + "p2": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b", + "normalized": "/x/a/a%20b", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "a/a b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/caf%C3%A9/x/%34%32", + "normalized": "/x/caf%C3%A9/x/%34%32", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "café/x/42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "//x/a/42", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "HEAD", + "raw": "/x/c/c", + "normalized": "/x/c/c", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "c/c" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/b/./a", + "normalized": "/x/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/a/", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S37", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S37.s1", + "method": "OPTIONS", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S37.s2", + "method": "GET", + "pattern": "/:p0/:p1", + "transport": "buffer" + }, + { + "id": "S37.s3", + "method": "DELETE", + "pattern": "/:p0/c/x", + "transport": "buffer" + }, + { + "id": "S37.s4", + "method": "PUT", + "pattern": "/:p0/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S37.s5", + "method": "GET", + "pattern": "/c/:p1", + "transport": "buffer" + }, + { + "id": "S37.u1", + "method": "PATCH", + "pattern": "/c", + "transport": "buffer" + }, + { + "id": "S37.u2", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/c/a" + }, + { + "method": "GET", + "raw": "/b/caf%C3%A9/c/." + }, + { + "method": "POST", + "raw": "/caf%C3%A9/c/x" + }, + { + "method": "DELETE", + "raw": "/c/%34%32/a%20b" + }, + { + "method": "HEAD", + "raw": "/a%20b/a%20b/ff/" + }, + { + "method": "GET", + "raw": "/b/0a" + }, + { + "method": "GET", + "raw": "/b/a%20b/" + }, + { + "method": "GET", + "raw": "/c/a/a" + }, + { + "method": "GET", + "raw": "/a%20b/c/" + }, + { + "method": "OPTIONS", + "raw": "/42/x/b" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a", + "normalized": "/c/a", + "match": { + "id": "S37.s5", + "params": { + "p1": "a" + } + }, + "resolve": { + "id": "S37.s5", + "params": { + "p1": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/caf%C3%A9/c/.", + "normalized": "/b/caf%C3%A9/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/caf%C3%A9/c/x", + "normalized": "/caf%C3%A9/c/x", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/%34%32/a%20b", + "normalized": "/c/%34%32/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/a%20b/a%20b/ff/", + "normalized": "/a%20b/a%20b/ff", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/0a", + "normalized": "/b/0a", + "match": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "0a" + } + }, + "resolve": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a%20b/", + "normalized": "/b/a%20b", + "match": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "a b" + } + }, + "resolve": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/a", + "normalized": "/c/a/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a%20b/c/", + "normalized": "/a%20b/c", + "match": { + "id": "S37.s2", + "params": { + "p0": "a b", + "p1": "c" + } + }, + "resolve": { + "id": "S37.s2", + "params": { + "p0": "a b", + "p1": "c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/42/x/b", + "normalized": "/42/x/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S38", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/b/b", + "declarations": [ + { + "id": "S38.s1", + "method": "GET", + "pattern": "/x/b/b/a/:p4(\\d+)/:p5([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S38.s2", + "method": "OPTIONS", + "pattern": "/x/b/b/:p3/c", + "transport": "buffer" + }, + { + "id": "S38.s3", + "method": "GET", + "pattern": "/x/b/b/:p3", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "//x/b/b/42" + }, + { + "method": "DELETE", + "raw": "/x/b/q/../b/a" + }, + { + "method": "GET", + "raw": "/x/b/b/a" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/a/a/7" + }, + { + "method": "POST", + "raw": "/x/b/./b/a/b/x" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b" + }, + { + "method": "DELETE", + "raw": "/x/b/b/a/a%20b/c" + }, + { + "method": "PATCH", + "raw": "/x/b/b/0a" + }, + { + "method": "GET", + "raw": "/x/b/b/a/42/a" + }, + { + "method": "GET", + "raw": "/x/b/b/b" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b" + }, + { + "method": "GET", + "raw": "/x/b/b/c/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "//x/b/b/42", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/x/b/q/../b/a", + "normalized": "/x/b/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/b/a", + "normalized": "/x/b/b/a", + "match": { + "id": "S38.s3", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S38.s3", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/a/a/7", + "normalized": "/x/b/b/a/a/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/b/./b/a/b/x", + "normalized": "/x/b/b/a/b/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b", + "normalized": "/x/b/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/b/b/a/a%20b/c", + "normalized": "/x/b/b/a/a%20b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/b/b/0a", + "normalized": "/x/b/b/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/b/a/42/a", + "normalized": "/x/b/b/a/42/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/b/b/b", + "normalized": "/x/b/b/b", + "match": { + "id": "S38.s3", + "params": { + "p3": "b" + } + }, + "resolve": { + "id": "S38.s3", + "params": { + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b", + "normalized": "/x/b/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/b/b/c/b", + "normalized": "/x/b/b/c/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S39", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/b/a", + "declarations": [ + { + "id": "S39.s1", + "method": "OPTIONS", + "pattern": "/b/b/a/c", + "transport": "buffer" + }, + { + "id": "S39.s2", + "method": "GET", + "pattern": "/b/b/a/:p3", + "transport": "negotiate" + }, + { + "id": "S39.s3", + "method": "OPTIONS", + "pattern": "/b/b/a/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S39.s4", + "method": "GET", + "pattern": "/b/b/a/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S39.s5", + "method": "GET", + "pattern": "/b/b/a/:p3*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/b/b/a/x" + }, + { + "method": "DELETE", + "raw": "/b/b/a/b/" + }, + { + "method": "PUT", + "raw": "//b/b/a/ff" + }, + { + "method": "GET", + "raw": "/b/b/a/a" + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/c" + }, + { + "method": "PATCH", + "raw": "/b/b/a/a/x/42" + }, + { + "method": "PATCH", + "raw": "/b/b/a" + }, + { + "method": "DELETE", + "raw": "/b/b/a/c" + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/0a" + }, + { + "method": "OPTIONS", + "raw": "//b/b/a/7" + }, + { + "method": "PATCH", + "raw": "/b/b/a/a" + }, + { + "method": "DELETE", + "raw": "/b/b/a/c" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/b/b/a/x", + "normalized": "/b/b/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/a/b/", + "normalized": "/b/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//b/b/a/ff", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": { + "id": "S39.s4", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S39.s4", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/c", + "normalized": "/b/b/a/c", + "match": { + "id": "S39.s1", + "params": {} + }, + "resolve": { + "id": "S39.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/b/a/a/x/42", + "normalized": "/b/b/a/a/x/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/b/a", + "normalized": "/b/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/a/c", + "normalized": "/b/b/a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/0a", + "normalized": "/b/b/a/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "//b/b/a/7", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PATCH", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/a/c", + "normalized": "/b/b/a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S40", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S40.s1", + "method": "HEAD", + "pattern": "/b/a/:p2", + "transport": "buffer" + }, + { + "id": "S40.s2", + "method": "PATCH", + "pattern": "/b/:p1/a/:p3", + "transport": "buffer" + }, + { + "id": "S40.s3", + "method": "DELETE", + "pattern": "/b/b/a", + "transport": "buffer" + }, + { + "id": "S40.s4", + "method": "PUT", + "pattern": "/b/a", + "transport": "buffer" + }, + { + "id": "S40.u1", + "method": "GET", + "pattern": "/b/:p1([0-9a-f]{2})/:p2*", + "transport": "buffer" + }, + { + "id": "S40.u2", + "method": "DELETE", + "pattern": "/:p0([a-c]+)/:p1(\\d+)/b", + "transport": "buffer" + }, + { + "id": "S40.u3", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/b/%34%32/b" + }, + { + "method": "PUT", + "raw": "/b/a" + }, + { + "method": "GET", + "raw": "/b" + }, + { + "method": "HEAD", + "raw": "/b" + }, + { + "method": "OPTIONS", + "raw": "/b/a" + }, + { + "method": "HEAD", + "raw": "/b/42/%34%32" + }, + { + "method": "GET", + "raw": "/b/a" + }, + { + "method": "POST", + "raw": "/b/b/a/a" + }, + { + "method": "GET", + "raw": "/b/b" + }, + { + "method": "GET", + "raw": "/b" + }, + { + "method": "PUT", + "raw": "/b/a/b" + }, + { + "method": "PUT", + "raw": "/b/caf%C3%A9/" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/b/%34%32/b", + "normalized": "/b/%34%32/b", + "match": { + "id": "S40.u2", + "params": { + "p0": "b", + "p1": "42" + } + }, + "resolve": { + "id": "S40.u2", + "params": { + "p0": "b", + "p1": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/a", + "normalized": "/b/a", + "match": { + "id": "S40.s4", + "params": {} + }, + "resolve": { + "id": "S40.s4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/42/%34%32", + "normalized": "/b/42/%34%32", + "match": null, + "resolve": { + "id": "S40.u1", + "params": { + "p1": "42", + "p2": "42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/b", + "normalized": "/b/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/caf%C3%A9/", + "normalized": "/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + } + ] + } + ] + } +} diff --git a/test/router-parity/frozen/matcher-generated.json b/test/router-parity/frozen/matcher-generated.json new file mode 100644 index 0000000..9a6ede6 --- /dev/null +++ b/test/router-parity/frozen/matcher-generated.json @@ -0,0 +1,9742 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": { + "generator": "router-parity-gen-v1", + "seed": 10908, + "rules": [ + "PRNG: mulberry32(seed); every choice below draws from it in program order.", + "40 scenarios; each has 2-10 declarations and 12 requests.", + "Declaration: 0-3 segments, each static (a|b|c|x, p=0.5), plain param (p=0.25) or constrained param (p=0.25) using one of \\d+ | [a-c]+ | [0-9a-f]{2}; then a final catch-all with p=0.2. Param names are p.", + "Declaration method from GET x3, POST, PUT, DELETE, PATCH, HEAD, OPTIONS. A GET is buffer with p=0.7, else sse | ndjson | negotiate; every other method is buffer.", + "Request path: p=0.6 instantiate a random declaration (static -> its literal, param -> value pool, catch-all -> 0-2 pool values), else 0-4 random pool segments. Value pool: a b c x 7 42 ff 0a a%20b caf%C3%A9 %34%32.", + "Request decoration: trailing slash p=0.15, a dot segment (/./ or /q/../) inserted p=0.1, a repeated slash p=0.05.", + "Request method from GET x2, HEAD, POST, PUT, DELETE, PATCH, OPTIONS.", + "Unsupported patterns are never produced: every generated pattern must pass compilePattern." + ], + "scenarios": [ + { + "id": "G01", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G01.d1", + "method": "HEAD", + "pattern": "/:p0([0-9a-f]{2})/a/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "G01.d2", + "method": "GET", + "pattern": "/c/x/c", + "transport": "buffer" + }, + { + "id": "G01.d3", + "method": "GET", + "pattern": "/b/x", + "transport": "buffer" + }, + { + "id": "G01.d4", + "method": "OPTIONS", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "G01.d5", + "method": "GET", + "pattern": "/:p0/:p1*", + "transport": "ndjson" + }, + { + "id": "G01.d6", + "method": "PUT", + "pattern": "/:p0(\\d+)/:p1", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/a" + }, + { + "method": "HEAD", + "raw": "/7/" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/ff/7" + }, + { + "method": "GET", + "raw": "/c/x/%34%32" + }, + { + "method": "OPTIONS", + "raw": "/b/x" + }, + { + "method": "GET", + "raw": "/caf%C3%A9" + }, + { + "method": "GET", + "raw": "/c" + }, + { + "method": "OPTIONS", + "raw": "/a%20b/a/c" + }, + { + "method": "OPTIONS", + "raw": "/x" + }, + { + "method": "OPTIONS", + "raw": "/b/%34%32/42" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/7/", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9", + "normalized": "/a/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/ff/7", + "normalized": "/ff/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/%34%32", + "normalized": "/c/x/%34%32", + "match": { + "id": "G01.d5", + "params": { + "p0": "c", + "p1": "x/42" + } + }, + "resolve": { + "id": "G01.d5", + "params": { + "p0": "c", + "p1": "x/42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/x", + "normalized": "/b/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": { + "id": "G01.d5", + "params": { + "p0": "café", + "p1": "" + } + }, + "resolve": { + "id": "G01.d5", + "params": { + "p0": "café", + "p1": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "G01.d5", + "params": { + "p0": "c", + "p1": "" + } + }, + "resolve": { + "id": "G01.d5", + "params": { + "p0": "c", + "p1": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a%20b/a/c", + "normalized": "/a%20b/a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/%34%32/42", + "normalized": "/b/%34%32/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "G02", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G02.d1", + "method": "GET", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "G02.d2", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G02.d3", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})/:p1/a", + "transport": "buffer" + }, + { + "id": "G02.d4", + "method": "GET", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G02.d5", + "method": "GET", + "pattern": "/", + "transport": "sse" + }, + { + "id": "G02.d6", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "G02.d7", + "method": "GET", + "pattern": "/:p0([a-c]+)/b/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "G02.d8", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G02.d9", + "method": "GET", + "pattern": "/c/:p1*", + "transport": "buffer" + }, + { + "id": "G02.d10", + "method": "GET", + "pattern": "/x/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "//c/42/7" + }, + { + "method": "DELETE", + "raw": "/0a/a%20b/a/" + }, + { + "method": "GET", + "raw": "/q/.." + }, + { + "method": "DELETE", + "raw": "/%34%32/a%20b/b" + }, + { + "method": "POST", + "raw": "/b/x" + }, + { + "method": "GET", + "raw": "/x/b" + }, + { + "method": "DELETE", + "raw": "/0a/" + }, + { + "method": "PATCH", + "raw": "/caf%C3%A9" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/c/b" + }, + { + "method": "HEAD", + "raw": "/x/b" + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "//c/42/7", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/0a/a%20b/a/", + "normalized": "/0a/a%20b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/q/..", + "normalized": "/", + "match": { + "id": "G02.d5", + "params": {} + }, + "resolve": { + "id": "G02.d5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/%34%32/a%20b/b", + "normalized": "/%34%32/a%20b/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x", + "normalized": "/b/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b", + "normalized": "/x/b", + "match": { + "id": "G02.d10", + "params": {} + }, + "resolve": { + "id": "G02.d10", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/0a/", + "normalized": "/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": { + "id": "G02.d8", + "params": {} + }, + "resolve": { + "id": "G02.d8", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/b", + "normalized": "/x/b", + "match": null, + "resolve": { + "id": "G02.d10", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G03", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G03.d1", + "method": "DELETE", + "pattern": "/b/:p1/:p2", + "transport": "buffer" + }, + { + "id": "G03.d2", + "method": "HEAD", + "pattern": "/:p0/b", + "transport": "buffer" + }, + { + "id": "G03.d3", + "method": "HEAD", + "pattern": "/:p0", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/b/0a/./c" + }, + { + "method": "OPTIONS", + "raw": "/x" + }, + { + "method": "HEAD", + "raw": "/0a/" + }, + { + "method": "HEAD", + "raw": "/b/x/7/" + }, + { + "method": "GET", + "raw": "/a%20b/a/ff" + }, + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "PATCH", + "raw": "/%34%32/q/.." + }, + { + "method": "GET", + "raw": "/a%20b/b" + }, + { + "method": "PUT", + "raw": "/ff/b/" + }, + { + "method": "PATCH", + "raw": "/0a/" + }, + { + "method": "HEAD", + "raw": "/ff/b" + }, + { + "method": "GET", + "raw": "/" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/b/0a/./c", + "normalized": "/b/0a/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/0a/", + "normalized": "/0a", + "match": { + "id": "G03.d3", + "params": { + "p0": "0a" + } + }, + "resolve": { + "id": "G03.d3", + "params": { + "p0": "0a" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/x/7/", + "normalized": "/b/x/7", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a%20b/a/ff", + "normalized": "/a%20b/a/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/%34%32/q/..", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a%20b/b", + "normalized": "/a%20b/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/ff/b/", + "normalized": "/ff/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/0a/", + "normalized": "/0a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/ff/b", + "normalized": "/ff/b", + "match": { + "id": "G03.d2", + "params": { + "p0": "ff" + } + }, + "resolve": { + "id": "G03.d2", + "params": { + "p0": "ff" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G04", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G04.d1", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G04.d2", + "method": "OPTIONS", + "pattern": "/:p0([0-9a-f]{2})/:p1/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "G04.d3", + "method": "PUT", + "pattern": "/c", + "transport": "buffer" + }, + { + "id": "G04.d4", + "method": "PUT", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G04.d5", + "method": "POST", + "pattern": "/:p0([0-9a-f]{2})/a", + "transport": "buffer" + }, + { + "id": "G04.d6", + "method": "GET", + "pattern": "/:p0/:p1", + "transport": "ndjson" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/a/x" + }, + { + "method": "PATCH", + "raw": "/7/a%20b/b/%34%32" + }, + { + "method": "GET", + "raw": "/0a/7/7" + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/0a/a" + }, + { + "method": "HEAD", + "raw": "/ff/a" + }, + { + "method": "GET", + "raw": "/x/caf%C3%A9" + }, + { + "method": "HEAD", + "raw": "/caf%C3%A9/b" + }, + { + "method": "PUT", + "raw": "/a%20b" + }, + { + "method": "DELETE", + "raw": "/%34%32/0a/a" + }, + { + "method": "GET", + "raw": "/c/a%20b" + }, + { + "method": "OPTIONS", + "raw": "/0a" + }, + { + "method": "HEAD", + "raw": "/7/0a" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/a/x", + "normalized": "/caf%C3%A9/a/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/7/a%20b/b/%34%32", + "normalized": "/7/a%20b/b/%34%32", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/0a/7/7", + "normalized": "/0a/7/7", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/0a/a", + "normalized": "/caf%C3%A9/0a/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/ff/a", + "normalized": "/ff/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/caf%C3%A9", + "normalized": "/x/caf%C3%A9", + "match": { + "id": "G04.d6", + "params": { + "p0": "x", + "p1": "café" + } + }, + "resolve": { + "id": "G04.d6", + "params": { + "p0": "x", + "p1": "café" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/caf%C3%A9/b", + "normalized": "/caf%C3%A9/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": { + "id": "G04.d4", + "params": { + "p0": "a b" + } + }, + "resolve": { + "id": "G04.d4", + "params": { + "p0": "a b" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/%34%32/0a/a", + "normalized": "/%34%32/0a/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/a%20b", + "normalized": "/c/a%20b", + "match": { + "id": "G04.d6", + "params": { + "p0": "c", + "p1": "a b" + } + }, + "resolve": { + "id": "G04.d6", + "params": { + "p0": "c", + "p1": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/0a", + "normalized": "/0a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/7/0a", + "normalized": "/7/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "G05", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G05.d1", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G05.d2", + "method": "PATCH", + "pattern": "/a/:p1*", + "transport": "buffer" + }, + { + "id": "G05.d3", + "method": "GET", + "pattern": "/b/a/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "G05.d4", + "method": "OPTIONS", + "pattern": "/:p0/:p1", + "transport": "buffer" + }, + { + "id": "G05.d5", + "method": "GET", + "pattern": "/c/b", + "transport": "buffer" + }, + { + "id": "G05.d6", + "method": "GET", + "pattern": "/a/a/:p2*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/c/b/ff/a%20b" + }, + { + "method": "PUT", + "raw": "/a/0a" + }, + { + "method": "PUT", + "raw": "/" + }, + { + "method": "GET", + "raw": "/x/7" + }, + { + "method": "OPTIONS", + "raw": "/b/a/ff" + }, + { + "method": "PATCH", + "raw": "/b/c" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "OPTIONS", + "raw": "/ff/a%20b/c/0a" + }, + { + "method": "PATCH", + "raw": "/c/b/" + }, + { + "method": "PATCH", + "raw": "/a/a/0a/ff" + }, + { + "method": "GET", + "raw": "/q/.." + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/c/b/ff/a%20b", + "normalized": "/c/b/ff/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/0a", + "normalized": "/a/0a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/7", + "normalized": "/x/7", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/a/ff", + "normalized": "/b/a/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/b/c", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/ff/a%20b/c/0a", + "normalized": "/ff/a%20b/c/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/b/", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/a/0a/ff", + "normalized": "/a/a/0a/ff", + "match": { + "id": "G05.d2", + "params": { + "p1": "a/0a/ff" + } + }, + "resolve": { + "id": "G05.d2", + "params": { + "p1": "a/0a/ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G06", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G06.d1", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G06.d2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G06.d3", + "method": "POST", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "G06.d4", + "method": "GET", + "pattern": "/x/:p1/:p2(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/q/.." + }, + { + "method": "OPTIONS", + "raw": "/" + }, + { + "method": "GET", + "raw": "/caf%C3%A9" + }, + { + "method": "PATCH", + "raw": "/a" + }, + { + "method": "OPTIONS", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "//q/../a" + }, + { + "method": "HEAD", + "raw": "/q/.." + }, + { + "method": "DELETE", + "raw": "/a" + }, + { + "method": "POST", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/a%20b/x" + }, + { + "method": "DELETE", + "raw": "/ff" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/q/..", + "normalized": "/", + "match": { + "id": "G06.d2", + "params": {} + }, + "resolve": { + "id": "G06.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G06.d2", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//q/../a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "HEAD", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": { + "id": "G06.d2", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "G06.d3", + "params": {} + }, + "resolve": { + "id": "G06.d3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a%20b/x", + "normalized": "/a%20b/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G07", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G07.d1", + "method": "DELETE", + "pattern": "/:p0/:p1*", + "transport": "buffer" + }, + { + "id": "G07.d2", + "method": "OPTIONS", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G07.d3", + "method": "DELETE", + "pattern": "/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/a/." + }, + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/c/a%20b/caf%C3%A9/ff" + }, + { + "method": "HEAD", + "raw": "/x/0a" + }, + { + "method": "DELETE", + "raw": "/q/../caf%C3%A9" + }, + { + "method": "PUT", + "raw": "/ff/42" + }, + { + "method": "HEAD", + "raw": "//c/caf%C3%A9/./0a/a%20b" + }, + { + "method": "PUT", + "raw": "/a/" + }, + { + "method": "GET", + "raw": "/a%20b" + }, + { + "method": "PUT", + "raw": "/." + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/ff/42" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/a/.", + "normalized": "/a", + "match": { + "id": "G07.d3", + "params": {} + }, + "resolve": { + "id": "G07.d3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/a%20b/caf%C3%A9/ff", + "normalized": "/c/a%20b/caf%C3%A9/ff", + "match": { + "id": "G07.d1", + "params": { + "p0": "c", + "p1": "a b/café/ff" + } + }, + "resolve": { + "id": "G07.d1", + "params": { + "p0": "c", + "p1": "a b/café/ff" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/0a", + "normalized": "/x/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/q/../caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": { + "id": "G07.d1", + "params": { + "p0": "café", + "p1": "" + } + }, + "resolve": { + "id": "G07.d1", + "params": { + "p0": "café", + "p1": "" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/ff/42", + "normalized": "/ff/42", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "//c/caf%C3%A9/./0a/a%20b", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "/a/", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/.", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/ff/42", + "normalized": "/ff/42", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "G08", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G08.d1", + "method": "DELETE", + "pattern": "/:p0/:p1", + "transport": "buffer" + }, + { + "id": "G08.d2", + "method": "HEAD", + "pattern": "/c/:p1", + "transport": "buffer" + }, + { + "id": "G08.d3", + "method": "GET", + "pattern": "/c/c/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "G08.d4", + "method": "GET", + "pattern": "/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/c/b" + }, + { + "method": "OPTIONS", + "raw": "/b" + }, + { + "method": "PATCH", + "raw": "/c/c/./a%20b" + }, + { + "method": "PATCH", + "raw": "/q/../0a/0a" + }, + { + "method": "GET", + "raw": "/c/c" + }, + { + "method": "OPTIONS", + "raw": "/7/caf%C3%A9" + }, + { + "method": "POST", + "raw": "/a/%34%32/b/caf%C3%A9" + }, + { + "method": "PATCH", + "raw": "/ff/0a/%34%32/x/" + }, + { + "method": "DELETE", + "raw": "/7/42/b" + }, + { + "method": "DELETE", + "raw": "/x/c/" + }, + { + "method": "OPTIONS", + "raw": "/7/caf%C3%A9" + }, + { + "method": "PUT", + "raw": "/c/c/b/" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/c/./a%20b", + "normalized": "/c/c/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/q/../0a/0a", + "normalized": "/0a/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c", + "normalized": "/c/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/7/caf%C3%A9", + "normalized": "/7/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/%34%32/b/caf%C3%A9", + "normalized": "/a/%34%32/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/ff/0a/%34%32/x/", + "normalized": "/ff/0a/%34%32/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/7/42/b", + "normalized": "/7/42/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/c/", + "normalized": "/x/c", + "match": { + "id": "G08.d1", + "params": { + "p0": "x", + "p1": "c" + } + }, + "resolve": { + "id": "G08.d1", + "params": { + "p0": "x", + "p1": "c" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/7/caf%C3%A9", + "normalized": "/7/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/c/b/", + "normalized": "/c/c/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G09", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G09.d1", + "method": "PUT", + "pattern": "/x/:p1/:p2", + "transport": "buffer" + }, + { + "id": "G09.d2", + "method": "PATCH", + "pattern": "/:p0/:p1", + "transport": "buffer" + }, + { + "id": "G09.d3", + "method": "POST", + "pattern": "/:p0([a-c]+)", + "transport": "buffer" + }, + { + "id": "G09.d4", + "method": "GET", + "pattern": "/:p0([a-c]+)/:p1", + "transport": "buffer" + }, + { + "id": "G09.d5", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G09.d6", + "method": "OPTIONS", + "pattern": "/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/a" + }, + { + "method": "OPTIONS", + "raw": "/" + }, + { + "method": "GET", + "raw": "/7" + }, + { + "method": "HEAD", + "raw": "/c/." + }, + { + "method": "GET", + "raw": "/x/a%20b/42" + }, + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/q/.." + }, + { + "method": "OPTIONS", + "raw": "/a%20b" + }, + { + "method": "HEAD", + "raw": "/c/b/caf%C3%A9/caf%C3%A9" + }, + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "HEAD", + "raw": "/a/7/0a" + }, + { + "method": "GET", + "raw": "/" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/7", + "normalized": "/7", + "match": { + "id": "G09.d5", + "params": { + "p0": "7" + } + }, + "resolve": { + "id": "G09.d5", + "params": { + "p0": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/.", + "normalized": "/c", + "match": null, + "resolve": { + "id": "G09.d5", + "params": { + "p0": "c" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/a%20b/42", + "normalized": "/x/a%20b/42", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/b/caf%C3%A9/caf%C3%A9", + "normalized": "/c/b/caf%C3%A9/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": { + "id": "G09.d5", + "params": { + "p0": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/7/0a", + "normalized": "/a/7/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G10", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G10.d1", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})/c/:p2*", + "transport": "buffer" + }, + { + "id": "G10.d2", + "method": "HEAD", + "pattern": "/b/:p1([a-c]+)/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "G10.d3", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G10.d4", + "method": "GET", + "pattern": "/:p0/:p1*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "//b/ff/q/../c" + }, + { + "method": "GET", + "raw": "/x/a%20b/ff" + }, + { + "method": "OPTIONS", + "raw": "/q/.." + }, + { + "method": "OPTIONS", + "raw": "/b/42/a%20b" + }, + { + "method": "GET", + "raw": "/7/c/0a" + }, + { + "method": "POST", + "raw": "/%34%32/a%20b/7/42" + }, + { + "method": "GET", + "raw": "/b/a%20b/b" + }, + { + "method": "OPTIONS", + "raw": "/b/7/ff/" + }, + { + "method": "HEAD", + "raw": "/a%20b/c" + }, + { + "method": "GET", + "raw": "/7/b/c/" + }, + { + "method": "GET", + "raw": "/%34%32/" + }, + { + "method": "OPTIONS", + "raw": "/a/%34%32/a/a" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "//b/ff/q/../c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/x/a%20b/ff", + "normalized": "/x/a%20b/ff", + "match": { + "id": "G10.d4", + "params": { + "p0": "x", + "p1": "a b/ff" + } + }, + "resolve": { + "id": "G10.d4", + "params": { + "p0": "x", + "p1": "a b/ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/42/a%20b", + "normalized": "/b/42/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/7/c/0a", + "normalized": "/7/c/0a", + "match": { + "id": "G10.d4", + "params": { + "p0": "7", + "p1": "c/0a" + } + }, + "resolve": { + "id": "G10.d4", + "params": { + "p0": "7", + "p1": "c/0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/%34%32/a%20b/7/42", + "normalized": "/%34%32/a%20b/7/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a%20b/b", + "normalized": "/b/a%20b/b", + "match": { + "id": "G10.d4", + "params": { + "p0": "b", + "p1": "a b/b" + } + }, + "resolve": { + "id": "G10.d4", + "params": { + "p0": "b", + "p1": "a b/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/7/ff/", + "normalized": "/b/7/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a%20b/c", + "normalized": "/a%20b/c", + "match": null, + "resolve": { + "id": "G10.d4", + "params": { + "p0": "a b", + "p1": "c" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/7/b/c/", + "normalized": "/7/b/c", + "match": { + "id": "G10.d4", + "params": { + "p0": "7", + "p1": "b/c" + } + }, + "resolve": { + "id": "G10.d4", + "params": { + "p0": "7", + "p1": "b/c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/%34%32/", + "normalized": "/%34%32", + "match": { + "id": "G10.d4", + "params": { + "p0": "42", + "p1": "" + } + }, + "resolve": { + "id": "G10.d4", + "params": { + "p0": "42", + "p1": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/%34%32/a/a", + "normalized": "/a/%34%32/a/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G11", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G11.d1", + "method": "DELETE", + "pattern": "/c", + "transport": "buffer" + }, + { + "id": "G11.d2", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/c/42" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "POST", + "raw": "/c/" + }, + { + "method": "HEAD", + "raw": "/a/c/a%20b/" + }, + { + "method": "OPTIONS", + "raw": "/c" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "POST", + "raw": "/%34%32" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/42", + "normalized": "/c/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/c/a%20b/", + "normalized": "/a/c/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G12", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G12.d1", + "method": "PUT", + "pattern": "/c/c/c", + "transport": "buffer" + }, + { + "id": "G12.d2", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "sse" + }, + { + "id": "G12.d3", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G12.d4", + "method": "OPTIONS", + "pattern": "/x/a", + "transport": "buffer" + }, + { + "id": "G12.d5", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G12.d6", + "method": "DELETE", + "pattern": "/c/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/b/a%20b" + }, + { + "method": "PUT", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/c/c/c" + }, + { + "method": "HEAD", + "raw": "/42" + }, + { + "method": "POST", + "raw": "/a%20b/caf%C3%A9/x" + }, + { + "method": "PUT", + "raw": "/c/c" + }, + { + "method": "PATCH", + "raw": "//x/a" + }, + { + "method": "GET", + "raw": "/ff" + }, + { + "method": "PUT", + "raw": "/7" + }, + { + "method": "PATCH", + "raw": "/x/42/" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/b/a%20b", + "normalized": "/b/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/c/c", + "normalized": "/c/c/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a%20b/caf%C3%A9/x", + "normalized": "/a%20b/caf%C3%A9/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/c", + "normalized": "/c/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "//x/a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/ff", + "normalized": "/ff", + "match": { + "id": "G12.d2", + "params": { + "p0": "ff" + } + }, + "resolve": { + "id": "G12.d2", + "params": { + "p0": "ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/7", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/42/", + "normalized": "/x/42", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G13", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G13.d1", + "method": "DELETE", + "pattern": "/x/c", + "transport": "buffer" + }, + { + "id": "G13.d2", + "method": "PATCH", + "pattern": "/:p0([a-c]+)/a", + "transport": "buffer" + }, + { + "id": "G13.d3", + "method": "OPTIONS", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G13.d4", + "method": "GET", + "pattern": "/:p0*", + "transport": "ndjson" + }, + { + "id": "G13.d5", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/0a" + }, + { + "method": "GET", + "raw": "/caf%C3%A9/c" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/q/../caf%C3%A9" + }, + { + "method": "GET", + "raw": "/a/a" + }, + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "PUT", + "raw": "//x/c" + }, + { + "method": "OPTIONS", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "PATCH", + "raw": "/." + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/0a", + "normalized": "/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9/c", + "normalized": "/caf%C3%A9/c", + "match": { + "id": "G13.d4", + "params": { + "p0": "café/c" + } + }, + "resolve": { + "id": "G13.d4", + "params": { + "p0": "café/c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": { + "id": "G13.d5", + "params": {} + }, + "resolve": { + "id": "G13.d5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": { + "id": "G13.d5", + "params": {} + }, + "resolve": { + "id": "G13.d5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G13.d4", + "params": { + "p0": "" + } + }, + "resolve": { + "id": "G13.d4", + "params": { + "p0": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/q/../caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/a", + "normalized": "/a/a", + "match": { + "id": "G13.d4", + "params": { + "p0": "a/a" + } + }, + "resolve": { + "id": "G13.d4", + "params": { + "p0": "a/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//x/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/", + "normalized": "/", + "match": { + "id": "G13.d3", + "params": {} + }, + "resolve": { + "id": "G13.d3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": { + "id": "G13.d5", + "params": {} + }, + "resolve": { + "id": "G13.d5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/.", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G14", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G14.d1", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G14.d2", + "method": "PATCH", + "pattern": "/b/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "G14.d3", + "method": "PUT", + "pattern": "/x/c", + "transport": "buffer" + }, + { + "id": "G14.d4", + "method": "GET", + "pattern": "/x/:p1/:p2", + "transport": "buffer" + }, + { + "id": "G14.d5", + "method": "PUT", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G14.d6", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/b/ff/b/" + }, + { + "method": "OPTIONS", + "raw": "//" + }, + { + "method": "DELETE", + "raw": "/ff/a%20b/a%20b" + }, + { + "method": "PUT", + "raw": "/b/ff/7/" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/x/b/ff" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/caf%C3%A9/c/a" + }, + { + "method": "GET", + "raw": "/x/c" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/x/caf%C3%A9/x" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/b/ff/b/", + "normalized": "/b/ff/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "//", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/ff/a%20b/a%20b", + "normalized": "/ff/a%20b/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/b/ff/7/", + "normalized": "/b/ff/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x/b/ff", + "normalized": "/x/b/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9/c/a", + "normalized": "/caf%C3%A9/c/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/c", + "normalized": "/x/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/caf%C3%A9/x", + "normalized": "/x/caf%C3%A9/x", + "match": null, + "resolve": { + "id": "G14.d4", + "params": { + "p1": "café", + "p2": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G15", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G15.d1", + "method": "GET", + "pattern": "/x/x/:p2", + "transport": "buffer" + }, + { + "id": "G15.d2", + "method": "OPTIONS", + "pattern": "/c/:p1([a-c]+)/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "G15.d3", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G15.d4", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G15.d5", + "method": "GET", + "pattern": "/:p0(\\d+)/:p1*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "//c/42/caf%C3%A9/" + }, + { + "method": "DELETE", + "raw": "/c/" + }, + { + "method": "PATCH", + "raw": "/a%20b/q/.." + }, + { + "method": "PUT", + "raw": "/c/b/%34%32/" + }, + { + "method": "DELETE", + "raw": "/%34%32/b/a/." + }, + { + "method": "PATCH", + "raw": "/x/x/a/" + }, + { + "method": "OPTIONS", + "raw": "/c/7/a/" + }, + { + "method": "PUT", + "raw": "/%34%32/42/7/b" + }, + { + "method": "DELETE", + "raw": "/x/x/c" + }, + { + "method": "PUT", + "raw": "/a%20b/%34%32/" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G15.d4", + "params": {} + }, + "resolve": { + "id": "G15.d4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "//c/42/caf%C3%A9/", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/c/", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/a%20b/q/..", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/b/%34%32/", + "normalized": "/c/b/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/%34%32/b/a/.", + "normalized": "/%34%32/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/x/a/", + "normalized": "/x/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/7/a/", + "normalized": "/c/7/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/%34%32/42/7/b", + "normalized": "/%34%32/42/7/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/x/c", + "normalized": "/x/x/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a%20b/%34%32/", + "normalized": "/a%20b/%34%32", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G16", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G16.d1", + "method": "POST", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G16.d2", + "method": "GET", + "pattern": "/b", + "transport": "buffer" + }, + { + "id": "G16.d3", + "method": "HEAD", + "pattern": "/:p0*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a%20b" + }, + { + "method": "POST", + "raw": "/ff/x" + }, + { + "method": "PUT", + "raw": "/7/" + }, + { + "method": "DELETE", + "raw": "/b/q/.." + }, + { + "method": "GET", + "raw": "/%34%32" + }, + { + "method": "GET", + "raw": "/b" + }, + { + "method": "POST", + "raw": "/ff/ff" + }, + { + "method": "OPTIONS", + "raw": "/ff" + }, + { + "method": "DELETE", + "raw": "/a" + }, + { + "method": "PUT", + "raw": "//ff" + }, + { + "method": "GET", + "raw": "/c/ff/7/" + }, + { + "method": "GET", + "raw": "/%34%32/b/a%20b/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/ff/x", + "normalized": "/ff/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/7/", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/q/..", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b", + "normalized": "/b", + "match": { + "id": "G16.d2", + "params": {} + }, + "resolve": { + "id": "G16.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/ff/ff", + "normalized": "/ff/ff", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//ff", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/c/ff/7/", + "normalized": "/c/ff/7", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/%34%32/b/a%20b/", + "normalized": "/%34%32/b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G17", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G17.d1", + "method": "PATCH", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G17.d2", + "method": "GET", + "pattern": "/:p0(\\d+)/:p1/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "G17.d3", + "method": "HEAD", + "pattern": "/c", + "transport": "buffer" + }, + { + "id": "G17.d4", + "method": "PATCH", + "pattern": "/b/:p1/:p2", + "transport": "buffer" + }, + { + "id": "G17.d5", + "method": "GET", + "pattern": "/c", + "transport": "negotiate" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/ff/" + }, + { + "method": "GET", + "raw": "/c" + }, + { + "method": "HEAD", + "raw": "/x/" + }, + { + "method": "PATCH", + "raw": "/b/ff/42" + }, + { + "method": "DELETE", + "raw": "/caf%C3%A9/a%20b/%34%32/q/../%34%32" + }, + { + "method": "DELETE", + "raw": "/c/" + }, + { + "method": "POST", + "raw": "/b/0a/0a/" + }, + { + "method": "GET", + "raw": "/42/%34%32/ff/ff/" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "OPTIONS", + "raw": "/c" + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/x/42" + }, + { + "method": "HEAD", + "raw": "/c" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/ff/", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "G17.d5", + "params": {} + }, + "resolve": { + "id": "G17.d5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/ff/42", + "normalized": "/b/ff/42", + "match": { + "id": "G17.d4", + "params": { + "p1": "ff", + "p2": "42" + } + }, + "resolve": { + "id": "G17.d4", + "params": { + "p1": "ff", + "p2": "42" + }, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/caf%C3%A9/a%20b/%34%32/q/../%34%32", + "normalized": "/caf%C3%A9/a%20b/%34%32/%34%32", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/0a/0a/", + "normalized": "/b/0a/0a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/42/%34%32/ff/ff/", + "normalized": "/42/%34%32/ff/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/x/42", + "normalized": "/caf%C3%A9/x/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "G17.d3", + "params": {} + }, + "resolve": { + "id": "G17.d3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G18", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G18.d1", + "method": "PUT", + "pattern": "/:p0([a-c]+)", + "transport": "buffer" + }, + { + "id": "G18.d2", + "method": "POST", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G18.d3", + "method": "PATCH", + "pattern": "/:p0/a", + "transport": "buffer" + }, + { + "id": "G18.d4", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G18.d5", + "method": "GET", + "pattern": "/x/a", + "transport": "buffer" + }, + { + "id": "G18.d6", + "method": "HEAD", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G18.d7", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G18.d8", + "method": "POST", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G18.d9", + "method": "HEAD", + "pattern": "/:p0*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/7" + }, + { + "method": "GET", + "raw": "/7/7/" + }, + { + "method": "GET", + "raw": "/a%20b/a/q/.." + }, + { + "method": "OPTIONS", + "raw": "/a/ff/b/c" + }, + { + "method": "OPTIONS", + "raw": "/42/a" + }, + { + "method": "GET", + "raw": "/ff" + }, + { + "method": "GET", + "raw": "/c/a%20b" + }, + { + "method": "PATCH", + "raw": "/a/q/.." + }, + { + "method": "POST", + "raw": "/7/7/a/x" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "POST", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/x/a" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/7", + "normalized": "/7", + "match": { + "id": "G18.d2", + "params": { + "p0": "7" + } + }, + "resolve": { + "id": "G18.d2", + "params": { + "p0": "7" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/7/7/", + "normalized": "/7/7", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a%20b/a/q/..", + "normalized": "/a%20b/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/ff/b/c", + "normalized": "/a/ff/b/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/42/a", + "normalized": "/42/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a%20b", + "normalized": "/c/a%20b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/q/..", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/7/7/a/x", + "normalized": "/7/7/a/x", + "match": { + "id": "G18.d8", + "params": { + "p0": "7/7/a/x" + } + }, + "resolve": { + "id": "G18.d8", + "params": { + "p0": "7/7/a/x" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": { + "id": "G18.d4", + "params": {} + }, + "resolve": { + "id": "G18.d4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "G18.d2", + "params": { + "p0": "a" + } + }, + "resolve": { + "id": "G18.d2", + "params": { + "p0": "a" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "POST", + "PUT", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G19", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G19.d1", + "method": "PATCH", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G19.d2", + "method": "GET", + "pattern": "/x/a", + "transport": "buffer" + }, + { + "id": "G19.d3", + "method": "HEAD", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "G19.d4", + "method": "HEAD", + "pattern": "/a/:p1*", + "transport": "buffer" + }, + { + "id": "G19.d5", + "method": "POST", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/c/" + }, + { + "method": "PATCH", + "raw": "/0a/a/0a" + }, + { + "method": "OPTIONS", + "raw": "/a/" + }, + { + "method": "PUT", + "raw": "/b" + }, + { + "method": "GET", + "raw": "/x/a" + }, + { + "method": "PATCH", + "raw": "/ff/" + }, + { + "method": "OPTIONS", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/a/%34%32" + }, + { + "method": "GET", + "raw": "/caf%C3%A9" + }, + { + "method": "PATCH", + "raw": "//./caf%C3%A9/7" + }, + { + "method": "OPTIONS", + "raw": "/%34%32" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/c/", + "normalized": "/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/0a/a/0a", + "normalized": "/0a/a/0a", + "match": { + "id": "G19.d1", + "params": { + "p0": "0a/a/0a" + } + }, + "resolve": { + "id": "G19.d1", + "params": { + "p0": "0a/a/0a" + }, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/a", + "normalized": "/x/a", + "match": { + "id": "G19.d2", + "params": {} + }, + "resolve": { + "id": "G19.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/ff/", + "normalized": "/ff", + "match": { + "id": "G19.d1", + "params": { + "p0": "ff" + } + }, + "resolve": { + "id": "G19.d1", + "params": { + "p0": "ff" + }, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/%34%32", + "normalized": "/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "//./caf%C3%A9/7", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G20", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G20.d1", + "method": "OPTIONS", + "pattern": "/x/c/:p2/:p3*", + "transport": "buffer" + }, + { + "id": "G20.d2", + "method": "POST", + "pattern": "/x/:p1*", + "transport": "buffer" + }, + { + "id": "G20.d3", + "method": "PATCH", + "pattern": "/x", + "transport": "buffer" + }, + { + "id": "G20.d4", + "method": "POST", + "pattern": "/:p0/c/:p2(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/c/ff" + }, + { + "method": "PATCH", + "raw": "/x/c/caf%C3%A9" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "POST", + "raw": "/x/42/0a/." + }, + { + "method": "POST", + "raw": "/x" + }, + { + "method": "PATCH", + "raw": "/0a/c/" + }, + { + "method": "GET", + "raw": "/x/a/" + }, + { + "method": "GET", + "raw": "/7/" + }, + { + "method": "DELETE", + "raw": "/a%20b/0a/b/c" + }, + { + "method": "PUT", + "raw": "/ff/c/a" + }, + { + "method": "HEAD", + "raw": "/x/c/c/0a/%34%32" + }, + { + "method": "DELETE", + "raw": "/x/c" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/c/ff", + "normalized": "/c/c/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/c/caf%C3%A9", + "normalized": "/x/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/42/0a/.", + "normalized": "/x/42/0a", + "match": { + "id": "G20.d2", + "params": { + "p1": "42/0a" + } + }, + "resolve": { + "id": "G20.d2", + "params": { + "p1": "42/0a" + }, + "implicitHead": false + }, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x", + "normalized": "/x", + "match": { + "id": "G20.d2", + "params": { + "p1": "" + } + }, + "resolve": { + "id": "G20.d2", + "params": { + "p1": "" + }, + "implicitHead": false + }, + "allow": [ + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/0a/c/", + "normalized": "/0a/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/a/", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/7/", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/a%20b/0a/b/c", + "normalized": "/a%20b/0a/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/ff/c/a", + "normalized": "/ff/c/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x/c/c/0a/%34%32", + "normalized": "/x/c/c/0a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/c", + "normalized": "/x/c", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "G21", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G21.d1", + "method": "GET", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G21.d2", + "method": "GET", + "pattern": "/a/b", + "transport": "buffer" + }, + { + "id": "G21.d3", + "method": "PATCH", + "pattern": "/b/x/a", + "transport": "buffer" + }, + { + "id": "G21.d4", + "method": "OPTIONS", + "pattern": "/c", + "transport": "buffer" + }, + { + "id": "G21.d5", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})/:p1([0-9a-f]{2})", + "transport": "sse" + }, + { + "id": "G21.d6", + "method": "DELETE", + "pattern": "/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/0a" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "OPTIONS", + "raw": "/0a/a/b" + }, + { + "method": "GET", + "raw": "/b/x/a" + }, + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "PUT", + "raw": "/." + }, + { + "method": "HEAD", + "raw": "/a/b" + }, + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "PUT", + "raw": "/./c" + }, + { + "method": "HEAD", + "raw": "/a" + }, + { + "method": "HEAD", + "raw": "/c" + }, + { + "method": "POST", + "raw": "/a/" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/0a", + "normalized": "/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/0a/a/b", + "normalized": "/0a/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/a", + "normalized": "/b/x/a", + "match": { + "id": "G21.d1", + "params": { + "p0": "b/x/a" + } + }, + "resolve": { + "id": "G21.d1", + "params": { + "p0": "b/x/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/.", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": { + "id": "G21.d2", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/./c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": { + "id": "G21.d1", + "params": { + "p0": "a" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": { + "id": "G21.d1", + "params": { + "p0": "c" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "G22", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G22.d1", + "method": "GET", + "pattern": "/a/c/x/:p3*", + "transport": "ndjson" + }, + { + "id": "G22.d2", + "method": "OPTIONS", + "pattern": "/x", + "transport": "buffer" + }, + { + "id": "G22.d3", + "method": "DELETE", + "pattern": "/x/a/:p2", + "transport": "buffer" + }, + { + "id": "G22.d4", + "method": "GET", + "pattern": "/:p0/:p1/:p2*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/a%20b/42" + }, + { + "method": "GET", + "raw": "/x/a/b" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "POST", + "raw": "/7/7/0a/b/" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/ff/c" + }, + { + "method": "DELETE", + "raw": "/a/q/../c/x" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "PATCH", + "raw": "/42" + }, + { + "method": "GET", + "raw": "/a/c/x/a/7" + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/ff" + }, + { + "method": "GET", + "raw": "/b/%34%32" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/a%20b/42", + "normalized": "/a%20b/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/a/b", + "normalized": "/x/a/b", + "match": { + "id": "G22.d4", + "params": { + "p0": "x", + "p1": "a", + "p2": "b" + } + }, + "resolve": { + "id": "G22.d4", + "params": { + "p0": "x", + "p1": "a", + "p2": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/7/7/0a/b/", + "normalized": "/7/7/0a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/ff/c", + "normalized": "/ff/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/q/../c/x", + "normalized": "/a/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/c/x/a/7", + "normalized": "/a/c/x/a/7", + "match": { + "id": "G22.d1", + "params": { + "p3": "a/7" + } + }, + "resolve": { + "id": "G22.d1", + "params": { + "p3": "a/7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/ff", + "normalized": "/caf%C3%A9/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/%34%32", + "normalized": "/b/%34%32", + "match": { + "id": "G22.d4", + "params": { + "p0": "b", + "p1": "42", + "p2": "" + } + }, + "resolve": { + "id": "G22.d4", + "params": { + "p0": "b", + "p1": "42", + "p2": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G23", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G23.d1", + "method": "OPTIONS", + "pattern": "/c/:p1/:p2*", + "transport": "buffer" + }, + { + "id": "G23.d2", + "method": "PUT", + "pattern": "/:p0([0-9a-f]{2})/c/:p2*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/c/a%20b/caf%C3%A9" + }, + { + "method": "GET", + "raw": "//" + }, + { + "method": "OPTIONS", + "raw": "/42/c/7/c" + }, + { + "method": "GET", + "raw": "/c/ff" + }, + { + "method": "PUT", + "raw": "/c/a/a%20b" + }, + { + "method": "GET", + "raw": "/42/c/7" + }, + { + "method": "HEAD", + "raw": "/0a/c/a/c" + }, + { + "method": "POST", + "raw": "/c/c/b" + }, + { + "method": "GET", + "raw": "/%34%32/" + }, + { + "method": "PUT", + "raw": "/ff" + }, + { + "method": "GET", + "raw": "/c/c/x/a%20b" + }, + { + "method": "GET", + "raw": "/b/c/a%20b/%34%32" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/c/a%20b/caf%C3%A9", + "normalized": "/c/a%20b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/42/c/7/c", + "normalized": "/42/c/7/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/ff", + "normalized": "/c/ff", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/a/a%20b", + "normalized": "/c/a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/42/c/7", + "normalized": "/42/c/7", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/0a/c/a/c", + "normalized": "/0a/c/a/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/c/b", + "normalized": "/c/c/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/%34%32/", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/c/x/a%20b", + "normalized": "/c/c/x/a%20b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/c/a%20b/%34%32", + "normalized": "/b/c/a%20b/%34%32", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G24", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G24.d1", + "method": "GET", + "pattern": "/c", + "transport": "negotiate" + }, + { + "id": "G24.d2", + "method": "GET", + "pattern": "/x/:p1/:p2", + "transport": "ndjson" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/x/b/7" + }, + { + "method": "HEAD", + "raw": "/c" + }, + { + "method": "HEAD", + "raw": "/x/x/a" + }, + { + "method": "PATCH", + "raw": "/c/q/.." + }, + { + "method": "OPTIONS", + "raw": "/x/ff/a%20b" + }, + { + "method": "DELETE", + "raw": "/x/a%20b/%34%32" + }, + { + "method": "HEAD", + "raw": "//ff/7/42/c" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "PATCH", + "raw": "/x/a%20b/7" + }, + { + "method": "PATCH", + "raw": "/x/x/./0a" + }, + { + "method": "HEAD", + "raw": "/c" + }, + { + "method": "PUT", + "raw": "/c/" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/x/b/7", + "normalized": "/x/b/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/x/a", + "normalized": "/x/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/q/..", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/ff/a%20b", + "normalized": "/x/ff/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/a%20b/%34%32", + "normalized": "/x/a%20b/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "//ff/7/42/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/a%20b/7", + "normalized": "/x/a%20b/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/x/./0a", + "normalized": "/x/x/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "G25", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G25.d1", + "method": "GET", + "pattern": "/x", + "transport": "buffer" + }, + { + "id": "G25.d2", + "method": "PUT", + "pattern": "/a/:p1([a-c]+)", + "transport": "buffer" + }, + { + "id": "G25.d3", + "method": "POST", + "pattern": "/c/x/a", + "transport": "buffer" + }, + { + "id": "G25.d4", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/c/x/a" + }, + { + "method": "PATCH", + "raw": "/7/b" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "GET", + "raw": "/c/x/a" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "POST", + "raw": "/x" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "PATCH", + "raw": "/a/0a" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/c/x/a", + "normalized": "/c/x/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/7/b", + "normalized": "/7/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G25.d4", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/a", + "normalized": "/c/x/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G25.d4", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G25.d4", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G25.d4", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": { + "id": "G25.d1", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/0a", + "normalized": "/a/0a", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G26", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G26.d1", + "method": "DELETE", + "pattern": "/:p0/:p1([a-c]+)/:p2/:p3*", + "transport": "buffer" + }, + { + "id": "G26.d2", + "method": "GET", + "pattern": "/x/:p1*", + "transport": "sse" + }, + { + "id": "G26.d3", + "method": "GET", + "pattern": "/x", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/b/caf%C3%A9" + }, + { + "method": "PUT", + "raw": "/c/7/a/" + }, + { + "method": "DELETE", + "raw": "/x" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "OPTIONS", + "raw": "/" + }, + { + "method": "GET", + "raw": "/x/ff/./%34%32" + }, + { + "method": "PUT", + "raw": "/0a/caf%C3%A9/x/b/x" + }, + { + "method": "PATCH", + "raw": "/a%20b/a/c/a" + }, + { + "method": "HEAD", + "raw": "/x/%34%32" + }, + { + "method": "OPTIONS", + "raw": "/7/42/x/b/ff" + }, + { + "method": "POST", + "raw": "/x" + }, + { + "method": "PUT", + "raw": "/x/." + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/b/caf%C3%A9", + "normalized": "/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/7/a/", + "normalized": "/c/7/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": { + "id": "G26.d3", + "params": {} + }, + "resolve": { + "id": "G26.d3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/ff/./%34%32", + "normalized": "/x/ff/%34%32", + "match": { + "id": "G26.d2", + "params": { + "p1": "ff/42" + } + }, + "resolve": { + "id": "G26.d2", + "params": { + "p1": "ff/42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/0a/caf%C3%A9/x/b/x", + "normalized": "/0a/caf%C3%A9/x/b/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/a%20b/a/c/a", + "normalized": "/a%20b/a/c/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/%34%32", + "normalized": "/x/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/7/42/x/b/ff", + "normalized": "/7/42/x/b/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x/.", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G27", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G27.d1", + "method": "HEAD", + "pattern": "/a/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "G27.d2", + "method": "GET", + "pattern": "/b/:p1([a-c]+)/:p2*", + "transport": "sse" + }, + { + "id": "G27.d3", + "method": "DELETE", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G27.d4", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G27.d5", + "method": "HEAD", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G27.d6", + "method": "DELETE", + "pattern": "/x/:p1*", + "transport": "buffer" + }, + { + "id": "G27.d7", + "method": "PATCH", + "pattern": "/a/c/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/x/b/ff" + }, + { + "method": "OPTIONS", + "raw": "/x/b/c" + }, + { + "method": "OPTIONS", + "raw": "/a%20b/42" + }, + { + "method": "POST", + "raw": "/c" + }, + { + "method": "GET", + "raw": "/7/" + }, + { + "method": "GET", + "raw": "/a/42/b" + }, + { + "method": "PATCH", + "raw": "/b/42" + }, + { + "method": "DELETE", + "raw": "/c/a%20b/a%20b/q/../x" + }, + { + "method": "HEAD", + "raw": "/0a/%34%32" + }, + { + "method": "GET", + "raw": "/7/c/42/b" + }, + { + "method": "DELETE", + "raw": "/a/c/c" + }, + { + "method": "POST", + "raw": "/" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/x/b/ff", + "normalized": "/x/b/ff", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/b/c", + "normalized": "/x/b/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a%20b/42", + "normalized": "/a%20b/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/7/", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/42/b", + "normalized": "/a/42/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/b/42", + "normalized": "/b/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/a%20b/a%20b/q/../x", + "normalized": "/c/a%20b/a%20b/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/0a/%34%32", + "normalized": "/0a/%34%32", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/7/c/42/b", + "normalized": "/7/c/42/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/a/c/c", + "normalized": "/a/c/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G28", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G28.d1", + "method": "DELETE", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G28.d2", + "method": "POST", + "pattern": "/x", + "transport": "buffer" + }, + { + "id": "G28.d3", + "method": "GET", + "pattern": "/x/:p1/:p2*", + "transport": "buffer" + }, + { + "id": "G28.d4", + "method": "GET", + "pattern": "/:p0", + "transport": "ndjson" + }, + { + "id": "G28.d5", + "method": "PATCH", + "pattern": "/:p0/:p1([0-9a-f]{2})/:p2", + "transport": "buffer" + }, + { + "id": "G28.d6", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G28.d7", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G28.d8", + "method": "PUT", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G28.d9", + "method": "DELETE", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "G28.d10", + "method": "PATCH", + "pattern": "/:p0([0-9a-f]{2})/x/:p2/:p3*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/0a" + }, + { + "method": "HEAD", + "raw": "/b/a" + }, + { + "method": "PUT", + "raw": "//x" + }, + { + "method": "OPTIONS", + "raw": "/x/caf%C3%A9/%34%32/ff" + }, + { + "method": "PUT", + "raw": "/0a/x" + }, + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "OPTIONS", + "raw": "/a%20b/" + }, + { + "method": "POST", + "raw": "/caf%C3%A9/a%20b/a" + }, + { + "method": "GET", + "raw": "/./x" + }, + { + "method": "GET", + "raw": "/%34%32/caf%C3%A9/./a%20b/ff" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "GET", + "raw": "/x/0a/x/%34%32" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/0a", + "normalized": "/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//x", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/x/caf%C3%A9/%34%32/ff", + "normalized": "/x/caf%C3%A9/%34%32/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/0a/x", + "normalized": "/0a/x", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a%20b/", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/caf%C3%A9/a%20b/a", + "normalized": "/caf%C3%A9/a%20b/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/./x", + "normalized": "/x", + "match": { + "id": "G28.d4", + "params": { + "p0": "x" + } + }, + "resolve": { + "id": "G28.d4", + "params": { + "p0": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/%34%32/caf%C3%A9/./a%20b/ff", + "normalized": "/%34%32/caf%C3%A9/a%20b/ff", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": { + "id": "G28.d1", + "params": { + "p0": "" + } + }, + "resolve": { + "id": "G28.d1", + "params": { + "p0": "" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/0a/x/%34%32", + "normalized": "/x/0a/x/%34%32", + "match": { + "id": "G28.d3", + "params": { + "p1": "0a", + "p2": "x/42" + } + }, + "resolve": { + "id": "G28.d3", + "params": { + "p1": "0a", + "p2": "x/42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "G29", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G29.d1", + "method": "PATCH", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G29.d2", + "method": "POST", + "pattern": "/a/:p1([0-9a-f]{2})/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "G29.d3", + "method": "HEAD", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "G29.d4", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/a" + }, + { + "method": "OPTIONS", + "raw": "/x/c/" + }, + { + "method": "PUT", + "raw": "/%34%32/c" + }, + { + "method": "DELETE", + "raw": "/caf%C3%A9/a" + }, + { + "method": "OPTIONS", + "raw": "/ff/b" + }, + { + "method": "POST", + "raw": "/7/b" + }, + { + "method": "GET", + "raw": "/42" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "POST", + "raw": "/%34%32" + }, + { + "method": "GET", + "raw": "/7" + }, + { + "method": "PUT", + "raw": "/x/b" + }, + { + "method": "PATCH", + "raw": "/%34%32" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/c/", + "normalized": "/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/%34%32/c", + "normalized": "/%34%32/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/caf%C3%A9/a", + "normalized": "/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/ff/b", + "normalized": "/ff/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/7/b", + "normalized": "/7/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/7", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x/b", + "normalized": "/x/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": { + "id": "G29.d1", + "params": { + "p0": "42" + } + }, + "resolve": { + "id": "G29.d1", + "params": { + "p0": "42" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G30", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G30.d1", + "method": "GET", + "pattern": "/a", + "transport": "ndjson" + }, + { + "id": "G30.d2", + "method": "OPTIONS", + "pattern": "/c/:p1/b/:p3*", + "transport": "buffer" + }, + { + "id": "G30.d3", + "method": "GET", + "pattern": "/:p0(\\d+)/:p1", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/c/caf%C3%A9" + }, + { + "method": "HEAD", + "raw": "/c/b/b/%34%32/" + }, + { + "method": "POST", + "raw": "/c/q/.." + }, + { + "method": "GET", + "raw": "/a/x" + }, + { + "method": "OPTIONS", + "raw": "/7" + }, + { + "method": "POST", + "raw": "/0a/caf%C3%A9" + }, + { + "method": "GET", + "raw": "/a%20b/42/b/a" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/caf%C3%A9/a" + }, + { + "method": "GET", + "raw": "/ff/0a/7/c/" + }, + { + "method": "OPTIONS", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/caf%C3%A9", + "normalized": "/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/c/b/b/%34%32/", + "normalized": "/c/b/b/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/q/..", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/7", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/0a/caf%C3%A9", + "normalized": "/0a/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a%20b/42/b/a", + "normalized": "/a%20b/42/b/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/caf%C3%A9/a", + "normalized": "/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/ff/0a/7/c/", + "normalized": "/ff/0a/7/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "G31", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G31.d1", + "method": "GET", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "G31.d2", + "method": "PATCH", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G31.d3", + "method": "GET", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G31.d4", + "method": "GET", + "pattern": "/:p0/x", + "transport": "buffer" + }, + { + "id": "G31.d5", + "method": "DELETE", + "pattern": "/:p0([a-c]+)", + "transport": "buffer" + }, + { + "id": "G31.d6", + "method": "PUT", + "pattern": "/x/:p1(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/7/0a" + }, + { + "method": "GET", + "raw": "//x/7" + }, + { + "method": "POST", + "raw": "/%34%32/" + }, + { + "method": "POST", + "raw": "/42/%34%32" + }, + { + "method": "POST", + "raw": "/7/ff" + }, + { + "method": "PATCH", + "raw": "/b" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "OPTIONS", + "raw": "/x/x" + }, + { + "method": "OPTIONS", + "raw": "/0a/b" + }, + { + "method": "DELETE", + "raw": "/q/../x/b" + }, + { + "method": "HEAD", + "raw": "/caf%C3%A9/x/." + }, + { + "method": "DELETE", + "raw": "/" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/7/0a", + "normalized": "/7/0a", + "match": null, + "resolve": { + "id": "G31.d3", + "params": { + "p0": "7/0a" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//x/7", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "POST", + "raw": "/%34%32/", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/42/%34%32", + "normalized": "/42/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/7/ff", + "normalized": "/7/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b", + "normalized": "/b", + "match": { + "id": "G31.d2", + "params": { + "p0": "b" + } + }, + "resolve": { + "id": "G31.d2", + "params": { + "p0": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "G31.d3", + "params": { + "p0": "a" + } + }, + "resolve": { + "id": "G31.d3", + "params": { + "p0": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/x", + "normalized": "/x/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/0a/b", + "normalized": "/0a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/q/../x/b", + "normalized": "/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/caf%C3%A9/x/.", + "normalized": "/caf%C3%A9/x", + "match": null, + "resolve": { + "id": "G31.d4", + "params": { + "p0": "café" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "G32", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G32.d1", + "method": "POST", + "pattern": "/:p0/:p1/x", + "transport": "buffer" + }, + { + "id": "G32.d2", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G32.d3", + "method": "GET", + "pattern": "/:p0*", + "transport": "sse" + }, + { + "id": "G32.d4", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G32.d5", + "method": "HEAD", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G32.d6", + "method": "PATCH", + "pattern": "/:p0/:p1([a-c]+)/:p2/:p3*", + "transport": "buffer" + }, + { + "id": "G32.d7", + "method": "DELETE", + "pattern": "/:p0/b/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "G32.d8", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/" + }, + { + "method": "PATCH", + "raw": "/42/b/ff/" + }, + { + "method": "OPTIONS", + "raw": "/." + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "POST", + "raw": "/b/b/a/42" + }, + { + "method": "PATCH", + "raw": "/./b" + }, + { + "method": "DELETE", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/caf%C3%A9/c/x" + }, + { + "method": "GET", + "raw": "/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/q/.." + }, + { + "method": "POST", + "raw": "/a/0a/a%20b" + }, + { + "method": "DELETE", + "raw": "//" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G32.d8", + "params": {} + }, + "resolve": { + "id": "G32.d8", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/42/b/ff/", + "normalized": "/42/b/ff", + "match": { + "id": "G32.d6", + "params": { + "p0": "42", + "p1": "b", + "p2": "ff", + "p3": "" + } + }, + "resolve": { + "id": "G32.d6", + "params": { + "p0": "42", + "p1": "b", + "p2": "ff", + "p3": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/.", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G32.d8", + "params": {} + }, + "resolve": { + "id": "G32.d8", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/a/42", + "normalized": "/b/b/a/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/./b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/caf%C3%A9/c/x", + "normalized": "/caf%C3%A9/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": { + "id": "G32.d3", + "params": { + "p0": "café" + } + }, + "resolve": { + "id": "G32.d3", + "params": { + "p0": "café" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/0a/a%20b", + "normalized": "/a/0a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + } + ] + }, + { + "id": "G33", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G33.d1", + "method": "GET", + "pattern": "/c/:p1", + "transport": "buffer" + }, + { + "id": "G33.d2", + "method": "GET", + "pattern": "/", + "transport": "sse" + }, + { + "id": "G33.d3", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G33.d4", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/" + }, + { + "method": "POST", + "raw": "/c/a/." + }, + { + "method": "DELETE", + "raw": "/c/a%20b/" + }, + { + "method": "PUT", + "raw": "/." + }, + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/c/" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/b/%34%32/0a/7" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/c/a" + }, + { + "method": "GET", + "raw": "/%34%32" + }, + { + "method": "GET", + "raw": "/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G33.d2", + "params": {} + }, + "resolve": { + "id": "G33.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/a/.", + "normalized": "/c/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/a%20b/", + "normalized": "/c/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/.", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": { + "id": "G33.d4", + "params": {} + }, + "resolve": { + "id": "G33.d4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G33.d2", + "params": {} + }, + "resolve": { + "id": "G33.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/%34%32/0a/7", + "normalized": "/b/%34%32/0a/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G33.d3", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/a", + "normalized": "/c/a", + "match": null, + "resolve": { + "id": "G33.d1", + "params": { + "p1": "a" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G33.d2", + "params": {} + }, + "resolve": { + "id": "G33.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G34", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G34.d1", + "method": "PATCH", + "pattern": "/:p0([0-9a-f]{2})/c/:p2*", + "transport": "buffer" + }, + { + "id": "G34.d2", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G34.d3", + "method": "HEAD", + "pattern": "/b", + "transport": "buffer" + }, + { + "id": "G34.d4", + "method": "GET", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "G34.d5", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G34.d6", + "method": "GET", + "pattern": "/c/c", + "transport": "ndjson" + }, + { + "id": "G34.d7", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G34.d8", + "method": "PUT", + "pattern": "/b", + "transport": "buffer" + }, + { + "id": "G34.d9", + "method": "GET", + "pattern": "/", + "transport": "negotiate" + }, + { + "id": "G34.d10", + "method": "OPTIONS", + "pattern": "/c/a/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/ff" + }, + { + "method": "GET", + "raw": "/0a/caf%C3%A9/a%20b/ff" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/." + }, + { + "method": "GET", + "raw": "/c" + }, + { + "method": "PATCH", + "raw": "/b/c" + }, + { + "method": "GET", + "raw": "/c/a" + }, + { + "method": "POST", + "raw": "/a/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/7/x" + }, + { + "method": "OPTIONS", + "raw": "/b" + }, + { + "method": "GET", + "raw": "/b/x/0a/x" + }, + { + "method": "DELETE", + "raw": "/x/7/b/ff" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/0a/caf%C3%A9/a%20b/ff", + "normalized": "/0a/caf%C3%A9/a%20b/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/.", + "normalized": "/", + "match": { + "id": "G34.d2", + "params": {} + }, + "resolve": { + "id": "G34.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/b/c", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/a", + "normalized": "/c/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/a/caf%C3%A9", + "normalized": "/a/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/7/x", + "normalized": "/caf%C3%A9/7/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/0a/x", + "normalized": "/b/x/0a/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/7/b/ff", + "normalized": "/x/7/b/ff", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G35", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G35.d1", + "method": "GET", + "pattern": "/:p0(\\d+)", + "transport": "ndjson" + }, + { + "id": "G35.d2", + "method": "OPTIONS", + "pattern": "/:p0/c/:p2", + "transport": "buffer" + }, + { + "id": "G35.d3", + "method": "OPTIONS", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G35.d4", + "method": "OPTIONS", + "pattern": "/a/:p1([a-c]+)/c", + "transport": "buffer" + }, + { + "id": "G35.d5", + "method": "HEAD", + "pattern": "/:p0([a-c]+)", + "transport": "buffer" + }, + { + "id": "G35.d6", + "method": "OPTIONS", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "G35.d7", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G35.d8", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G35.d9", + "method": "PATCH", + "pattern": "/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/%34%32/0a/a%20b" + }, + { + "method": "DELETE", + "raw": "/c/q/.." + }, + { + "method": "GET", + "raw": "/a%20b/c/%34%32" + }, + { + "method": "GET", + "raw": "//a" + }, + { + "method": "OPTIONS", + "raw": "//" + }, + { + "method": "PUT", + "raw": "//a/0a/c" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "POST", + "raw": "/b/42/42/42" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/x" + }, + { + "method": "DELETE", + "raw": "/ff/c/42" + }, + { + "method": "HEAD", + "raw": "/ff/a/x" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/%34%32/0a/a%20b", + "normalized": "/%34%32/0a/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/q/..", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a%20b/c/%34%32", + "normalized": "/a%20b/c/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "//", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "//a/0a/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/42/42/42", + "normalized": "/b/42/42/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": { + "id": "G35.d8", + "params": {} + }, + "resolve": { + "id": "G35.d8", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/ff/c/42", + "normalized": "/ff/c/42", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/ff/a/x", + "normalized": "/ff/a/x", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "G36", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G36.d1", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})/:p1*", + "transport": "buffer" + }, + { + "id": "G36.d2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G36.d3", + "method": "PATCH", + "pattern": "/:p0*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/%34%32" + }, + { + "method": "POST", + "raw": "/42/ff/%34%32" + }, + { + "method": "PATCH", + "raw": "/42/a%20b/c/a%20b" + }, + { + "method": "PUT", + "raw": "/42/" + }, + { + "method": "DELETE", + "raw": "/ff/caf%C3%A9/%34%32/42" + }, + { + "method": "PATCH", + "raw": "/7/a%20b/x" + }, + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/" + }, + { + "method": "GET", + "raw": "/%34%32/0a" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/42/ff/%34%32", + "normalized": "/42/ff/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/42/a%20b/c/a%20b", + "normalized": "/42/a%20b/c/a%20b", + "match": { + "id": "G36.d3", + "params": { + "p0": "42/a b/c/a b" + } + }, + "resolve": { + "id": "G36.d3", + "params": { + "p0": "42/a b/c/a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/42/", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/ff/caf%C3%A9/%34%32/42", + "normalized": "/ff/caf%C3%A9/%34%32/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/7/a%20b/x", + "normalized": "/7/a%20b/x", + "match": { + "id": "G36.d3", + "params": { + "p0": "7/a b/x" + } + }, + "resolve": { + "id": "G36.d3", + "params": { + "p0": "7/a b/x" + }, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": { + "id": "G36.d3", + "params": { + "p0": "" + } + }, + "resolve": { + "id": "G36.d3", + "params": { + "p0": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G36.d2", + "params": {} + }, + "resolve": { + "id": "G36.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/%34%32/0a", + "normalized": "/%34%32/0a", + "match": { + "id": "G36.d1", + "params": { + "p0": "42", + "p1": "0a" + } + }, + "resolve": { + "id": "G36.d1", + "params": { + "p0": "42", + "p1": "0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G36.d2", + "params": {} + }, + "resolve": { + "id": "G36.d2", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G37", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G37.d1", + "method": "PATCH", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G37.d2", + "method": "GET", + "pattern": "/b/c/:p2", + "transport": "buffer" + }, + { + "id": "G37.d3", + "method": "PUT", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G37.d4", + "method": "PATCH", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G37.d5", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "//./caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/b/a/%34%32/a%20b" + }, + { + "method": "POST", + "raw": "/" + }, + { + "method": "OPTIONS", + "raw": "/b/c/a/" + }, + { + "method": "PUT", + "raw": "/ff/c/42" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/7/7/x/c/" + }, + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "POST", + "raw": "/b/c/caf%C3%A9/." + }, + { + "method": "GET", + "raw": "//" + }, + { + "method": "HEAD", + "raw": "/b/c/x" + }, + { + "method": "HEAD", + "raw": "/42" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "//./caf%C3%A9", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/b/a/%34%32/a%20b", + "normalized": "/b/a/%34%32/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/c/a/", + "normalized": "/b/c/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/ff/c/42", + "normalized": "/ff/c/42", + "match": { + "id": "G37.d3", + "params": { + "p0": "ff/c/42" + } + }, + "resolve": { + "id": "G37.d3", + "params": { + "p0": "ff/c/42" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/7/7/x/c/", + "normalized": "/7/7/x/c", + "match": { + "id": "G37.d3", + "params": { + "p0": "7/7/x/c" + } + }, + "resolve": { + "id": "G37.d3", + "params": { + "p0": "7/7/x/c" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/c/caf%C3%A9/.", + "normalized": "/b/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "HEAD", + "raw": "/b/c/x", + "normalized": "/b/c/x", + "match": null, + "resolve": { + "id": "G37.d2", + "params": { + "p2": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "G38", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G38.d1", + "method": "HEAD", + "pattern": "/x/:p1(\\d+)/:p2", + "transport": "buffer" + }, + { + "id": "G38.d2", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G38.d3", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G38.d4", + "method": "POST", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G38.d5", + "method": "GET", + "pattern": "/:p0([a-c]+)/a", + "transport": "ndjson" + }, + { + "id": "G38.d6", + "method": "OPTIONS", + "pattern": "/x/a", + "transport": "buffer" + }, + { + "id": "G38.d7", + "method": "GET", + "pattern": "/a", + "transport": "negotiate" + }, + { + "id": "G38.d8", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "negotiate" + }, + { + "id": "G38.d9", + "method": "GET", + "pattern": "/b", + "transport": "buffer" + }, + { + "id": "G38.d10", + "method": "POST", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a%20b" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "GET", + "raw": "/x/ff/c" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "HEAD", + "raw": "/c/42/0a/7" + }, + { + "method": "GET", + "raw": "/." + }, + { + "method": "PUT", + "raw": "/b/7/b/0a" + }, + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "DELETE", + "raw": "/0a" + }, + { + "method": "PUT", + "raw": "/caf%C3%A9/42" + }, + { + "method": "POST", + "raw": "/ff" + }, + { + "method": "PUT", + "raw": "/q/.." + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G38.d3", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/ff/c", + "normalized": "/x/ff/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G38.d3", + "params": {} + }, + "resolve": { + "id": "G38.d3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/42/0a/7", + "normalized": "/c/42/0a/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/.", + "normalized": "/", + "match": { + "id": "G38.d3", + "params": {} + }, + "resolve": { + "id": "G38.d3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/7/b/0a", + "normalized": "/b/7/b/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/0a", + "normalized": "/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/caf%C3%A9/42", + "normalized": "/caf%C3%A9/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "G39", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G39.d1", + "method": "PUT", + "pattern": "/b/:p1/:p2*", + "transport": "buffer" + }, + { + "id": "G39.d2", + "method": "DELETE", + "pattern": "/:p0*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/b/42" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/%34%32" + }, + { + "method": "GET", + "raw": "/b/a/0a/a" + }, + { + "method": "OPTIONS", + "raw": "/7/%34%32/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/q/../b/b/x" + }, + { + "method": "HEAD", + "raw": "/c" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "PATCH", + "raw": "/a/" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/b/ff/%34%32/q/.." + }, + { + "method": "PUT", + "raw": "/caf%C3%A9/caf%C3%A9/" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/b/42", + "normalized": "/b/42", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": { + "id": "G39.d2", + "params": { + "p0": "" + } + }, + "resolve": { + "id": "G39.d2", + "params": { + "p0": "" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a/0a/a", + "normalized": "/b/a/0a/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/7/%34%32/caf%C3%A9", + "normalized": "/7/%34%32/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/q/../b/b/x", + "normalized": "/b/b/x", + "match": { + "id": "G39.d2", + "params": { + "p0": "b/b/x" + } + }, + "resolve": { + "id": "G39.d2", + "params": { + "p0": "b/b/x" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/ff/%34%32/q/..", + "normalized": "/b/ff/%34%32", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/caf%C3%A9/caf%C3%A9/", + "normalized": "/caf%C3%A9/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "G40", + "note": "generated by router-parity-gen-v1, seed 10908", + "declarations": [ + { + "id": "G40.d1", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G40.d2", + "method": "PATCH", + "pattern": "/c", + "transport": "buffer" + }, + { + "id": "G40.d3", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G40.d4", + "method": "DELETE", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "G40.d5", + "method": "PATCH", + "pattern": "/:p0([a-c]+)/:p1(\\d+)/a", + "transport": "buffer" + }, + { + "id": "G40.d6", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "G40.d7", + "method": "DELETE", + "pattern": "/b/:p1*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "//" + }, + { + "method": "POST", + "raw": "/7" + }, + { + "method": "GET", + "raw": "/ff/c/ff" + }, + { + "method": "HEAD", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "PUT", + "raw": "/b/0a/a" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "PATCH", + "raw": "/c/a/a/c" + }, + { + "method": "OPTIONS", + "raw": "/42/b/x" + }, + { + "method": "PUT", + "raw": "/a/0a/." + }, + { + "method": "OPTIONS", + "raw": "/" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "//", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "POST", + "raw": "/7", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/ff/c/ff", + "normalized": "/ff/c/ff", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": { + "id": "G40.d6", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/", + "normalized": "/", + "match": { + "id": "G40.d4", + "params": { + "p0": "" + } + }, + "resolve": { + "id": "G40.d4", + "params": { + "p0": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G40.d6", + "params": {} + }, + "resolve": { + "id": "G40.d6", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/0a/a", + "normalized": "/b/0a/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "G40.d6", + "params": {} + }, + "resolve": { + "id": "G40.d6", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/a/a/c", + "normalized": "/c/a/a/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/42/b/x", + "normalized": "/42/b/x", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/0a/.", + "normalized": "/a/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "DELETE", + "OPTIONS" + ] + } + ] + } + ] + } +} diff --git a/test/router-parity/frozen/matcher-hand.json b/test/router-parity/frozen/matcher-hand.json new file mode 100644 index 0000000..6c031eb --- /dev/null +++ b/test/router-parity/frozen/matcher-hand.json @@ -0,0 +1,3324 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "id": "H01-rank", + "note": "static beats plain param beats catch-all", + "declarations": [ + { + "id": "catchAll", + "method": "GET", + "pattern": "/a/:rest*", + "transport": "buffer" + }, + { + "id": "param", + "method": "GET", + "pattern": "/a/:id", + "transport": "buffer" + }, + { + "id": "static", + "method": "GET", + "pattern": "/a/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "/a/x" + }, + { + "method": "GET", + "raw": "/a/x/y" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/a/" + }, + { + "method": "HEAD", + "raw": "/a/x" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "POST", + "raw": "/a/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/x", + "normalized": "/a/x", + "match": { + "id": "param", + "params": { + "id": "x" + } + }, + "resolve": { + "id": "param", + "params": { + "id": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/x/y", + "normalized": "/a/x/y", + "match": { + "id": "catchAll", + "params": { + "rest": "x/y" + } + }, + "resolve": { + "id": "catchAll", + "params": { + "rest": "x/y" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "catchAll", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "catchAll", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/", + "normalized": "/a", + "match": { + "id": "catchAll", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "catchAll", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": { + "id": "param", + "params": { + "id": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H02-rank-reversed", + "note": "static beats plain param beats catch-all (declarations reversed)", + "declarations": [ + { + "id": "static", + "method": "GET", + "pattern": "/a/b", + "transport": "buffer" + }, + { + "id": "param", + "method": "GET", + "pattern": "/a/:id", + "transport": "buffer" + }, + { + "id": "catchAll", + "method": "GET", + "pattern": "/a/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "/a/x" + }, + { + "method": "GET", + "raw": "/a/x/y" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/a/" + }, + { + "method": "HEAD", + "raw": "/a/x" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "POST", + "raw": "/a/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/x", + "normalized": "/a/x", + "match": { + "id": "param", + "params": { + "id": "x" + } + }, + "resolve": { + "id": "param", + "params": { + "id": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/x/y", + "normalized": "/a/x/y", + "match": { + "id": "catchAll", + "params": { + "rest": "x/y" + } + }, + "resolve": { + "id": "catchAll", + "params": { + "rest": "x/y" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "catchAll", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "catchAll", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/", + "normalized": "/a", + "match": { + "id": "catchAll", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "catchAll", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": { + "id": "param", + "params": { + "id": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H03-constraint", + "note": "constrained param beats plain param; constraint tested against the decoded segment", + "declarations": [ + { + "id": "plain", + "method": "GET", + "pattern": "/users/:value", + "transport": "buffer" + }, + { + "id": "digits", + "method": "GET", + "pattern": "/users/:id(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/users/42" + }, + { + "method": "GET", + "raw": "/users/alice" + }, + { + "method": "GET", + "raw": "/users/42x" + }, + { + "method": "GET", + "raw": "/users/%34%32" + }, + { + "method": "GET", + "raw": "/users/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/users/42", + "normalized": "/users/42", + "match": { + "id": "digits", + "params": { + "id": "42" + } + }, + "resolve": { + "id": "digits", + "params": { + "id": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/alice", + "normalized": "/users/alice", + "match": { + "id": "plain", + "params": { + "value": "alice" + } + }, + "resolve": { + "id": "plain", + "params": { + "value": "alice" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/42x", + "normalized": "/users/42x", + "match": { + "id": "plain", + "params": { + "value": "42x" + } + }, + "resolve": { + "id": "plain", + "params": { + "value": "42x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/%34%32", + "normalized": "/users/%34%32", + "match": { + "id": "digits", + "params": { + "id": "42" + } + }, + "resolve": { + "id": "digits", + "params": { + "id": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/", + "normalized": "/users", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "H04-constraint-reversed", + "note": "constrained param beats plain param; constraint tested against the decoded segment (declarations reversed)", + "declarations": [ + { + "id": "digits", + "method": "GET", + "pattern": "/users/:id(\\d+)", + "transport": "buffer" + }, + { + "id": "plain", + "method": "GET", + "pattern": "/users/:value", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/users/42" + }, + { + "method": "GET", + "raw": "/users/alice" + }, + { + "method": "GET", + "raw": "/users/42x" + }, + { + "method": "GET", + "raw": "/users/%34%32" + }, + { + "method": "GET", + "raw": "/users/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/users/42", + "normalized": "/users/42", + "match": { + "id": "digits", + "params": { + "id": "42" + } + }, + "resolve": { + "id": "digits", + "params": { + "id": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/alice", + "normalized": "/users/alice", + "match": { + "id": "plain", + "params": { + "value": "alice" + } + }, + "resolve": { + "id": "plain", + "params": { + "value": "alice" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/42x", + "normalized": "/users/42x", + "match": { + "id": "plain", + "params": { + "value": "42x" + } + }, + "resolve": { + "id": "plain", + "params": { + "value": "42x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/%34%32", + "normalized": "/users/%34%32", + "match": { + "id": "digits", + "params": { + "id": "42" + } + }, + "resolve": { + "id": "digits", + "params": { + "id": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/", + "normalized": "/users", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "H05-constraint-tie", + "note": "two overlapping constraints of equal rank: registration order decides", + "declarations": [ + { + "id": "digits", + "method": "GET", + "pattern": "/n/:num(\\d+)", + "transport": "buffer" + }, + { + "id": "hex", + "method": "GET", + "pattern": "/n/:code([0-9a-f]+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/n/42" + }, + { + "method": "GET", + "raw": "/n/ff" + }, + { + "method": "GET", + "raw": "/n/4f" + }, + { + "method": "GET", + "raw": "/n/zz" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/n/42", + "normalized": "/n/42", + "match": { + "id": "digits", + "params": { + "num": "42" + } + }, + "resolve": { + "id": "digits", + "params": { + "num": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/n/ff", + "normalized": "/n/ff", + "match": { + "id": "hex", + "params": { + "code": "ff" + } + }, + "resolve": { + "id": "hex", + "params": { + "code": "ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/n/4f", + "normalized": "/n/4f", + "match": { + "id": "hex", + "params": { + "code": "4f" + } + }, + "resolve": { + "id": "hex", + "params": { + "code": "4f" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/n/zz", + "normalized": "/n/zz", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "H06-constraint-tie-reversed", + "note": "two overlapping constraints of equal rank: registration order decides (declarations reversed)", + "declarations": [ + { + "id": "hex", + "method": "GET", + "pattern": "/n/:code([0-9a-f]+)", + "transport": "buffer" + }, + { + "id": "digits", + "method": "GET", + "pattern": "/n/:num(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/n/42" + }, + { + "method": "GET", + "raw": "/n/ff" + }, + { + "method": "GET", + "raw": "/n/4f" + }, + { + "method": "GET", + "raw": "/n/zz" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/n/42", + "normalized": "/n/42", + "match": { + "id": "hex", + "params": { + "code": "42" + } + }, + "resolve": { + "id": "hex", + "params": { + "code": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/n/ff", + "normalized": "/n/ff", + "match": { + "id": "hex", + "params": { + "code": "ff" + } + }, + "resolve": { + "id": "hex", + "params": { + "code": "ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/n/4f", + "normalized": "/n/4f", + "match": { + "id": "hex", + "params": { + "code": "4f" + } + }, + "resolve": { + "id": "hex", + "params": { + "code": "4f" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/n/zz", + "normalized": "/n/zz", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "H07-exact-vs-catch-all", + "note": "exact route at /files, catch-all below it, decoded captures", + "declarations": [ + { + "id": "exact", + "method": "GET", + "pattern": "/files", + "transport": "buffer" + }, + { + "id": "rest", + "method": "GET", + "pattern": "/files/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/files" + }, + { + "method": "GET", + "raw": "/files/" + }, + { + "method": "GET", + "raw": "/files/a%2Fb" + }, + { + "method": "GET", + "raw": "/files/a/b/c" + }, + { + "method": "GET", + "raw": "/files/a%20b/c%2Fd" + }, + { + "method": "HEAD", + "raw": "/files/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/files", + "normalized": "/files", + "match": { + "id": "exact", + "params": {} + }, + "resolve": { + "id": "exact", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/", + "normalized": "/files", + "match": { + "id": "exact", + "params": {} + }, + "resolve": { + "id": "exact", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/a%2Fb", + "normalized": "/files/a%2Fb", + "match": { + "id": "rest", + "params": { + "rest": "a/b" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/a/b/c", + "normalized": "/files/a/b/c", + "match": { + "id": "rest", + "params": { + "rest": "a/b/c" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a/b/c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/a%20b/c%2Fd", + "normalized": "/files/a%20b/c%2Fd", + "match": { + "id": "rest", + "params": { + "rest": "a b/c/d" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a b/c/d" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/files/x", + "normalized": "/files/x", + "match": null, + "resolve": { + "id": "rest", + "params": { + "rest": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H08-equal-rank", + "note": "equal-specificity plain params: first registered wins", + "declarations": [ + { + "id": "first", + "method": "GET", + "pattern": "/t/:first", + "transport": "buffer" + }, + { + "id": "second", + "method": "GET", + "pattern": "/t/:second", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/t/x" + }, + { + "method": "GET", + "raw": "/t/x/y" + }, + { + "method": "HEAD", + "raw": "/t/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/t/x", + "normalized": "/t/x", + "match": { + "id": "first", + "params": { + "first": "x" + } + }, + "resolve": { + "id": "first", + "params": { + "first": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/t/x/y", + "normalized": "/t/x/y", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/t/x", + "normalized": "/t/x", + "match": null, + "resolve": { + "id": "first", + "params": { + "first": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H09-equal-rank-reversed", + "note": "equal-specificity plain params: first registered wins (declarations reversed)", + "declarations": [ + { + "id": "second", + "method": "GET", + "pattern": "/t/:second", + "transport": "buffer" + }, + { + "id": "first", + "method": "GET", + "pattern": "/t/:first", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/t/x" + }, + { + "method": "GET", + "raw": "/t/x/y" + }, + { + "method": "HEAD", + "raw": "/t/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/t/x", + "normalized": "/t/x", + "match": { + "id": "second", + "params": { + "second": "x" + } + }, + "resolve": { + "id": "second", + "params": { + "second": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/t/x/y", + "normalized": "/t/x/y", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/t/x", + "normalized": "/t/x", + "match": null, + "resolve": { + "id": "second", + "params": { + "second": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H10-same-pattern", + "note": "identical pattern text under two declaration IDs (mesh local/remote twins reach the matcher this way)", + "declarations": [ + { + "id": "one", + "method": "GET", + "pattern": "/same", + "transport": "buffer" + }, + { + "id": "two", + "method": "GET", + "pattern": "/same", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/same" + }, + { + "method": "HEAD", + "raw": "/same" + }, + { + "method": "OPTIONS", + "raw": "/same" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/same", + "normalized": "/same", + "match": { + "id": "one", + "params": {} + }, + "resolve": { + "id": "one", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/same", + "normalized": "/same", + "match": null, + "resolve": { + "id": "one", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/same", + "normalized": "/same", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H11-same-pattern-reversed", + "note": "identical pattern text under two declaration IDs (mesh local/remote twins reach the matcher this way) (declarations reversed)", + "declarations": [ + { + "id": "two", + "method": "GET", + "pattern": "/same", + "transport": "buffer" + }, + { + "id": "one", + "method": "GET", + "pattern": "/same", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/same" + }, + { + "method": "HEAD", + "raw": "/same" + }, + { + "method": "OPTIONS", + "raw": "/same" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/same", + "normalized": "/same", + "match": { + "id": "two", + "params": {} + }, + "resolve": { + "id": "two", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/same", + "normalized": "/same", + "match": null, + "resolve": { + "id": "two", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/same", + "normalized": "/same", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H12-method-implicit-head", + "note": "buffered GET supplies HEAD; OPTIONS and 405 share one canonical Allow", + "declarations": [ + { + "id": "get", + "method": "GET", + "pattern": "/m", + "transport": "buffer" + }, + { + "id": "post", + "method": "POST", + "pattern": "/m", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/m" + }, + { + "method": "HEAD", + "raw": "/m" + }, + { + "method": "OPTIONS", + "raw": "/m" + }, + { + "method": "POST", + "raw": "/m" + }, + { + "method": "PUT", + "raw": "/m" + }, + { + "method": "DELETE", + "raw": "/m" + }, + { + "method": "PATCH", + "raw": "/m" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/m", + "normalized": "/m", + "match": { + "id": "get", + "params": {} + }, + "resolve": { + "id": "get", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": { + "id": "get", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/m", + "normalized": "/m", + "match": { + "id": "post", + "params": {} + }, + "resolve": { + "id": "post", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "H13-method-explicit-head", + "note": "an explicit HEAD wins over the buffered-GET fallback", + "declarations": [ + { + "id": "get", + "method": "GET", + "pattern": "/m", + "transport": "buffer" + }, + { + "id": "post", + "method": "POST", + "pattern": "/m", + "transport": "buffer" + }, + { + "id": "head", + "method": "HEAD", + "pattern": "/m", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/m" + }, + { + "method": "HEAD", + "raw": "/m" + }, + { + "method": "OPTIONS", + "raw": "/m" + }, + { + "method": "POST", + "raw": "/m" + }, + { + "method": "PUT", + "raw": "/m" + }, + { + "method": "DELETE", + "raw": "/m" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/m", + "normalized": "/m", + "match": { + "id": "get", + "params": {} + }, + "resolve": { + "id": "get", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/m", + "normalized": "/m", + "match": { + "id": "head", + "params": {} + }, + "resolve": { + "id": "head", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/m", + "normalized": "/m", + "match": { + "id": "post", + "params": {} + }, + "resolve": { + "id": "post", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/m", + "normalized": "/m", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "H14-streaming-head", + "note": "a streaming GET does not supply HEAD", + "declarations": [ + { + "id": "stream", + "method": "GET", + "pattern": "/stream", + "transport": "sse" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/stream" + }, + { + "method": "HEAD", + "raw": "/stream" + }, + { + "method": "OPTIONS", + "raw": "/stream" + }, + { + "method": "POST", + "raw": "/stream" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/stream", + "normalized": "/stream", + "match": { + "id": "stream", + "params": {} + }, + "resolve": { + "id": "stream", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/stream", + "normalized": "/stream", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/stream", + "normalized": "/stream", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/stream", + "normalized": "/stream", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "H15-streaming-outranks-buffered", + "note": "HEAD skips a higher-ranked streaming GET and falls back to a lower-ranked buffered GET", + "declarations": [ + { + "id": "live", + "method": "GET", + "pattern": "/s/live", + "transport": "sse" + }, + { + "id": "byId", + "method": "GET", + "pattern": "/s/:id", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/s/live" + }, + { + "method": "HEAD", + "raw": "/s/live" + }, + { + "method": "OPTIONS", + "raw": "/s/live" + }, + { + "method": "HEAD", + "raw": "/s/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/s/live", + "normalized": "/s/live", + "match": { + "id": "live", + "params": {} + }, + "resolve": { + "id": "live", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/s/live", + "normalized": "/s/live", + "match": null, + "resolve": { + "id": "byId", + "params": { + "id": "live" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/s/live", + "normalized": "/s/live", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/s/x", + "normalized": "/s/x", + "match": null, + "resolve": { + "id": "byId", + "params": { + "id": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H16-negotiate-and-ndjson-head", + "note": "negotiate and ndjson GETs are streaming transports for the HEAD rule", + "declarations": [ + { + "id": "negotiate", + "method": "GET", + "pattern": "/neg", + "transport": "negotiate" + }, + { + "id": "ndjson", + "method": "GET", + "pattern": "/nd", + "transport": "ndjson" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/neg" + }, + { + "method": "HEAD", + "raw": "/neg" + }, + { + "method": "OPTIONS", + "raw": "/neg" + }, + { + "method": "HEAD", + "raw": "/nd" + }, + { + "method": "OPTIONS", + "raw": "/nd" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/neg", + "normalized": "/neg", + "match": { + "id": "negotiate", + "params": {} + }, + "resolve": { + "id": "negotiate", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/neg", + "normalized": "/neg", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/neg", + "normalized": "/neg", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/nd", + "normalized": "/nd", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/nd", + "normalized": "/nd", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "H17-allow-order", + "note": "Allow is canonical regardless of declaration order; explicit OPTIONS is a normal route", + "declarations": [ + { + "id": "delete", + "method": "DELETE", + "pattern": "/r", + "transport": "buffer" + }, + { + "id": "patch", + "method": "PATCH", + "pattern": "/r", + "transport": "buffer" + }, + { + "id": "options", + "method": "OPTIONS", + "pattern": "/r", + "transport": "buffer" + }, + { + "id": "put", + "method": "PUT", + "pattern": "/r", + "transport": "buffer" + }, + { + "id": "get", + "method": "GET", + "pattern": "/r", + "transport": "sse" + }, + { + "id": "post", + "method": "POST", + "pattern": "/r", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/r" + }, + { + "method": "HEAD", + "raw": "/r" + }, + { + "method": "GET", + "raw": "/r" + }, + { + "method": "TRACE", + "raw": "/r" + }, + { + "method": "POST", + "raw": "/r" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/r", + "normalized": "/r", + "match": { + "id": "options", + "params": {} + }, + "resolve": { + "id": "options", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/r", + "normalized": "/r", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/r", + "normalized": "/r", + "match": { + "id": "get", + "params": {} + }, + "resolve": { + "id": "get", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "TRACE", + "raw": "/r", + "normalized": "/r", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/r", + "normalized": "/r", + "match": { + "id": "post", + "params": {} + }, + "resolve": { + "id": "post", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "H18-path-miss", + "note": "a path no pattern matches: no route and an empty Allow", + "declarations": [ + { + "id": "a", + "method": "GET", + "pattern": "/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/absent" + }, + { + "method": "GET", + "raw": "/a/extra" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "OPTIONS", + "raw": "/absent" + }, + { + "method": "HEAD", + "raw": "/absent" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/absent", + "normalized": "/absent", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/extra", + "normalized": "/a/extra", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/absent", + "normalized": "/absent", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/absent", + "normalized": "/absent", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "H19-encoding-case-unicode", + "note": "decoded params, malformed escapes, repeated slashes, exact case and Unicode literals", + "declarations": [ + { + "id": "userId", + "method": "GET", + "pattern": "/users/:id", + "transport": "buffer" + }, + { + "id": "upper", + "method": "GET", + "pattern": "/Case", + "transport": "buffer" + }, + { + "id": "unicode", + "method": "GET", + "pattern": "/café", + "transport": "buffer" + }, + { + "id": "unicodeParam", + "method": "GET", + "pattern": "/u/:name", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/users/a%20b" + }, + { + "method": "GET", + "raw": "/users/a+b" + }, + { + "method": "GET", + "raw": "/users/%F0%9F%8D%B5" + }, + { + "method": "GET", + "raw": "/users/%E0%A4%A" + }, + { + "method": "GET", + "raw": "/users/%zz" + }, + { + "method": "GET", + "raw": "/a//b" + }, + { + "method": "GET", + "raw": "/users//x" + }, + { + "method": "GET", + "raw": "/Case" + }, + { + "method": "GET", + "raw": "/case" + }, + { + "method": "GET", + "raw": "/CASE" + }, + { + "method": "GET", + "raw": "/café" + }, + { + "method": "GET", + "raw": "/caf%C3%A9" + }, + { + "method": "GET", + "raw": "/u/caf%C3%A9" + }, + { + "method": "GET", + "raw": "/u/café" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/users/a%20b", + "normalized": "/users/a%20b", + "match": { + "id": "userId", + "params": { + "id": "a b" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/a+b", + "normalized": "/users/a+b", + "match": { + "id": "userId", + "params": { + "id": "a+b" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "a+b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/%F0%9F%8D%B5", + "normalized": "/users/%F0%9F%8D%B5", + "match": { + "id": "userId", + "params": { + "id": "🍵" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "🍵" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/%E0%A4%A", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: malformed path encoding" + } + }, + { + "method": "GET", + "raw": "/users/%zz", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: malformed path encoding" + } + }, + { + "method": "GET", + "raw": "/a//b", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/users//x", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/Case", + "normalized": "/Case", + "match": { + "id": "upper", + "params": {} + }, + "resolve": { + "id": "upper", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/case", + "normalized": "/case", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/CASE", + "normalized": "/CASE", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/café", + "normalized": "/café", + "match": { + "id": "unicode", + "params": {} + }, + "resolve": { + "id": "unicode", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/u/caf%C3%A9", + "normalized": "/u/caf%C3%A9", + "match": { + "id": "unicodeParam", + "params": { + "name": "café" + } + }, + "resolve": { + "id": "unicodeParam", + "params": { + "name": "café" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/u/café", + "normalized": "/u/café", + "match": { + "id": "unicodeParam", + "params": { + "name": "café" + } + }, + "resolve": { + "id": "unicodeParam", + "params": { + "name": "café" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H20-normalization", + "note": "one trailing slash removed; plain and encoded dot segments resolved before lookup", + "declarations": [ + { + "id": "a", + "method": "GET", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "admin", + "method": "GET", + "pattern": "/admin", + "transport": "buffer" + }, + { + "id": "file", + "method": "GET", + "pattern": "/public/:file", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/" + }, + { + "method": "GET", + "raw": "/a//" + }, + { + "method": "GET", + "raw": "/public/../admin" + }, + { + "method": "GET", + "raw": "/public/%2e%2e/admin" + }, + { + "method": "GET", + "raw": "/public/%2E%2E/admin" + }, + { + "method": "GET", + "raw": "/public/./x" + }, + { + "method": "GET", + "raw": "/a/." + }, + { + "method": "GET", + "raw": "/public/..%2fadmin" + }, + { + "method": "GET", + "raw": "/.." + }, + { + "method": "GET", + "raw": "/a/b/../../admin" + }, + { + "method": "GET", + "raw": "" + }, + { + "method": "GET", + "raw": "a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/", + "normalized": "/a", + "match": { + "id": "a", + "params": {} + }, + "resolve": { + "id": "a", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a//", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/public/../admin", + "normalized": "/admin", + "match": { + "id": "admin", + "params": {} + }, + "resolve": { + "id": "admin", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/public/%2e%2e/admin", + "normalized": "/admin", + "match": { + "id": "admin", + "params": {} + }, + "resolve": { + "id": "admin", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/public/%2E%2E/admin", + "normalized": "/admin", + "match": { + "id": "admin", + "params": {} + }, + "resolve": { + "id": "admin", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/public/./x", + "normalized": "/public/x", + "match": { + "id": "file", + "params": { + "file": "x" + } + }, + "resolve": { + "id": "file", + "params": { + "file": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/.", + "normalized": "/a", + "match": { + "id": "a", + "params": {} + }, + "resolve": { + "id": "a", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/public/..%2fadmin", + "normalized": "/public/..%2fadmin", + "match": { + "id": "file", + "params": { + "file": "../admin" + } + }, + "resolve": { + "id": "file", + "params": { + "file": "../admin" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/b/../../admin", + "normalized": "/admin", + "match": { + "id": "admin", + "params": {} + }, + "resolve": { + "id": "admin", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: path must start with slash" + } + }, + { + "method": "GET", + "raw": "a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: path must start with slash" + } + } + ] + }, + { + "id": "H21-root", + "note": "the root pattern and a root catch-all", + "declarations": [ + { + "id": "any", + "method": "GET", + "pattern": "/:rest*", + "transport": "buffer" + }, + { + "id": "root", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "GET", + "raw": "/x/y" + }, + { + "method": "GET", + "raw": "/x/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "root", + "params": {} + }, + "resolve": { + "id": "root", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": { + "id": "any", + "params": { + "rest": "x" + } + }, + "resolve": { + "id": "any", + "params": { + "rest": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/y", + "normalized": "/x/y", + "match": { + "id": "any", + "params": { + "rest": "x/y" + } + }, + "resolve": { + "id": "any", + "params": { + "rest": "x/y" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/", + "normalized": "/x", + "match": { + "id": "any", + "params": { + "rest": "x" + } + }, + "resolve": { + "id": "any", + "params": { + "rest": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H22-first-differing-segment", + "note": "ranking is decided at the first segment whose kind differs", + "declarations": [ + { + "id": "paramStatic", + "method": "GET", + "pattern": "/a/:x/c", + "transport": "buffer" + }, + { + "id": "staticParam", + "method": "GET", + "pattern": "/a/b/:y", + "transport": "buffer" + }, + { + "id": "paramConstrained", + "method": "GET", + "pattern": "/a/:x/:y(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/b/c" + }, + { + "method": "GET", + "raw": "/a/z/c" + }, + { + "method": "GET", + "raw": "/a/z/5" + }, + { + "method": "GET", + "raw": "/a/b/5" + }, + { + "method": "GET", + "raw": "/a/z/q" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/b/c", + "normalized": "/a/b/c", + "match": { + "id": "staticParam", + "params": { + "y": "c" + } + }, + "resolve": { + "id": "staticParam", + "params": { + "y": "c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/z/c", + "normalized": "/a/z/c", + "match": { + "id": "paramStatic", + "params": { + "x": "z" + } + }, + "resolve": { + "id": "paramStatic", + "params": { + "x": "z" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/z/5", + "normalized": "/a/z/5", + "match": { + "id": "paramConstrained", + "params": { + "x": "z", + "y": "5" + } + }, + "resolve": { + "id": "paramConstrained", + "params": { + "x": "z", + "y": "5" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/5", + "normalized": "/a/b/5", + "match": { + "id": "staticParam", + "params": { + "y": "5" + } + }, + "resolve": { + "id": "staticParam", + "params": { + "y": "5" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/z/q", + "normalized": "/a/z/q", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "H23-per-position-decode", + "note": "a decoded value is the same for every candidate the scan reaches", + "declarations": [ + { + "id": "zzz", + "method": "GET", + "pattern": "/a/:x/zzz", + "transport": "buffer" + }, + { + "id": "b", + "method": "GET", + "pattern": "/a/:y/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/a%20b/b" + }, + { + "method": "GET", + "raw": "/a/a%20b/zzz" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/a%20b/b", + "normalized": "/a/a%20b/b", + "match": { + "id": "b", + "params": { + "y": "a b" + } + }, + "resolve": { + "id": "b", + "params": { + "y": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/a%20b/zzz", + "normalized": "/a/a%20b/zzz", + "match": { + "id": "zzz", + "params": { + "x": "a b" + } + }, + "resolve": { + "id": "zzz", + "params": { + "x": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "H24-constrained-catch-all", + "note": "two catch-alls ranked by the segments before them", + "declarations": [ + { + "id": "named", + "method": "GET", + "pattern": "/v/:name/:rest*", + "transport": "buffer" + }, + { + "id": "versioned", + "method": "GET", + "pattern": "/v/:ver(\\d+)/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/v/1/x" + }, + { + "method": "GET", + "raw": "/v/a/x" + }, + { + "method": "GET", + "raw": "/v/1" + }, + { + "method": "GET", + "raw": "/v" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/v/1/x", + "normalized": "/v/1/x", + "match": { + "id": "versioned", + "params": { + "ver": "1", + "rest": "x" + } + }, + "resolve": { + "id": "versioned", + "params": { + "ver": "1", + "rest": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/v/a/x", + "normalized": "/v/a/x", + "match": { + "id": "named", + "params": { + "name": "a", + "rest": "x" + } + }, + "resolve": { + "id": "named", + "params": { + "name": "a", + "rest": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/v/1", + "normalized": "/v/1", + "match": { + "id": "versioned", + "params": { + "ver": "1", + "rest": "" + } + }, + "resolve": { + "id": "versioned", + "params": { + "ver": "1", + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/v", + "normalized": "/v", + "match": null, + "resolve": null, + "allow": [] + } + ] + } + ] +} diff --git a/test/router-parity/frozen/matcher-owner.json b/test/router-parity/frozen/matcher-owner.json new file mode 100644 index 0000000..997806c --- /dev/null +++ b/test/router-parity/frozen/matcher-owner.json @@ -0,0 +1,1190 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "id": "O01-backtrack", + "note": "a static branch that fails one level down must fall back to a sibling param branch", + "declarations": [ + { + "id": "static", + "method": "GET", + "pattern": "/a/b/c", + "transport": "buffer" + }, + { + "id": "param", + "method": "GET", + "pattern": "/a/:x/d", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/b/d" + }, + { + "method": "GET", + "raw": "/a/b/c" + }, + { + "method": "GET", + "raw": "/a/z/d" + }, + { + "method": "GET", + "raw": "/a/b/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/b/d", + "normalized": "/a/b/d", + "match": { + "id": "param", + "params": { + "x": "b" + } + }, + "resolve": { + "id": "param", + "params": { + "x": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/c", + "normalized": "/a/b/c", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/z/d", + "normalized": "/a/z/d", + "match": { + "id": "param", + "params": { + "x": "z" + } + }, + "resolve": { + "id": "param", + "params": { + "x": "z" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/x", + "normalized": "/a/b/x", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O02-backtrack-deep", + "note": "the static branch fails at depth 5 (and a param branch at depth 3), after walking four or two levels", + "declarations": [ + { + "id": "static", + "method": "GET", + "pattern": "/p/q/r/s/t", + "transport": "buffer" + }, + { + "id": "paramDepth2", + "method": "GET", + "pattern": "/p/:x/r/s/u", + "transport": "buffer" + }, + { + "id": "paramDepth3", + "method": "GET", + "pattern": "/p/q/:y/s/v", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/p/q/r/s/u" + }, + { + "method": "GET", + "raw": "/p/q/r/s/t" + }, + { + "method": "GET", + "raw": "/p/z/r/s/u" + }, + { + "method": "GET", + "raw": "/p/q/r/s/v" + }, + { + "method": "GET", + "raw": "/p/q/z/s/v" + }, + { + "method": "GET", + "raw": "/p/q/r/s/w" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/p/q/r/s/u", + "normalized": "/p/q/r/s/u", + "match": { + "id": "paramDepth2", + "params": { + "x": "q" + } + }, + "resolve": { + "id": "paramDepth2", + "params": { + "x": "q" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/r/s/t", + "normalized": "/p/q/r/s/t", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/z/r/s/u", + "normalized": "/p/z/r/s/u", + "match": { + "id": "paramDepth2", + "params": { + "x": "z" + } + }, + "resolve": { + "id": "paramDepth2", + "params": { + "x": "z" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/r/s/v", + "normalized": "/p/q/r/s/v", + "match": { + "id": "paramDepth3", + "params": { + "y": "r" + } + }, + "resolve": { + "id": "paramDepth3", + "params": { + "y": "r" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/z/s/v", + "normalized": "/p/q/z/s/v", + "match": { + "id": "paramDepth3", + "params": { + "y": "z" + } + }, + "resolve": { + "id": "paramDepth3", + "params": { + "y": "z" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/r/s/w", + "normalized": "/p/q/r/s/w", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O03-backtrack-constrained", + "note": "the fallback branch is a constrained param", + "declarations": [ + { + "id": "static", + "method": "GET", + "pattern": "/k/1/c", + "transport": "buffer" + }, + { + "id": "digits", + "method": "GET", + "pattern": "/k/:n(\\d+)/d", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/k/1/d" + }, + { + "method": "GET", + "raw": "/k/1/c" + }, + { + "method": "GET", + "raw": "/k/2/d" + }, + { + "method": "GET", + "raw": "/k/x/d" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/k/1/d", + "normalized": "/k/1/d", + "match": { + "id": "digits", + "params": { + "n": "1" + } + }, + "resolve": { + "id": "digits", + "params": { + "n": "1" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/k/1/c", + "normalized": "/k/1/c", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/k/2/d", + "normalized": "/k/2/d", + "match": { + "id": "digits", + "params": { + "n": "2" + } + }, + "resolve": { + "id": "digits", + "params": { + "n": "2" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/k/x/d", + "normalized": "/k/x/d", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O04-cross-pattern-allow", + "note": "Allow is the union of methods across different patterns matching the same path", + "declarations": [ + { + "id": "getParam", + "method": "GET", + "pattern": "/a/:id", + "transport": "buffer" + }, + { + "id": "postStatic", + "method": "POST", + "pattern": "/a/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a/b" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "HEAD", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "/a/b" + }, + { + "method": "POST", + "raw": "/a/x" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": { + "id": "getParam", + "params": { + "id": "b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "getParam", + "params": { + "id": "b" + } + }, + "resolve": { + "id": "getParam", + "params": { + "id": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "O05-cross-pattern-allow-catch-all", + "note": "the same, with a catch-all contributing a method", + "declarations": [ + { + "id": "getParam", + "method": "GET", + "pattern": "/a/:id", + "transport": "buffer" + }, + { + "id": "postStatic", + "method": "POST", + "pattern": "/a/b", + "transport": "buffer" + }, + { + "id": "deleteRest", + "method": "DELETE", + "pattern": "/a/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a/b" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "HEAD", + "raw": "/a/b" + }, + { + "method": "PUT", + "raw": "/a/x/y" + }, + { + "method": "DELETE", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": { + "id": "getParam", + "params": { + "id": "b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x/y", + "normalized": "/a/x/y", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "deleteRest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "deleteRest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "O06-encoded-slash-plain", + "note": "an encoded slash inside one segment, plain param", + "declarations": [ + { + "id": "userId", + "method": "GET", + "pattern": "/users/:id", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/users/a%2Fb" + }, + { + "method": "GET", + "raw": "/users/a%2fb" + }, + { + "method": "GET", + "raw": "/users/%2F" + }, + { + "method": "GET", + "raw": "/users/a/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/users/a%2Fb", + "normalized": "/users/a%2Fb", + "match": { + "id": "userId", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/a%2fb", + "normalized": "/users/a%2fb", + "match": { + "id": "userId", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/%2F", + "normalized": "/users/%2F", + "match": { + "id": "userId", + "params": { + "id": "/" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "/" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/a/b", + "normalized": "/users/a/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O07-encoded-slash-constrained", + "note": "an encoded slash against a word constraint and a non-space constraint (a / cannot appear inside a constraint: the pattern splits there)", + "declarations": [ + { + "id": "word", + "method": "GET", + "pattern": "/c/:id(\\w+)", + "transport": "buffer" + }, + { + "id": "nonSpace", + "method": "GET", + "pattern": "/d/:id(\\S+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/a%2Fb" + }, + { + "method": "GET", + "raw": "/c/ab" + }, + { + "method": "GET", + "raw": "/d/a%2Fb" + }, + { + "method": "GET", + "raw": "/d/a%2fb" + }, + { + "method": "GET", + "raw": "/d/%2F" + }, + { + "method": "GET", + "raw": "/d/a/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/a%2Fb", + "normalized": "/c/a%2Fb", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/ab", + "normalized": "/c/ab", + "match": { + "id": "word", + "params": { + "id": "ab" + } + }, + "resolve": { + "id": "word", + "params": { + "id": "ab" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/a%2Fb", + "normalized": "/d/a%2Fb", + "match": { + "id": "nonSpace", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "nonSpace", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/a%2fb", + "normalized": "/d/a%2fb", + "match": { + "id": "nonSpace", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "nonSpace", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/%2F", + "normalized": "/d/%2F", + "match": { + "id": "nonSpace", + "params": { + "id": "/" + } + }, + "resolve": { + "id": "nonSpace", + "params": { + "id": "/" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/a/b", + "normalized": "/d/a/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O08-zero-segment-catch-all", + "note": "a catch-all with no exact sibling route", + "declarations": [ + { + "id": "rest", + "method": "GET", + "pattern": "/files/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/files" + }, + { + "method": "GET", + "raw": "/files/" + }, + { + "method": "GET", + "raw": "/files/a" + }, + { + "method": "GET", + "raw": "/filesx" + }, + { + "method": "HEAD", + "raw": "/files" + }, + { + "method": "OPTIONS", + "raw": "/files" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/files", + "normalized": "/files", + "match": { + "id": "rest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/", + "normalized": "/files", + "match": { + "id": "rest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/a", + "normalized": "/files/a", + "match": { + "id": "rest", + "params": { + "rest": "a" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/filesx", + "normalized": "/filesx", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/files", + "normalized": "/files", + "match": null, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/files", + "normalized": "/files", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "O09-root-catch-all", + "note": "a root catch-all alone", + "declarations": [ + { + "id": "rest", + "method": "GET", + "pattern": "/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/a/b/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "rest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "rest", + "params": { + "rest": "a" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/", + "normalized": "/a/b", + "match": { + "id": "rest", + "params": { + "rest": "a/b" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + } + ] +} diff --git a/test/router-parity/frozen/matcher-ws.json b/test/router-parity/frozen/matcher-ws.json new file mode 100644 index 0000000..6e513ba --- /dev/null +++ b/test/router-parity/frozen/matcher-ws.json @@ -0,0 +1,214 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "id": "W01-overlap", + "declarations": [ + { + "id": "param", + "pattern": "/ws/:id" + }, + { + "id": "static", + "pattern": "/ws/static" + }, + { + "id": "rest", + "pattern": "/ws/:rest*" + } + ], + "outcomes": [ + { + "path": "/ws/static", + "route": { + "id": "param", + "params": { + "id": "static" + } + } + }, + { + "path": "/ws/x", + "route": { + "id": "param", + "params": { + "id": "x" + } + } + }, + { + "path": "/ws/a%20b", + "route": { + "id": "param", + "params": { + "id": "a b" + } + } + }, + { + "path": "/ws", + "route": { + "id": "rest", + "params": { + "rest": "" + } + } + }, + { + "path": "/ws/x/y", + "route": { + "id": "rest", + "params": { + "rest": "x/y" + } + } + }, + { + "path": "/w", + "route": null + }, + { + "path": "/w/a%2Fb/c", + "route": null + }, + { + "path": "/nope", + "route": null + } + ] + }, + { + "id": "W02-overlap-reversed", + "declarations": [ + { + "id": "rest", + "pattern": "/ws/:rest*" + }, + { + "id": "static", + "pattern": "/ws/static" + }, + { + "id": "param", + "pattern": "/ws/:id" + } + ], + "outcomes": [ + { + "path": "/ws/static", + "route": { + "id": "rest", + "params": { + "rest": "static" + } + } + }, + { + "path": "/ws/x", + "route": { + "id": "rest", + "params": { + "rest": "x" + } + } + }, + { + "path": "/ws/a%20b", + "route": { + "id": "rest", + "params": { + "rest": "a b" + } + } + }, + { + "path": "/ws", + "route": { + "id": "rest", + "params": { + "rest": "" + } + } + }, + { + "path": "/ws/x/y", + "route": { + "id": "rest", + "params": { + "rest": "x/y" + } + } + }, + { + "path": "/w", + "route": null + }, + { + "path": "/w/a%2Fb/c", + "route": null + }, + { + "path": "/nope", + "route": null + } + ] + }, + { + "id": "W03-catch-all-first", + "declarations": [ + { + "id": "rest", + "pattern": "/w/:rest*" + }, + { + "id": "exact", + "pattern": "/w" + } + ], + "outcomes": [ + { + "path": "/ws/static", + "route": null + }, + { + "path": "/ws/x", + "route": null + }, + { + "path": "/ws/a%20b", + "route": null + }, + { + "path": "/ws", + "route": null + }, + { + "path": "/ws/x/y", + "route": null + }, + { + "path": "/w", + "route": { + "id": "rest", + "params": { + "rest": "" + } + } + }, + { + "path": "/w/a%2Fb/c", + "route": { + "id": "rest", + "params": { + "rest": "a/b/c" + } + } + }, + { + "path": "/nope", + "route": null + } + ] + } + ] +} diff --git a/test/router-parity/frozen/owner-app-allow.json b/test/router-parity/frozen/owner-app-allow.json new file mode 100644 index 0000000..2b5319d --- /dev/null +++ b/test/router-parity/frozen/owner-app-allow.json @@ -0,0 +1,165 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "adapter": "fetch", + "method": "PUT", + "path": "/ca/b", + "status": 405, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/ca/b", + "status": 204, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/ca/x", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/ca/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/ca/x/y", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/cb/b", + "status": 405, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/cb/b", + "status": 204, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/cb/x", + "status": 405, + "allow": "GET, HEAD, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/cb/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/cb/x/y", + "status": 405, + "allow": "DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/ca/b", + "status": 405, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/ca/b", + "status": 204, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/ca/x", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/ca/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/ca/x/y", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/cb/b", + "status": 405, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/cb/b", + "status": 204, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/cb/x", + "status": 405, + "allow": "GET, HEAD, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/cb/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/cb/x/y", + "status": 405, + "allow": "DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + } + ] +} diff --git a/test/router-parity/frozen/owner-mesh-allow.json b/test/router-parity/frozen/owner-mesh-allow.json new file mode 100644 index 0000000..34557ac --- /dev/null +++ b/test/router-parity/frozen/owner-mesh-allow.json @@ -0,0 +1,531 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "adapter": "fetch", + "method": "PUT", + "path": "/api/dup/ping", + "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\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/api/dup/ping", + "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": "" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/api/dup/ping", + "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": "" + }, + { + "adapter": "fetch", + "method": "GET", + "path": "/api/dup/ping", + "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": "{\"from\":\"teacup\",\"route\":\"GET /api/dup/ping\"}" + }, + { + "adapter": "fetch", + "method": "POST", + "path": "/api/dup/ping", + "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": "{\"from\":\"teapot\",\"route\":\"POST /api/dup/ping\"}" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/api/v/b", + "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\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/api/v/b", + "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": "" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/api/v/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": "" + }, + { + "adapter": "fetch", + "method": "GET", + "path": "/api/v/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": "{\"from\":\"teacup\",\"route\":\"GET /api/v/b\"}" + }, + { + "adapter": "fetch", + "method": "POST", + "path": "/api/v/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": "{\"from\":\"teapot\",\"route\":\"POST /api/v/:id\"}" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/api/v/c", + "status": 405, + "headers": { + "allow": "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\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/api/v/c", + "status": 204, + "headers": { + "allow": "POST, OPTIONS", + "referrer-policy": "no-referrer", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/api/v/c", + "status": 405, + "headers": { + "allow": "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": "" + }, + { + "adapter": "fetch", + "method": "GET", + "path": "/api/v/c", + "status": 405, + "headers": { + "allow": "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\"}" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/api/x", + "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": "" + }, + { + "adapter": "fetch", + "method": "GET", + "path": "/api/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": "{\"from\":\"teapot\",\"route\":\"GET /api/x\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/api/x", + "status": 204, + "headers": { + "allow": "GET, HEAD, OPTIONS", + "referrer-policy": "no-referrer", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/api/x", + "status": 405, + "headers": { + "allow": "GET, HEAD, 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\"}" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/api/dup/ping", + "status": 405, + "headers": { + "allow": "GET, HEAD, POST, OPTIONS", + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/api/dup/ping", + "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": "" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/api/dup/ping", + "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": "" + }, + { + "adapter": "node", + "method": "GET", + "path": "/api/dup/ping", + "status": 200, + "headers": { + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"from\":\"teacup\",\"route\":\"GET /api/dup/ping\"}" + }, + { + "adapter": "node", + "method": "POST", + "path": "/api/dup/ping", + "status": 200, + "headers": { + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"from\":\"teapot\",\"route\":\"POST /api/dup/ping\"}" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/api/v/b", + "status": 405, + "headers": { + "allow": "GET, HEAD, POST, OPTIONS", + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/api/v/b", + "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": "" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/api/v/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": "" + }, + { + "adapter": "node", + "method": "GET", + "path": "/api/v/b", + "status": 200, + "headers": { + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"from\":\"teacup\",\"route\":\"GET /api/v/b\"}" + }, + { + "adapter": "node", + "method": "POST", + "path": "/api/v/b", + "status": 200, + "headers": { + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"from\":\"teapot\",\"route\":\"POST /api/v/:id\"}" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/api/v/c", + "status": 405, + "headers": { + "allow": "POST, OPTIONS", + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/api/v/c", + "status": 204, + "headers": { + "allow": "POST, OPTIONS", + "referrer-policy": "no-referrer", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/api/v/c", + "status": 405, + "headers": { + "allow": "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": "" + }, + { + "adapter": "node", + "method": "GET", + "path": "/api/v/c", + "status": 405, + "headers": { + "allow": "POST, OPTIONS", + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/api/x", + "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": "" + }, + { + "adapter": "node", + "method": "GET", + "path": "/api/x", + "status": 200, + "headers": { + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"from\":\"teapot\",\"route\":\"GET /api/x\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/api/x", + "status": 204, + "headers": { + "allow": "GET, HEAD, OPTIONS", + "referrer-policy": "no-referrer", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/api/x", + "status": 405, + "headers": { + "allow": "GET, HEAD, OPTIONS", + "content-type": "application/json", + "referrer-policy": "no-referrer", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-dns-prefetch-control": "off", + "x-frame-options": "SAMEORIGIN" + }, + "body": "{\"error\":\"Method Not Allowed\"}" + } + ] +} diff --git a/test/router-parity/frozen/owner-mesh-lifetime.json b/test/router-parity/frozen/owner-mesh-lifetime.json new file mode 100644 index 0000000..5eecf90 --- /dev/null +++ b/test/router-parity/frozen/owner-mesh-lifetime.json @@ -0,0 +1,133 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "phase": "A1 teapot up at boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 200, + "allow": null, + "body": "{\"from\":\"teapot\"}" + }, + { + "phase": "A1 teapot up at boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "phase": "A1 teapot up at boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "A1 teapot up at boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 503, + "allow": null, + "body": "{\"error\":\"mesh link to /__mesh__/control is down\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + } + ] +} diff --git a/test/router-parity/frozen/ws-app-upgrade.json b/test/router-parity/frozen/ws-app-upgrade.json new file mode 100644 index 0000000..4b5c521 --- /dev/null +++ b/test/router-parity/frozen/ws-app-upgrade.json @@ -0,0 +1,151 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "path": "/live/lobby", + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "closes": [ + {} + ] + }, + { + "path": "/live/kitchen", + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "kitchen" + } + } + ], + "closes": [ + {} + ] + }, + { + "path": "/live/lobby/", + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "closes": [ + {} + ] + }, + { + "path": "/live/x/../lobby", + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "closes": [ + {} + ] + }, + { + "path": "/live/a%20b", + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "a b" + } + } + ], + "closes": [ + {} + ] + }, + { + "path": "/live/lobby?x=1", + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "closes": [ + {} + ] + }, + { + "path": "/live/%E0%A4%A", + "sent": [], + "closes": [ + { + "code": 1008, + "reason": "invalid request path" + } + ] + }, + { + "path": "/live//lobby", + "sent": [], + "closes": [ + { + "code": 1008, + "reason": "invalid request path" + } + ] + }, + { + "path": "/plain", + "sent": [], + "closes": [ + { + "code": 1008, + "reason": "no matching ws route" + } + ] + }, + { + "path": "/nope", + "sent": [], + "closes": [ + { + "code": 1008, + "reason": "no matching ws route" + } + ] + }, + { + "path": "/feed", + "sent": [ + { + "id": "feed", + "params": {} + } + ], + "closes": [ + {} + ] + }, + { + "path": "/__mesh__/control", + "sent": [], + "closes": [ + { + "code": 1008, + "reason": "mesh control channel not enabled: this app exports nothing, or has no mesh.secret" + } + ] + } + ] +} diff --git a/test/router-parity/frozen/ws-http-same-path.json b/test/router-parity/frozen/ws-http-same-path.json new file mode 100644 index 0000000..4e61ae1 --- /dev/null +++ b/test/router-parity/frozen/ws-http-same-path.json @@ -0,0 +1,40 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "method": "GET", + "path": "/live/lobby", + "status": 405, + "allow": "POST, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "method": "POST", + "path": "/live/lobby", + "status": 200, + "allow": null, + "body": "{\"id\":\"httpLobby\"}" + }, + { + "method": "OPTIONS", + "path": "/live/lobby", + "status": 204, + "allow": "POST, OPTIONS", + "body": "" + }, + { + "method": "GET", + "path": "/live/kitchen", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "method": "GET", + "path": "/feed", + "status": 200, + "allow": null, + "body": "{\"id\":\"feed\",\"params\":{}}\n" + } + ] +} diff --git a/test/router-parity/frozen/ws-node-upgrade.json b/test/router-parity/frozen/ws-node-upgrade.json new file mode 100644 index 0000000..df82268 --- /dev/null +++ b/test/router-parity/frozen/ws-node-upgrade.json @@ -0,0 +1,149 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "path": "/live/lobby", + "status": 101, + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "close": { + "code": 1005, + "reason": "" + } + }, + { + "path": "/live/kitchen", + "status": 101, + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "kitchen" + } + } + ], + "close": { + "code": 1005, + "reason": "" + } + }, + { + "path": "/live/lobby/", + "status": 101, + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "close": { + "code": 1005, + "reason": "" + } + }, + { + "path": "/live/x/../lobby", + "status": 101, + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "close": { + "code": 1005, + "reason": "" + } + }, + { + "path": "/live/a%20b", + "status": 101, + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "a b" + } + } + ], + "close": { + "code": 1005, + "reason": "" + } + }, + { + "path": "/live/lobby?x=1", + "status": 101, + "sent": [ + { + "id": "liveRoom", + "params": { + "room": "lobby" + } + } + ], + "close": { + "code": 1005, + "reason": "" + } + }, + { + "path": "/live/%E0%A4%A", + "status": 400, + "sent": [] + }, + { + "path": "/live//lobby", + "status": 400, + "sent": [] + }, + { + "path": "/plain", + "status": 404, + "sent": [] + }, + { + "path": "/nope", + "status": 404, + "sent": [] + }, + { + "path": "/feed", + "status": 101, + "sent": [ + { + "id": "feed", + "params": {} + } + ], + "close": { + "code": 1005, + "reason": "" + } + }, + { + "path": "/__mesh__/control", + "status": 101, + "sent": [ + { + "id": "reserved", + "params": {} + } + ], + "close": { + "code": 1005, + "reason": "" + } + } + ] +} diff --git a/test/router-parity/generator.ts b/test/router-parity/generator.ts new file mode 100644 index 0000000..bb67e91 --- /dev/null +++ b/test/router-parity/generator.ts @@ -0,0 +1,211 @@ +/** + * Fixed-seed route/path generator for the differential corpus. + * + * Its output is versioned with the fixture: `frozen/matcher-generated.json` stores the seed, the + * rules below and every generated declaration and request. The test regenerates from the seed and + * requires the result to equal the stored inputs, so a change to this file cannot quietly move the + * baseline — it fails until someone deliberately starts a new generator version. + * + * Do not edit GENERATOR_V1. A new generator is a new version with its own frozen file. + */ +import { compilePattern } from './oracle'; +import type { Declaration, Request, Scenario, Transport } from './matcher'; + +export const GENERATOR_SEED = 10908; +export const GENERATOR_VERSION = 'router-parity-gen-v1'; + +export const GENERATOR_RULES = [ + 'PRNG: mulberry32(seed); every choice below draws from it in program order.', + '40 scenarios; each has 2-10 declarations and 12 requests.', + 'Declaration: 0-3 segments, each static (a|b|c|x, p=0.5), plain param (p=0.25) or constrained param (p=0.25) ' + + 'using one of \\d+ | [a-c]+ | [0-9a-f]{2}; then a final catch-all with p=0.2. Param names are p.', + 'Declaration method from GET x3, POST, PUT, DELETE, PATCH, HEAD, OPTIONS. A GET is buffer with p=0.7, else ' + + 'sse | ndjson | negotiate; every other method is buffer.', + 'Request path: p=0.6 instantiate a random declaration (static -> its literal, param -> value pool, catch-all -> ' + + '0-2 pool values), else 0-4 random pool segments. Value pool: a b c x 7 42 ff 0a a%20b caf%C3%A9 %34%32.', + 'Request decoration: trailing slash p=0.15, a dot segment (/./ or /q/../) inserted p=0.1, a repeated slash p=0.05.', + 'Request method from GET x2, HEAD, POST, PUT, DELETE, PATCH, OPTIONS.', + 'Unsupported patterns are never produced: every generated pattern must pass compilePattern.', +]; + +const STATICS = ['a', 'b', 'c', 'x']; +const CONSTRAINTS = ['\\d+', '[a-c]+', '[0-9a-f]{2}']; +const VALUES = ['a', 'b', 'c', 'x', '7', '42', 'ff', '0a', 'a%20b', 'caf%C3%A9', '%34%32']; +const DECL_METHODS = ['GET', 'GET', 'GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS']; +const STREAMING: Transport[] = ['sse', 'ndjson', 'negotiate']; +const REQUEST_METHODS = ['GET', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS']; + +type Rng = () => number; + +function mulberry32(seed: number): Rng { + let state = seed >>> 0; + return () => { + state = (state + 0x6d2b79f5) >>> 0; + let t = state; + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return ((t ^ (t >>> 14)) >>> 0) / 4294967296; + }; +} + +const pick = (rng: Rng, items: readonly T[]): T => items[Math.floor(rng() * items.length)]; +const int = (rng: Rng, min: number, max: number): number => min + Math.floor(rng() * (max - min + 1)); + +function patternSegment(rng: Rng, index: number): string { + const roll = rng(); + if (roll < 0.5) return pick(rng, STATICS); + if (roll < 0.75) return `:p${index}`; + return `:p${index}(${pick(rng, CONSTRAINTS)})`; +} + +function declaration(rng: Rng, id: string): Declaration { + const depth = int(rng, 0, 3); + const segments = Array.from({ length: depth }, (_, index) => patternSegment(rng, index)); + if (rng() < 0.2) segments.push(`:p${depth}*`); + + const method = pick(rng, DECL_METHODS); + const transport: Transport = method === 'GET' && rng() >= 0.7 ? pick(rng, STREAMING) : 'buffer'; + const pattern = `/${segments.join('/')}`; + compilePattern(pattern); // throws if a rule above ever produced an unsupported pattern + return { id, method, pattern, transport }; +} + +function instantiate(rng: Rng, decl: Declaration): string[] { + const segments: string[] = []; + + for (const segment of decl.pattern.split('/').slice(1)) { + if (!segment) continue; + if (segment.endsWith('*')) { + const count = int(rng, 0, 2); + for (let index = 0; index < count; index++) segments.push(pick(rng, VALUES)); + } else { + segments.push(segment.startsWith(':') ? pick(rng, VALUES) : segment); + } + } + + return segments; +} + +function decorate(rng: Rng, segments: string[]): string { + let path = `/${segments.join('/')}`; + if (rng() < 0.15 && path !== '/') path += '/'; + + if (rng() < 0.1) { + const at = int(rng, 0, segments.length); + const dots = rng() < 0.5 ? ['.'] : ['q', '..']; + const withDots = [...segments.slice(0, at), ...dots, ...segments.slice(at)]; + path = `/${withDots.join('/')}`; + } + + if (rng() < 0.05) path = path.replace('/', '//'); + return path; +} + +function request(rng: Rng, declarations: Declaration[]): Request { + const segments = + rng() < 0.6 + ? instantiate(rng, pick(rng, declarations)) + : Array.from({ length: int(rng, 0, 4) }, () => pick(rng, VALUES)); + return { method: pick(rng, REQUEST_METHODS), raw: decorate(rng, segments) }; +} + +export function generateScenarios(seed: number = GENERATOR_SEED): Scenario[] { + const rng = mulberry32(seed); + + return Array.from({ length: 40 }, (_, index): Scenario => { + const id = `G${String(index + 1).padStart(2, '0')}`; + const declarations = Array.from({ length: int(rng, 2, 10) }, (_, d) => declaration(rng, `${id}.d${d + 1}`)); + const requests = Array.from({ length: 12 }, () => request(rng, declarations)); + return { id, note: `generated by ${GENERATOR_VERSION}, seed ${seed}`, declarations, requests }; + }); +} + +/** + * Version 2: the same seed and helpers, plus rules that force shared prefixes, so a meaningful share + * of cases puts static, param, constrained and catch-all siblings under one prefix and makes the + * lookup leave a branch it has already walked into. Frozen in `frozen/matcher-generated-v2.json`; + * v1 above and its frozen file are unchanged. + */ +export const GENERATOR_V2_VERSION = 'router-parity-gen-v2'; + +export const GENERATOR_V2_RULES = [ + 'PRNG: mulberry32(seed), fresh for v2; every choice below draws from it in program order.', + '40 scenarios; each has a shared static prefix of 0-3 segments (a|b|c|x), so siblings sit at depth 1-4.', + 'Each scenario has 3-6 sibling declarations: prefix + one sibling segment + a tail. The first sibling segment is ' + + 'static, the second a plain or constrained param; the rest are static (p=0.35), plain (p=0.25), constrained ' + + '(p=0.25) or a final catch-all (p=0.15). Tails are 0-2 segments, static/plain/constrained, none after a catch-all.', + 'Then 0-3 unrelated declarations made by the v1 declaration rule.', + 'Methods and transports follow the v1 declaration rule.', + 'Requests (12): p=0.5 instantiate a sibling; p=0.25 cross two siblings (prefix and sibling segment of one, tail ' + + 'of another) to force a partial match; else prefix + 0-3 pool values. v1 decoration and request methods apply.', + 'Unsupported patterns are never produced: every generated pattern must pass compilePattern.', +]; + +function siblingSegment(rng: Rng, depth: number, index: number): string { + if (index === 0) return pick(rng, STATICS); + if (index === 1) return rng() < 0.5 ? `:p${depth}` : `:p${depth}(${pick(rng, CONSTRAINTS)})`; + const roll = rng(); + if (roll < 0.35) return pick(rng, STATICS); + if (roll < 0.6) return `:p${depth}`; + if (roll < 0.85) return `:p${depth}(${pick(rng, CONSTRAINTS)})`; + return `:p${depth}*`; +} + +function siblingDeclaration(rng: Rng, id: string, prefix: string[], index: number): Declaration { + const sibling = siblingSegment(rng, prefix.length, index); + const segments = [...prefix, sibling]; + if (!sibling.endsWith('*')) { + const tail = int(rng, 0, 2); + for (let t = 0; t < tail; t++) { + const depth = segments.length; + const roll = rng(); + segments.push( + roll < 0.5 ? pick(rng, STATICS) : roll < 0.75 ? `:p${depth}` : `:p${depth}(${pick(rng, CONSTRAINTS)})`, + ); + } + } + + const method = pick(rng, DECL_METHODS); + const transport: Transport = method === 'GET' && rng() >= 0.7 ? pick(rng, STREAMING) : 'buffer'; + const pattern = `/${segments.join('/')}`; + compilePattern(pattern); + return { id, method, pattern, transport }; +} + +function siblingRequest(rng: Rng, prefixLength: number, siblings: Declaration[]): Request { + const roll = rng(); + let segments: string[]; + + if (roll < 0.5) { + segments = instantiate(rng, pick(rng, siblings)); + } else if (roll < 0.75) { + const head = instantiate(rng, pick(rng, siblings)).slice(0, prefixLength + 1); + const tail = instantiate(rng, pick(rng, siblings)).slice(prefixLength + 1); + segments = [...head, ...tail]; + } else { + const prefix = instantiate(rng, siblings[0]).slice(0, prefixLength); + segments = [...prefix, ...Array.from({ length: int(rng, 0, 3) }, () => pick(rng, VALUES))]; + } + + return { method: pick(rng, REQUEST_METHODS), raw: decorate(rng, segments) }; +} + +export function generateScenariosV2(seed: number = GENERATOR_SEED): Scenario[] { + const rng = mulberry32(seed); + + return Array.from({ length: 40 }, (_, index): Scenario => { + const id = `S${String(index + 1).padStart(2, '0')}`; + const prefix = Array.from({ length: int(rng, 0, 3) }, () => pick(rng, STATICS)); + const siblings = Array.from({ length: int(rng, 3, 6) }, (_, s) => + siblingDeclaration(rng, `${id}.s${s + 1}`, prefix, s), + ); + const unrelated = Array.from({ length: int(rng, 0, 3) }, (_, u) => declaration(rng, `${id}.u${u + 1}`)); + const requests = Array.from({ length: 12 }, () => siblingRequest(rng, prefix.length, siblings)); + return { + id, + note: `generated by ${GENERATOR_V2_VERSION}, seed ${seed}, shared prefix /${prefix.join('/')}`, + declarations: [...siblings, ...unrelated], + requests, + }; + }); +} diff --git a/test/router-parity/introspection.test.ts b/test/router-parity/introspection.test.ts new file mode 100644 index 0000000..5102d7c --- /dev/null +++ b/test/router-parity/introspection.test.ts @@ -0,0 +1,227 @@ +/** + * Introspection goldens (ROUTER-CORPUS §3, CARD-09). `graph()`, `explain()` and `openapi()` read + * `routePlans` in declaration order and must never be derived from a lookup index. Compared as + * parsed structures with array order and key order held — see `expectFrozenEqual`. + */ +import 'reflect-metadata'; +import type { AddressInfo } from 'net'; +import { describe, it } from 'vitest'; +import { + createApp, + Provider, + Step, + Route, + Get, + Head, + Post, + Put, + Delete, + Options, + Sse, + Stream, + Ws, + Module, + needs, + param, + query, + body, +} from '../../src/index'; +import type { Logger } from '../../src/logger'; +import { errorOutcome } from './matcher'; +import { frozen, expectFrozenEqual } from './frozen'; + +const slugSchema = { + '~standard': { version: 1 as const, vendor: 'parity', validate: (v: unknown) => ({ value: v }) }, +}; + +@Provider({ provides: 'db' }) +class Db { + provide() { + return { db: {} }; + } +} + +@Step({ provides: 'user', needs: ['db'] }) +class Auth { + run() { + return { user: {} }; + } +} + +@Step({ provides: 'audit', needs: [] }) +class Audit { + run() { + return { audit: {} }; + } +} + +// Declaration order is deliberately not specificity order, and paths repeat across methods, so +// any traversal-ordered output would differ from this one. +@Route('/items') +class Items { + @Get('/:id/files/:path*') files(@param('path') _p: string) { + return {}; + } + @Get('/') list(@needs('user') _u: unknown) { + return []; + } + @Post('/') create(@body() _b: unknown, @needs('user') _u: unknown) { + return {}; + } + @Get('/:id(\\d+)') get(@param('id') _id: string, @query('expand') _e: string) { + return {}; + } + @Head('/:id(\\d+)') head() { + return {}; + } + @Options('/:id(\\d+)') options() { + return {}; + } + @Delete('/:id(\\d+)') remove(@needs('audit') _a: unknown) { + return {}; + } + @Put('/:slug([a-z0-9-]+)') upsert(@body(slugSchema) _b: unknown) { + return {}; + } + @Get('/search') search() { + return []; + } +} + +@Route('/') +class Streams { + @Sse('/events') events() { + return (async function* () {})(); + } + @Stream('/feed') feed() { + return (async function* () {})(); + } + @Ws('/live/:room') live(@needs('user') _u: unknown) { + return (async function* () {})(); + } +} + +@Module({ mountpoint: '/api', providers: [Db], steps: [Auth, Audit], controllers: [Items, Streams] }) +class IntrospectionModule {} + +const EXPLAINED = ['/api/items/:id(\\d+)', '/api/items', '/api/live/:room', '/api/items/:id/files/:path*']; +const NOT_DECLARED = ['/api/missing', '/api/items/42', '/api/items/']; + +function explainAll(explain: (pattern: string) => unknown) { + return [...EXPLAINED, ...NOT_DECLARED].map((pattern) => { + try { + return { pattern, explain: explain(pattern) }; + } catch (error) { + return { pattern, error: errorOutcome(error) }; + } + }); +} + +function capture() { + const app = createApp({ modules: [IntrospectionModule] }); + return { + graph: app.graph(), + explain: explainAll(app.explain), + openapi: app.openapi({ title: 'Parity', version: '1' }), + }; +} + +// ── mesh ──────────────────────────────────────────────────────────────────────────────────────── + +const SECRET = 'parity-secret'; + +@Step({ provides: 'config', needs: [], export: true }) +class Config { + run() { + return { config: {} }; + } +} + +@Route('/remote') +class RemoteCtl { + @Get('/ping', { export: true }) ping() { + return { from: 'teapot' }; + } +} +@Module({ mountpoint: '/api', steps: [Config], controllers: [RemoteCtl] }) +class TeapotModule {} + +@Route('/local') +class LocalCtl { + @Get('/who') who(@needs('config') _c: unknown) { + return { from: 'teacup' }; + } + @Get('/:id') byId() { + return {}; + } +} +@Module({ mountpoint: '/api', controllers: [LocalCtl] }) +class TeacupModule {} + +const quiet: Logger = { debug: () => {}, info: () => {}, warn: () => {}, error: () => {} }; + +function attempt(fn: () => T): { value: T } | { error: ReturnType } { + try { + return { value: fn() }; + } catch (error) { + return { error: errorOutcome(error) }; + } +} + +async function captureMesh() { + const teapot = createApp({ modules: [TeapotModule], experimental: true, mesh: { secret: SECRET } }); + const server = await teapot.listen(0); + const url = `ws://127.0.0.1:${(server.address() as AddressInfo).port}/__mesh__/control`; + const anonymize = (value: unknown) => JSON.parse(JSON.stringify(value).split(url).join('')); + const teacup = createApp({ + modules: [TeacupModule], + experimental: true, + logger: quiet, + mesh: { teapots: [{ url, secret: SECRET }] }, + }); + + try { + const before = { + graph: attempt(() => teacup.graph()), + explain: attempt(() => teacup.explain('/api/local/who')), + openapi: attempt(() => teacup.openapi({ title: 'Parity', version: '1' })), + }; + await teacup.ready(); + const after = { + graph: teacup.graph(), + explain: explainAll(teacup.explain).filter(({ pattern }) => pattern === '/api/missing'), + explainLocal: teacup.explain('/api/local/who'), + explainRemote: attempt(() => teacup.explain('/api/remote/ping')), + openapi: teacup.openapi({ title: 'Parity', version: '1' }), + }; + // Remote routes are reachable for lookup even though they are absent from routePlans. + const res = await teacup.fetch(new Request('http://parity.test/api/remote/ping')); + const lookup = { path: '/api/remote/ping', status: res.status, body: await res.text() }; + return anonymize({ before, after, lookup }); + } finally { + await teacup.close(); + await teapot.close(); + } +} + +describe('router parity: introspection goldens', () => { + it('graph() equals the golden, routes in declaration order', async () => { + const expected = await frozen('golden-graph', () => capture().graph); + expectFrozenEqual(capture().graph, expected, 'graph()'); + }); + + it('explain() for declared patterns and the `no route:` error equals the golden', async () => { + const expected = await frozen('golden-explain', () => capture().explain); + expectFrozenEqual(capture().explain, expected, 'explain()'); + }); + + it("openapi({ title: 'Parity', version: '1' }) equals the golden", async () => { + const expected = await frozen('golden-openapi', () => capture().openapi); + expectFrozenEqual(capture().openapi, expected, 'openapi()'); + }); + + it('a mesh teacup before and after ready() equals the golden; remote routes stay out of routePlans', async () => { + const expected = await frozen('golden-mesh', captureMesh); + expectFrozenEqual(await captureMesh(), expected, 'mesh introspection'); + }, 30_000); +}); diff --git a/test/router-parity/manifest.json b/test/router-parity/manifest.json new file mode 100644 index 0000000..ea2d19b --- /dev/null +++ b/test/router-parity/manifest.json @@ -0,0 +1,155 @@ +{ + "purpose": "Existing tests retained unchanged as the radix-router compatibility baseline (FPRD-001 CARD-08, ROUTER-CORPUS §1, #109).", + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "corpusRevision": "42376c6693c7e15fadbcfb544172cc571fcacef0", + "verification": { + "date": "2026-10-10", + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "command": "npx vitest run --reporter=json; npm run test:deno; npm run test:bun; npm run test:edge", + "result": "Every file and every named test exists at the pinned revision and passes. No test was renamed or removed between 42376c6 and ed47836; src/http/router.ts is byte-identical between the two.", + "renamed": [] + }, + "retained": [ + { + "surface": "Pattern grammar, normalization, matching, Allow, HEAD", + "file": "test/router.test.ts", + "scope": "file" + }, + { + "surface": "HTTP adapter", + "file": "test/http.test.ts", + "scope": "tests", + "tests": [ + "matches a static + :param route and extracts params", + "http streaming > routes by method (non-GET no longer falls through)" + ] + }, + { + "surface": "Fetch adapter", + "file": "test/fetch.test.ts", + "scope": "tests", + "tests": [ + "app.fetch > handles GET and returns JSON 200", + "app.fetch > 404s an unknown route", + "app.fetch on a mesh app > serves without ever calling listen()", + "app.fetch on a mesh app > does not re-boot when listen() follows a fetch" + ] + }, + { + "surface": "App declarations and introspection", + "file": "test/app.test.ts", + "scope": "tests", + "tests": [ + "app.graph / explain > graph() returns nodes (with origin/needs/provides) and routes with their sliced chain", + "app.graph / explain > explain() returns the rich chain with origin and a handler entry", + "route table validation > rejects routes with the same method and effective pattern", + "route table validation > allows the same effective pattern under different methods", + "devGraph endpoint > serves /__graph__ as HTML when devGraph:true", + "devGraph endpoint > does NOT mount /__graph__ without devGraph", + "devGraph endpoint > serves /__graph__ and /__openapi__ over app.fetch too (runtime-agnostic dev tools)", + "app streaming wiring > serves a @Ws route receiving @inbound and returning a channel" + ] + }, + { + "surface": "OpenAPI", + "file": "test/openapi.test.ts", + "scope": "file" + }, + { + "surface": "WebSocket selection", + "file": "test/ws-core.test.ts", + "scope": "tests", + "tests": ["runWsConnection (neutral core) > matchWsRoute finds a pattern and captures params"] + }, + { + "surface": "Node WebSocket upgrade", + "file": "test/ws.test.ts", + "scope": "tests", + "tests": [ + "ws upgrade > echoes inbound to outbound and aborts on close", + "ws upgrade > closes with a 4000+status code when the WS open() throws an HttpError" + ] + }, + { + "surface": "Mesh route splicing", + "file": "test/mesh/integration.test.ts", + "scope": "tests", + "tests": [ + "mesh skeleton integration > teapot still serves its own local route (regression)", + "mesh skeleton integration > refuses to boot when two teapots export the same route, naming both", + "mesh skeleton integration > refuses ambiguous remote routes that differ only by parameter name", + "mesh skeleton integration > accepts the same route from a single teapot (regression: no false positive)", + "mesh skeleton integration > gives a local route precedence over a remote one, and says so", + "mesh skeleton integration > does not warn when a remote route has no local twin" + ] + } + ], + "runtimeSmoke": [ + { + "file": "test/deno/ws.test.ts", + "runner": "npm run test:deno", + "tests": [ + "serveDeno: HTTP + WebSocket round-trip through the graph", + "serveDeno: a malformed upgrade path closes 1008 and the server keeps serving" + ] + }, + { + "file": "test/bun/ws.test.ts", + "runner": "npm run test:bun", + "tests": [ + "serveBun: HTTP + WebSocket round-trip", + "serveBun: a malformed upgrade path closes 1008 and the server keeps serving" + ] + }, + { + "file": "test/deno/mesh.test.ts", + "runner": "npm run test:deno", + "tests": [ + "mesh on Deno: teacup resolves a Deno teapot through the graph", + "mesh on Deno: a teapot refuses a bad secret over its control channel" + ] + }, + { + "file": "test/bun/mesh.test.ts", + "runner": "npm run test:bun", + "tests": [ + "mesh on Bun: teacup resolves a Bun teapot through the graph", + "mesh on Bun: a teapot refuses a bad secret over its control channel" + ] + }, + { + "file": "test/edge/run.ts", + "runner": "npm run test:edge", + "tests": [] + } + ], + "supplementary": { + "note": "Not in ROUTER-CORPUS §1. Proposed because #117 (merged after the corpus was written) moved WS upgrade paths through normalizeRequestPath and added the reserved-path refusal on app.upgrade. Pending D5 approval; they run in npm test either way.", + "retained": [ + { + "surface": "Node upgrade path normalization and rejection (#104)", + "file": "test/ws-upgrade-reject.test.ts", + "scope": "file" + }, + { + "surface": "Reserved mesh control path ahead of WS routes (Node)", + "file": "test/mesh/control-upgrade.test.ts", + "scope": "file" + }, + { + "surface": "Reserved mesh control path over app.upgrade", + "file": "test/mesh/fetch-boot.test.ts", + "scope": "tests", + "tests": [ + "mesh control over app.upgrade (no listen) > serves the handshake to a peer that never touched a Node server", + "mesh control over app.upgrade (no listen) > refuses the reserved path explicitly on an app that exports nothing" + ] + } + ] + }, + "frozenFixtures": { + "dir": "test/router-parity/frozen", + "oracle": "test/router-parity/oracle.ts", + "readme": "test/router-parity/README.md" + } +} diff --git a/test/router-parity/manifest.test.ts b/test/router-parity/manifest.test.ts new file mode 100644 index 0000000..1fe50d9 --- /dev/null +++ b/test/router-parity/manifest.test.ts @@ -0,0 +1,59 @@ +/** + * Keeps the retained-test manifest honest: every file it names must exist and every test it names + * must still be declared there. A rename or deletion during CARD-07 fails here instead of silently + * shrinking the compatibility baseline. Whether those tests *pass* is `npm test` and the runtime + * suites' job; this only proves they are still the tests the manifest says they are. + */ +import { existsSync, readFileSync, readdirSync } from 'fs'; +import { join } from 'path'; +import { describe, it, expect } from 'vitest'; +import { PINNED_REVISION } from './frozen'; + +interface Entry { + file: string; + scope?: 'file' | 'tests'; + tests?: string[]; +} + +const ROOT = join(__dirname, '..', '..'); +const manifest = JSON.parse(readFileSync(join(__dirname, 'manifest.json'), 'utf8')) as { + revision: string; + retained: Entry[]; + runtimeSmoke: Entry[]; + supplementary: { retained: Entry[] }; + frozenFixtures: { oracle: string; readme: string }; +}; + +const entries: Entry[] = [...manifest.retained, ...manifest.runtimeSmoke, ...manifest.supplementary.retained]; + +describe('router parity: retained-test manifest', () => { + it('is pinned to the same revision as the frozen fixtures', () => { + expect(manifest.revision).toBe(PINNED_REVISION); + }); + + for (const entry of entries) { + it(`${entry.file} exists and declares every named test`, () => { + const path = join(ROOT, entry.file); + expect(existsSync(path), `${entry.file} is missing`).toBe(true); + const source = readFileSync(path, 'utf8'); + + for (const name of entry.tests ?? []) { + for (const part of name.split(' > ')) expect(source, `${entry.file}: '${name}'`).toContain(part); + } + }); + } + + it('names an oracle and a README that exist', () => { + for (const file of [manifest.frozenFixtures.oracle, manifest.frozenFixtures.readme]) + expect(existsSync(join(ROOT, file)), file).toBe(true); + }); + + it('the oracle is not imported from src/', () => { + // A frozen oracle the product can reach is no longer frozen: someone will "fix" it. + const files = readdirSync(join(ROOT, 'src'), { recursive: true, encoding: 'utf8' }).filter((f) => + f.endsWith('.ts'), + ); + const hits = files.filter((f) => readFileSync(join(ROOT, 'src', f), 'utf8').includes('router-parity')); + expect(hits).toEqual([]); + }); +}); diff --git a/test/router-parity/matcher.test.ts b/test/router-parity/matcher.test.ts new file mode 100644 index 0000000..613b68b --- /dev/null +++ b/test/router-parity/matcher.test.ts @@ -0,0 +1,156 @@ +/** + * Differential matcher parity (CARD-08 → CARD-07, #109). + * + * Every scenario runs through the frozen oracle and through the live `src/http/router` exports, and + * both must equal the outputs captured at the pinned revision. Today the live router *is* the + * linear matcher, so this proves the oracle is a faithful copy; once CARD-07 swaps the internals + * for a radix index behind the same exports, the same test compares oracle against radix with no + * edit here. + */ +import { readFileSync } from 'fs'; +import { join } from 'path'; +import { describe, it, expect, beforeAll } from 'vitest'; +import * as live from '../../src/http/router'; +import * as oracle from './oracle'; +import { runScenario, type MatcherImpl, type Outcome, type Scenario } from './matcher'; +import { HAND_SCENARIOS, OWNER_SCENARIOS } from './cases'; +import { branchStats, type BranchStats } from './branches'; +import { + generateScenarios, + generateScenariosV2, + GENERATOR_RULES, + GENERATOR_SEED, + GENERATOR_VERSION, + GENERATOR_V2_RULES, + GENERATOR_V2_VERSION, +} from './generator'; +import { frozen, expectFrozenEqual } from './frozen'; +import { runDifferential, runWsMatcher, LIVE_WS_MATCHER, ORACLE_WS_MATCHER } from './differential'; + +const LIVE: MatcherImpl = live; +const ORACLE: MatcherImpl = oracle; + +interface CapturedScenario extends Scenario { + outcomes: Outcome[]; +} + +interface GeneratedFile { + generator: string; + seed: number; + rules: string[]; + scenarios: CapturedScenario[]; +} + +const capture = (scenarios: Scenario[]): CapturedScenario[] => + scenarios.map((scenario) => ({ ...scenario, outcomes: runScenario(LIVE, scenario) })); + +function checkScenario(scenario: Scenario, expected: CapturedScenario | undefined): void { + expect(expected, `${scenario.id} is missing from the frozen fixture`).toBeDefined(); + const { outcomes, ...inputs } = expected!; + expectFrozenEqual(scenario, inputs, `${scenario.id} inputs`); + expectFrozenEqual(runScenario(ORACLE, scenario), outcomes, `${scenario.id} oracle`); + expectFrozenEqual(runScenario(LIVE, scenario), outcomes, `${scenario.id} live router`); +} + +describe('router parity: hand-picked matcher cases', () => { + let expected: Map; + + beforeAll(async () => { + const data = await frozen('matcher-hand', () => capture(HAND_SCENARIOS)); + expect(data.map((scenario) => scenario.id)).toEqual(HAND_SCENARIOS.map((scenario) => scenario.id)); + expected = new Map(data.map((scenario) => [scenario.id, scenario])); + }); + + for (const scenario of HAND_SCENARIOS) { + it(`${scenario.id}: ${scenario.note}`, () => checkScenario(scenario, expected.get(scenario.id))); + } +}); + +describe(`router parity: generated matcher cases (${GENERATOR_VERSION}, seed ${GENERATOR_SEED})`, () => { + const generated = generateScenarios(GENERATOR_SEED); + let expected: Map; + + beforeAll(async () => { + const data = await frozen('matcher-generated', () => ({ + generator: GENERATOR_VERSION, + seed: GENERATOR_SEED, + rules: GENERATOR_RULES, + scenarios: capture(generated), + })); + expect({ generator: data.generator, seed: data.seed, rules: data.rules }).toEqual({ + generator: GENERATOR_VERSION, + seed: GENERATOR_SEED, + rules: GENERATOR_RULES, + }); + expect(data.scenarios.map((scenario) => scenario.id)).toEqual(generated.map((scenario) => scenario.id)); + expected = new Map(data.scenarios.map((scenario) => [scenario.id, scenario])); + }); + + for (const scenario of generated) { + it(`${scenario.id}`, () => checkScenario(scenario, expected.get(scenario.id))); + } +}); + +describe('router parity: owner-requested matcher cases', () => { + let expected: Map; + + beforeAll(async () => { + const data = await frozen('matcher-owner', () => capture(OWNER_SCENARIOS)); + expect(data.map((scenario) => scenario.id)).toEqual(OWNER_SCENARIOS.map((scenario) => scenario.id)); + expected = new Map(data.map((scenario) => [scenario.id, scenario])); + }); + + for (const scenario of OWNER_SCENARIOS) { + it(`${scenario.id}: ${scenario.note}`, () => checkScenario(scenario, expected.get(scenario.id))); + } +}); + +interface GeneratedV2File extends GeneratedFile { + /** Share of generated requests that walk into sibling branches; v1's share is kept for contrast. */ + branchStats: { v1: BranchStats; v2: BranchStats }; +} + +describe(`router parity: generated shared-prefix cases (${GENERATOR_V2_VERSION}, seed ${GENERATOR_SEED})`, () => { + const generated = generateScenariosV2(GENERATOR_SEED); + const stats = () => ({ v1: branchStats(generateScenarios(GENERATOR_SEED)), v2: branchStats(generated) }); + let expected: Map; + + beforeAll(async () => { + const data = await frozen('matcher-generated-v2', () => ({ + generator: GENERATOR_V2_VERSION, + seed: GENERATOR_SEED, + rules: GENERATOR_V2_RULES, + branchStats: stats(), + scenarios: capture(generated), + })); + expect({ generator: data.generator, seed: data.seed, rules: data.rules }).toEqual({ + generator: GENERATOR_V2_VERSION, + seed: GENERATOR_SEED, + rules: GENERATOR_V2_RULES, + }); + expect(stats()).toEqual(data.branchStats); + expect(data.scenarios.map((scenario) => scenario.id)).toEqual(generated.map((scenario) => scenario.id)); + expected = new Map(data.scenarios.map((scenario) => [scenario.id, scenario])); + }); + + for (const scenario of generated) { + it(`${scenario.id}`, () => checkScenario(scenario, expected.get(scenario.id))); + } +}); + +describe('router parity: WebSocket matcher (first registered wins)', () => { + // WS selection is a separate contract from HTTP: no specificity ranking, registration order only. + it('oracle and live matchWsRoute equal the frozen capture', async () => { + const expected = await frozen('matcher-ws', () => runWsMatcher(LIVE_WS_MATCHER)); + expectFrozenEqual(runWsMatcher(ORACLE_WS_MATCHER), expected, 'ws oracle'); + expectFrozenEqual(runWsMatcher(LIVE_WS_MATCHER), expected, 'ws live'); + }); +}); + +describe('router parity: runtime-neutral differential (the one Deno, Bun and workerd run)', () => { + it('reports no mismatch on Node', async () => { + const dir = join(__dirname, 'frozen'); + const report = await runDifferential((name) => JSON.parse(readFileSync(join(dir, `${name}.json`), 'utf8'))); + expect(report.mismatches).toEqual([]); + }); +}); diff --git a/test/router-parity/matcher.ts b/test/router-parity/matcher.ts new file mode 100644 index 0000000..cfde54b --- /dev/null +++ b/test/router-parity/matcher.ts @@ -0,0 +1,107 @@ +/** + * The differential matcher harness: one ordered declaration array and one request list, run through + * any implementation of the router's lookup functions, reduced to what a caller can observe — + * which declaration answered (by stable ID, never by pattern text), its decoded params, whether HEAD + * was implicit, the ordered `Allow` list, and the normalization error if the path never got that far. + */ +import type { RouteDef } from '../../src/http/types'; + +export type Transport = 'buffer' | 'sse' | 'ndjson' | 'negotiate'; + +export interface Declaration { + id: string; + method: string; + pattern: string; + transport: Transport; +} + +export interface Request { + method: string; + raw: string; +} + +export interface Scenario { + id: string; + note: string; + declarations: Declaration[]; + requests: Request[]; +} + +/** The lookup surface CARD-07 replaces. The live router and the frozen oracle both satisfy it. */ +export interface MatcherImpl { + normalizeRequestPath(path: string): string; + matchRoute( + routes: RouteDef[], + method: string, + path: string, + ): { def: unknown; params: Record } | undefined; + resolveRoute( + routes: RouteDef[], + method: string, + path: string, + ): { def: unknown; params: Record; implicitHead: boolean } | undefined; + allowedMethods(routes: RouteDef[], path: string): string[]; +} + +export interface ErrorOutcome { + name: string; + message: string; +} + +export interface Outcome { + method: string; + raw: string; + normalized?: string; + error?: ErrorOutcome; + match?: { id: string; params: Record } | null; + resolve?: { id: string; params: Record; implicitHead: boolean } | null; + allow?: string[]; +} + +export function errorOutcome(error: unknown): ErrorOutcome { + const err = error as Error; + return { name: err.name, message: err.message }; +} + +/** Builds fresh `RouteDef` objects for one run, so no implementation can see another's cached table. */ +function buildRoutes(declarations: Declaration[]): { routes: RouteDef[]; idOf: Map } { + const idOf = new Map(); + const routes = declarations.map((decl): RouteDef => { + const def: RouteDef = { + method: decl.method, + pattern: decl.pattern, + transport: decl.transport, + handler: async () => ({ status: 200, headers: {}, body: decl.id }), + }; + idOf.set(def, decl.id); + return def; + }); + return { routes, idOf }; +} + +export function runScenario(impl: MatcherImpl, scenario: Scenario): Outcome[] { + const { routes, idOf } = buildRoutes(scenario.declarations); + const id = (def: unknown): string => idOf.get(def) ?? ''; + + return scenario.requests.map(({ method, raw }): Outcome => { + let normalized: string; + + try { + normalized = impl.normalizeRequestPath(raw); + } catch (error) { + return { method, raw, error: errorOutcome(error) }; + } + + const match = impl.matchRoute(routes, method, normalized); + const resolved = impl.resolveRoute(routes, method, normalized); + + return { + method, + raw, + normalized, + match: match ? { id: id(match.def), params: match.params } : null, + resolve: resolved ? { id: id(resolved.def), params: resolved.params, implicitHead: resolved.implicitHead } : null, + allow: impl.allowedMethods(routes, normalized), + }; + }); +} diff --git a/test/router-parity/mutants.ts b/test/router-parity/mutants.ts new file mode 100644 index 0000000..dd74e72 --- /dev/null +++ b/test/router-parity/mutants.ts @@ -0,0 +1,211 @@ +/** + * Mutation check for the router-parity corpus: does it catch the bugs a radix rewrite is likely to + * introduce? Each mutant is one targeted edit to a *temporary copy* of `src/`. The parity suite runs + * against that copy, and the mutant is killed if any test fails. + * + * npm run parity:mutants + * + * Not part of `npm test`: it runs the suite once per mutant. `src/` in this checkout is never + * written; the run ends by checking `git diff --exit-code src` to prove it. + * + * Every mutant's search text must be found exactly once, so a refactor that moves the code fails + * loudly instead of silently testing an unmutated copy. CARD-07 replaces this matcher, so after it + * lands these mutants describe the old code. The kill table recorded in the PR is the evidence for + * the corpus as frozen; mutants against the new code belong to CARD-07. + */ +import { spawnSync, execFileSync } from 'child_process'; +import { cpSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'fs'; +import os from 'os'; +import { join, resolve } from 'path'; + +const ROOT = resolve(__dirname, '..', '..'); + +interface Mutant { + id: string; + models: string; + file: string; + from: string; + to: string; +} + +const ROUTER = 'src/http/router.ts'; + +export const MUTANTS: Mutant[] = [ + { + id: 'no-backtrack', + models: 'no backtracking to a param branch once a static first segment was entered', + file: ROUTER, + from: ` const params = matchCompiled(compiled, pathSegs, decoded); + if (params) return { params, def };`, + to: ` const params = matchCompiled(compiled, pathSegs, decoded); + if (params) return { params, def }; + const first = compiled.segments[0]; + if (compiled.segments.length > 1 && first?.kind === 'static' && first.value === pathSegs[0]) return undefined;`, + }, + { + id: 'precedence-swapped', + models: 'static and plain-param precedence swapped', + file: ROUTER, + from: `.map((segment) => (segment.kind === 'static' ? 3 : segment.constraint ? 2 : 1)),`, + to: `.map((segment) => (segment.kind === 'static' ? 1 : segment.constraint ? 2 : 3)),`, + }, + { + id: 'tie-last-registered', + models: 'equal-rank tie broken by the last-registered declaration', + file: ROUTER, + from: `for (const bucket of byMethod.values()) bucket.sort((a, b) => moreSpecific(b.compiled, a.compiled));`, + to: `for (const bucket of byMethod.values()) bucket.reverse().sort((a, b) => moreSpecific(b.compiled, a.compiled));`, + }, + { + id: 'constraint-ignored', + models: 'param constraint not tested during lookup', + file: ROUTER, + from: ` if (segment.constraint && !segment.constraint.test(value)) return undefined;\n`, + to: ``, + }, + { + id: 'decode-before-split', + models: 'path decoded before splitting, so %2F becomes a separator', + file: ROUTER, + from: ` return path.split('/').filter(Boolean);`, + to: ` return decodeURIComponent(path).split('/').filter(Boolean);`, + }, + { + id: 'catch-all-needs-segment', + models: 'catch-all does not match zero segments', + file: ROUTER, + from: ` if (segment.kind === 'catchAll') { + params[segment.name]`, + to: ` if (segment.kind === 'catchAll') { + if (index >= pathSegs.length) return undefined; + params[segment.name]`, + }, + { + id: 'implicit-head-from-stream', + models: 'implicit HEAD served by a streaming GET', + file: ROUTER, + from: `routes.filter((route) => route.transport === 'buffer'),`, + to: `routes,`, + }, + { + id: 'allow-one-pattern', + models: 'Allow built from the first matching pattern only', + file: ROUTER, + from: ` for (const route of routes) { + if (!matchCompiled(compilePattern(route.pattern), pathSegs)) continue;`, + to: ` let onlyPattern: string | undefined; + for (const route of routes) { + if (!matchCompiled(compilePattern(route.pattern), pathSegs)) continue; + onlyPattern ??= route.pattern; + if (route.pattern !== onlyPattern) continue;`, + }, + { + id: 'allow-order', + models: 'Allow in discovery order instead of canonical order', + file: ROUTER, + from: ` return [...methods].sort((a, b) => {`, + // The original sort is left behind as unreachable code, which the transpiler accepts. + to: ` return [...methods]; + [...methods].sort((a, b) => {`, + }, + { + id: 'trailing-slash-kept', + models: 'trailing slash not normalized', + file: ROUTER, + from: ` const normalized = resolved.length > 1 && resolved.endsWith('/') ? resolved.slice(0, -1) : resolved;`, + to: ` const normalized = resolved;`, + }, + { + id: 'ws-ranked-like-http', + models: 'WS upgrades ranked by specificity like HTTP instead of first registered', + file: 'src/http/ws-core.ts', + from: ` .find((entry) => entry.params);`, + to: ` .filter((entry) => entry.params) + .sort((a, b) => a.def.pattern.split(':').length - b.def.pattern.split(':').length)[0];`, + }, + { + id: 'case-insensitive-static', + models: 'static segments compared case-insensitively', + file: ROUTER, + from: ` if (segment.value !== pathSegs[index]) return undefined;`, + to: ` if (segment.value.toLowerCase() !== pathSegs[index].toLowerCase()) return undefined;`, + }, +]; + +function runSuite(dir: string): { passed: boolean; failed: number } { + const out = join(dir, 'vitest.json'); + const res = spawnSync( + process.execPath, + [ + join(ROOT, 'node_modules/vitest/vitest.mjs'), + 'run', + 'test/router-parity', + '--reporter=json', + `--outputFile=${out}`, + ], + { cwd: dir, env: { ...process.env, ROUTER_PARITY_CAPTURE: '' }, encoding: 'utf8', stdio: 'pipe' }, + ); + let failed = 0; + try { + failed = (JSON.parse(readFileSync(out, 'utf8')) as { numFailedTests: number }).numFailedTests; + } catch { + failed = -1; // the suite did not even report, which also kills the mutant + } + return { passed: res.status === 0, failed }; +} + +function copyTree(): string { + const dir = mkdtempSync(join(os.tmpdir(), 'router-mutants-')); + for (const entry of ['src', 'test']) cpSync(join(ROOT, entry), join(dir, entry), { recursive: true }); + for (const file of ['package.json', 'tsconfig.json', 'vitest.config.ts']) cpSync(join(ROOT, file), join(dir, file)); + symlinkSync(join(ROOT, 'node_modules'), join(dir, 'node_modules'), 'dir'); + return dir; +} + +function main(): void { + const only = process.env.MUTANTS_ONLY?.split(','); + const mutants = only ? MUTANTS.filter((m) => only.includes(m.id)) : MUTANTS; + const dir = copyTree(); + const rows: Array<{ id: string; models: string; result: string; failedTests: number }> = []; + + try { + const control = runSuite(dir); + if (!control.passed) + throw new Error('the unmutated copy fails the parity suite; no mutant result would mean anything'); + + for (const mutant of mutants) { + const path = join(dir, mutant.file); + const original = readFileSync(path, 'utf8'); + const hits = original.split(mutant.from).length - 1; + if (hits !== 1) throw new Error(`${mutant.id}: search text found ${hits} times in ${mutant.file}`); + + writeFileSync(path, original.replace(mutant.from, mutant.to)); + try { + const { passed, failed } = runSuite(dir); + rows.push({ + id: mutant.id, + models: mutant.models, + result: passed ? 'SURVIVED' : 'killed', + failedTests: failed, + }); + process.stderr.write(`[mutants] ${mutant.id}: ${passed ? 'SURVIVED' : `killed (${failed} failing)`}\n`); + } finally { + writeFileSync(path, original); + } + } + } finally { + rmSync(dir, { recursive: true, force: true }); + } + + console.log('| mutant | models | result | failing tests |'); + console.log('| --- | --- | --- | --- |'); + for (const row of rows) console.log(`| ${row.id} | ${row.models} | ${row.result} | ${row.failedTests} |`); + const killed = rows.filter((row) => row.result === 'killed').length; + console.log(`\n${killed}/${rows.length} killed`); + + // The guarantee this script makes: the real src/ was never touched. + execFileSync('git', ['diff', '--exit-code', '--', 'src'], { cwd: ROOT, stdio: 'inherit' }); + if (killed !== rows.length) process.exitCode = 1; +} + +main(); diff --git a/test/router-parity/oracle.ts b/test/router-parity/oracle.ts new file mode 100644 index 0000000..db5493b --- /dev/null +++ b/test/router-parity/oracle.ts @@ -0,0 +1,472 @@ +/** + * FROZEN ORACLE — the pre-radix HTTP and WebSocket matcher, copied verbatim from `@green-tea/core` + * at ed47836c9820c47bf4ed5e902d91e019abdb110a (`src/http/router.ts`, minus `parseQuery`, plus + * `matchWsRoute` from `src/http/ws-core.ts`). + * + * DO NOT EDIT THIS FILE TO FIT A NEW IMPLEMENTATION. It is the reference the radix index (CARD-07, + * #109) is judged against: if the live matcher disagrees with it, the live matcher is what changed. + * A deliberate compatibility change needs its own maintainer approval and a new pinned oracle, + * never an edit here. Test-only: nothing under `src/` may import it. + * + * The only departures from the source are mechanical: the route types are declared locally (so a + * later change to `src/http/types.ts` cannot alter what this file compiles to), and the module-level + * caches are this file's own, so the oracle never shares compiled state with the live matcher. + */ + +/** The fields of `RouteDef` the matcher reads. A live `RouteDef` is assignable to it. */ +export interface OracleRoute { + method: string; + pattern: string; + transport: string; +} + +/** The fields of `WsRouteDef` the WS matcher reads. */ +export interface OracleWsRoute { + pattern: string; +} + +export interface MatchedRoute { + params: Record; + def: OracleRoute; +} + +export type CompiledSegment = + | { kind: 'static'; value: string } + | { kind: 'param'; name: string; constraint?: RegExp; constraintSource?: string } + | { kind: 'catchAll'; name: string }; + +/** Parsed route pattern reused by matching, specificity, ambiguity checks, and OpenAPI projection. */ +export interface CompiledPattern { + source: string; + normalized: string; + shape: string; + segments: CompiledSegment[]; + kinds: number[]; + catchAll: boolean; +} + +const compiledCache = new Map(); +const PARAM_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/; +const MAX_CONSTRAINT_LENGTH = 128; + +/** Request-path syntax error. Adapters translate this to the standard 400 response envelope. */ +export class InvalidRequestPathError extends Error { + constructor(message: string) { + super(message); + this.name = 'InvalidRequestPathError'; + } +} + +interface ConstraintToken { + length: number; + unbounded: boolean; + separator: boolean; +} + +/** Reads one atom plus its optional quantifier from the deliberately small safe-regex subset. */ +function readConstraintToken(source: string): ConstraintToken | undefined { + const atom = /^(?:\\[dDsSwW]|\\[.\-_/]|[A-Za-z0-9_.-]|\[(?:\\.|[^\]\\])+\])/u.exec(source)?.[0]; + if (!atom) return undefined; + + const rest = source.slice(atom.length); + const quantifier = /^(?:[+*?]|\{\d+(?:,\d*)?\})/u.exec(rest)?.[0] ?? ''; + if (quantifier.startsWith('{')) assertBoundedQuantifier(quantifier); + + return { + length: atom.length + quantifier.length, + unbounded: quantifier === '+' || quantifier === '*' || quantifier.endsWith(',}'), + separator: quantifier === '' && /^(?:\\[.\-_/]|[._-])$/u.test(atom), + }; +} + +/** Rejects nonsensical or excessively large counted quantifiers before RegExp compilation. */ +function assertBoundedQuantifier(quantifier: string): void { + const [minText, maxText] = quantifier.slice(1, -1).split(','); + const min = Number(minText); + const max = maxText === undefined || maxText === '' ? min : Number(maxText); + if (min > max || max > 2048) throw new Error(`unsafe route constraint: invalid quantifier '${quantifier}'`); +} + +/** Accepts only a linear, group-free regex subset to keep attacker-controlled segments ReDoS-safe. */ +function assertSafeConstraint(source: string): void { + if (!source || source.length > MAX_CONSTRAINT_LENGTH) + throw new Error('unsafe route constraint: expression must contain 1-128 characters'); + + let offset = 0; + let previousUnbounded = false; + + while (offset < source.length) { + const token = readConstraintToken(source.slice(offset)); + if (!token) throw new Error(`unsafe route constraint: unsupported expression '${source}'`); + if (previousUnbounded && token.unbounded) + throw new Error(`unsafe route constraint: adjacent unbounded quantifiers in '${source}'`); + previousUnbounded = token.separator ? false : token.unbounded; + offset += token.length; + } +} + +function assertParamName(name: string, pattern: string): void { + if (!PARAM_NAME.test(name)) throw new Error(`invalid route pattern '${pattern}': invalid parameter name '${name}'`); +} + +function compileParam(segment: string, pattern: string): Extract { + const constraintStart = segment.indexOf('('); + + if (constraintStart < 0) { + const name = segment.slice(1); + assertParamName(name, pattern); + return { kind: 'param', name }; + } + + if (!segment.endsWith(')')) throw new Error(`invalid route pattern '${pattern}': malformed constraint`); + const name = segment.slice(1, constraintStart); + const constraintSource = segment.slice(constraintStart + 1, -1); + assertParamName(name, pattern); + assertSafeConstraint(constraintSource); + return { + kind: 'param', + name, + constraintSource, + constraint: new RegExp(`^(?:${constraintSource})$`, 'u'), + }; +} + +function compileSegments(pattern: string, rawSegments: string[]): CompiledSegment[] { + const names = new Set(); + const compiled: CompiledSegment[] = []; + + for (let index = 0; index < rawSegments.length; index++) { + const raw = rawSegments[index]; + let segment: CompiledSegment; + + if (raw.startsWith(':') && raw.endsWith('*')) { + const name = raw.slice(1, -1); + assertParamName(name, pattern); + if (index !== rawSegments.length - 1) + throw new Error(`invalid route pattern '${pattern}': catch-all must be the final segment`); + segment = { kind: 'catchAll', name }; + } else if (raw.startsWith(':')) { + segment = compileParam(raw, pattern); + } else { + segment = { kind: 'static', value: raw }; + } + + if (segment.kind !== 'static') { + if (names.has(segment.name)) + throw new Error(`invalid route pattern '${pattern}': duplicate parameter '${segment.name}'`); + names.add(segment.name); + } + + compiled.push(segment); + } + + return compiled; +} + +function segmentShape(segment: CompiledSegment): string { + if (segment.kind === 'static') return `s:${segment.value}`; + if (segment.kind === 'catchAll') return 'c'; + return segment.constraintSource ? `r:${segment.constraintSource}` : 'p'; +} + +/** Compiles and validates one route pattern. Results are cached by source string. */ +export function compilePattern(pattern: string): CompiledPattern { + const cached = compiledCache.get(pattern); + if (cached) return cached; + if (!pattern.startsWith('/')) throw new Error(`invalid route pattern '${pattern}': pattern must start with '/'`); + if (pattern.includes('//')) throw new Error(`invalid route pattern '${pattern}': repeated slash`); + + const normalized = pattern.length > 1 && pattern.endsWith('/') ? pattern.slice(0, -1) : pattern; + const rawSegments = normalized === '/' ? [] : normalized.split('/').slice(1); + const segments = compileSegments(pattern, rawSegments); + const compiled: CompiledPattern = { + source: pattern, + normalized, + shape: segments.map(segmentShape).join('/'), + segments, + kinds: segments + .filter((segment) => segment.kind !== 'catchAll') + .map((segment) => (segment.kind === 'static' ? 3 : segment.constraint ? 2 : 1)), + catchAll: segments.at(-1)?.kind === 'catchAll', + }; + compiledCache.set(pattern, compiled); + return compiled; +} + +/** Matches a `.` or `..` segment, percent-encoded or not, sitting alone between separators. */ +const DOT_SEGMENT = /(?:^|\/)(?:\.|%2e){1,2}(?:\/|$)/i; + +/** + * Classifies one path segment as `.`, `..`, or neither. + * + * `%2e` is a dot as far as the URL spec is concerned, so `/a/%2e%2e/b` and `/a/../b` are the same + * path. Skipping the encoded spelling would leave the encoded form as a way to reach a route the + * plain form resolves away from. + */ +function dotSegment(segment: string): '.' | '..' | undefined { + if (segment === '.' || segment === '..') return segment; + if (segment.length > 6 || !segment.includes('%')) return undefined; + const decoded = segment.toLowerCase().replace(/%2e/g, '.'); + return decoded === '.' || decoded === '..' ? decoded : undefined; +} + +/** + * Resolves `.` and `..` segments, the way RFC 3986 §5.2.4 and the WHATWG URL parser both do. + * + * This runs for the *Node* adapter's benefit. Every fetch-based runtime — Deno, Bun, workerd — + * resolves dot segments inside the `Request` constructor, before green-tea is handed anything: + * `new Request('http://x/public/../admin').url` is already `http://x/admin`. The raw target is + * simply not recoverable there, so rejecting dot segments outright — which is what this module + * does for `//`, and would be the stricter policy — cannot be implemented on three of the four + * runtimes. Resolving is the only rule all four can agree on. + * + * Before this, the same bytes on the wire routed differently per runtime: `GET /public/../admin` + * reached a `/admin` route under Deno/Bun/edge and 404'd under Node. + */ +function resolveDotSegments(path: string): string { + const out: string[] = []; + + for (const segment of path.split('/').slice(1)) { + const dots = dotSegment(segment); + if (dots === '.') continue; + + if (dots === '..') { + out.pop(); + continue; + } + + out.push(segment); + } + + return `/${out.join('/')}`; +} + +/** Applies the public trailing-slash policy and validates every segment's percent encoding. */ +export function normalizeRequestPath(path: string): string { + if (!path.startsWith('/')) throw new InvalidRequestPathError('invalid request path: path must start with slash'); + if (path.includes('//')) throw new InvalidRequestPathError('invalid request path: repeated slash'); + + // Two `indexOf` scans gate the regex, and the regex gates the split. A path with no `.` and no + // `%` at all — which is most of them — pays only the scans. + const resolved = + (path.includes('.') || path.includes('%')) && DOT_SEGMENT.test(path) ? resolveDotSegments(path) : path; + const normalized = resolved.length > 1 && resolved.endsWith('/') ? resolved.slice(0, -1) : resolved; + + // Validation only — the decoded value is deliberately discarded, matching is done on the raw + // path. So the work is skipped entirely unless there is something to validate. + // + // This used to split the path and call `decodeURIComponent` per segment, on every request, and + // throw all of it away. Measured on this path: 95.8 ns for `/hello`, 342.7 ns for a six-segment + // route — around 8% of a whole request, spent proving that a string nobody decodes could be + // decoded. The guard below is 15.7 ns and 6.7 ns for the same two paths. + // + // One call on the whole string rather than per segment is the same check: `decodeURIComponent` + // throws on the first malformed `%` sequence wherever it appears, and a `%2F` inside a segment + // decodes fine either way. Only the throw matters here, never the result. + if (normalized.includes('%')) { + try { + decodeURIComponent(normalized); + } catch { + throw new InvalidRequestPathError('invalid request path: malformed path encoding'); + } + } + + return normalized; +} + +function decodeSegment(value: string): string { + // Same gate `normalizeRequestPath` uses on the whole path, for the same reason: a segment with no + // `%` decodes to itself, so the call only ever proves that. Most segments have no `%`, and this + // runs for every param segment of every candidate route the scan reaches. + return value.includes('%') ? decodeURIComponent(value) : value; +} + +/** + * Splits a request path into its non-empty segments. + * + * Called once per request by the scanning functions below, not once per candidate route. It used to + * live inside {@link matchCompiled}, which meant `split` + `filter` — two allocations — ran for every + * registered route on every request, always producing the same array. + */ +function splitPath(path: string): string[] { + return path.split('/').filter(Boolean); +} + +/** + * Matches one compiled pattern against a request's segments. + * + * `decoded` memoizes per request, not per candidate: a scan reaching the same parameter position on + * several routes decoded the same string once per route. Position is all decoding depends on, so one + * array shared across the scan is the same answer for less work. + */ +function matchCompiled( + compiled: CompiledPattern, + pathSegs: string[], + decoded?: Array, +): Record | undefined { + const params: Record = {}; + + for (let index = 0; index < compiled.segments.length; index++) { + const segment = compiled.segments[index]; + + if (segment.kind === 'catchAll') { + params[segment.name] = pathSegs.slice(index).map(decodeSegment).join('/'); + return params; + } + + if (index >= pathSegs.length) return undefined; + + if (segment.kind === 'static') { + if (segment.value !== pathSegs[index]) return undefined; + continue; + } + + const value = decoded ? (decoded[index] ??= decodeSegment(pathSegs[index])) : decodeSegment(pathSegs[index]); + if (segment.constraint && !segment.constraint.test(value)) return undefined; + params[segment.name] = value; + } + + return compiled.segments.length === pathSegs.length ? params : undefined; +} + +/** Matches a compiled segment pattern and returns its decoded parameters. */ +export function matchPattern(pattern: string, path: string): Record | undefined { + return matchCompiled(compilePattern(pattern), splitPath(path)); +} + +/** + * Orders patterns by exactness, then static/constrained/plain segment specificity. + * + * Takes compiled patterns rather than their source strings: it used to re-derive both through + * `compilePattern`, which is a `Map` lookup each, on every comparison of every request. + */ +function moreSpecific(a: CompiledPattern, b: CompiledPattern): number { + const scoreA = a; + const scoreB = b; + if (scoreA.catchAll !== scoreB.catchAll) return scoreA.catchAll ? -1 : 1; + const length = Math.max(scoreA.kinds.length, scoreB.kinds.length); + + for (let index = 0; index < length; index++) { + const kindA = scoreA.kinds[index] ?? -1; + const kindB = scoreB.kinds[index] ?? -1; + if (kindA !== kindB) return kindA - kindB; + } + + return 0; +} + +/** One route with its pattern already compiled. Built once per table, ordered within its method. */ +interface IndexedRoute { + def: OracleRoute; + compiled: CompiledPattern; +} + +/** + * Compiled, method-bucketed, specificity-ordered route tables, keyed by the identity of the array + * they were built from. + * + * A server hands the same array to every request, so this is built once and collected with the + * table it describes. A table assembled fresh — mesh splicing a teapot's exports in at boot — is a + * different array and gets its own index, so nothing has to remember to invalidate anything. + */ +const routeIndexCache = new WeakMap>(); + +function routeIndex(routes: OracleRoute[]): Map { + const cached = routeIndexCache.get(routes); + if (cached) return cached; + + const byMethod = new Map(); + + for (const def of routes) { + const entry: IndexedRoute = { def, compiled: compilePattern(def.pattern) }; + const bucket = byMethod.get(def.method); + if (bucket) bucket.push(entry); + else byMethod.set(def.method, [entry]); + } + + // Most specific first, so the first match *is* the answer. `sort` is stable, so equal patterns + // keep registration order — which is exactly what the old scan did by refusing to replace its + // best on a tie. + for (const bucket of byMethod.values()) bucket.sort((a, b) => moreSpecific(b.compiled, a.compiled)); + + routeIndexCache.set(routes, byMethod); + return byMethod; +} + +/** + * Finds the most specific route matching both method and path; ties keep registration order. + * + * The ranking is settled when the table is built, not per request: the answer cannot change between + * requests, and re-deriving it charged every request for a scan to the end plus a `moreSpecific` + * call — two `compilePattern` lookups each — per candidate. Both scaled with the size of the route + * table. What is left here is a walk that stops at the first match. + */ +export function matchRoute(routes: OracleRoute[], method: string, path: string): MatchedRoute | undefined { + const candidates = routeIndex(routes).get(method); + if (!candidates) return undefined; + + const pathSegs = splitPath(path); + const decoded: Array = new Array(pathSegs.length); + + for (const { def, compiled } of candidates) { + const params = matchCompiled(compiled, pathSegs, decoded); + if (params) return { params, def }; + } + + return undefined; +} + +/** Route resolution adds the one HTTP fallback the matcher supports: buffered GET serves HEAD. */ +export interface ResolvedRoute extends MatchedRoute { + implicitHead: boolean; +} + +export function resolveRoute(routes: OracleRoute[], method: string, path: string): ResolvedRoute | undefined { + const explicit = matchRoute(routes, method, path); + if (explicit) return { ...explicit, implicitHead: false }; + if (method !== 'HEAD') return undefined; + + const fallback = matchRoute( + routes.filter((route) => route.transport === 'buffer'), + 'GET', + path, + ); + return fallback ? { ...fallback, implicitHead: true } : undefined; +} + +const METHOD_ORDER = ['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']; + +/** Lists the distinct HTTP methods whose pattern matches the path — used to build a 405 `Allow` header. */ +export function allowedMethods(routes: OracleRoute[], path: string): string[] { + const pathSegs = splitPath(path); + const methods = new Set(); + + for (const route of routes) { + if (!matchCompiled(compilePattern(route.pattern), pathSegs)) continue; + methods.add(route.method); + if (route.method === 'GET' && route.transport === 'buffer') methods.add('HEAD'); + } + + if (methods.size) methods.add('OPTIONS'); + return [...methods].sort((a, b) => { + const indexA = METHOD_ORDER.indexOf(a); + const indexB = METHOD_ORDER.indexOf(b); + return ( + (indexA < 0 ? METHOD_ORDER.length : indexA) - (indexB < 0 ? METHOD_ORDER.length : indexB) || a.localeCompare(b) + ); + }); +} + +/** + * Selects the first registered WS declaration whose pattern matches — no specificity ranking. + * Copied from `src/http/ws-core.ts`; both adapters hand it a path already through + * `normalizeRequestPath` (Node `routeUpgrade`, and `buildAppUpgrade` for app.upgrade). + */ +export function matchWsRoute( + wsRoutes: W[], + path: string, +): { def: W; params: Record | undefined } | undefined { + return wsRoutes + .map((candidate) => ({ def: candidate, params: matchPattern(candidate.pattern, path) })) + .find((entry) => entry.params); +} diff --git a/test/router-parity/owner.test.ts b/test/router-parity/owner.test.ts new file mode 100644 index 0000000..bd9d93c --- /dev/null +++ b/test/router-parity/owner.test.ts @@ -0,0 +1,264 @@ +/** + * Owner-requested additions (CARD-08 review) that need a running app: cross-pattern `Allow` through + * both adapters, and the HTTP route table across a mesh peer's lifetime. + */ +import 'reflect-metadata'; +import http from 'http'; +import net from 'net'; +import type { AddressInfo } from 'net'; +import { describe, it, afterAll, beforeAll } from 'vitest'; +import { createApp, Route, Get, Post, Module } from '../../src/index'; +import { ALLOW_REQUESTS, CrossAllowModule, fetchRequest, stableHeaders, type Seen } from './app-fixture'; +import type { App } from '../../src/app/types'; +import type { Logger } from '../../src/logger'; +import { frozen, expectFrozenEqual } from './frozen'; + +function nodeRequest(port: number, method: string, path: string): Promise { + return new Promise((resolve, reject) => { + const req = http.request({ host: '127.0.0.1', port, method, path, agent: false }, (res) => { + let body = ''; + res.setEncoding('utf8'); + res.on('data', (chunk) => (body += chunk)); + res.on('end', () => + resolve({ method, path, status: res.statusCode ?? 0, allow: (res.headers.allow as string) ?? null, body }), + ); + }); + req.on('error', reject); + req.end(); + }); +} + +// ── mesh: the HTTP route table across a peer's lifetime ───────────────────────────────────────── + +const SECRET = 'parity-secret'; + +@Route('/remote') +class RemoteCtl { + @Get('/ping', { export: true }) ping() { + return { from: 'teapot' }; + } +} +@Module({ mountpoint: '/api', controllers: [RemoteCtl] }) +class TeapotModule {} + +@Route('/local') +class LocalCtl { + @Get('/ok') ok() { + return { from: 'teacup' }; + } +} +@Module({ mountpoint: '/api', controllers: [LocalCtl] }) +class TeacupModule {} + +const quiet: Logger = { debug: () => {}, info: () => {}, warn: () => {}, error: () => {} }; + +/** A port nothing is listening on, that a teapot can take later. */ +async function freePort(): Promise { + const server = net.createServer(); + await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve)); + const { port } = server.address() as AddressInfo; + await new Promise((resolve) => server.close(() => resolve())); + return port; +} + +// Same probes at every phase: the remote hit, its method miss, a local hit and a path miss. +const PROBES: Array<[string, string]> = [ + ['GET', '/api/remote/ping'], + ['POST', '/api/remote/ping'], + ['GET', '/api/local/ok'], + ['GET', '/api/nope'], +]; + +async function probe(app: App, phase: string) { + const out = []; + for (const [method, path] of PROBES) { + const { status, allow, body } = await fetchRequest(app, method, path); + // The teapot's ephemeral port appears in the 503 body; the port is not routing behaviour. + out.push({ phase, method, path, status, allow, body: body.replace(/ws:\/\/127\.0\.0\.1:\d+/g, '') }); + } + return out; +} + +const teacupFor = (port: number) => + createApp({ + modules: [TeacupModule], + experimental: true, + logger: quiet, + mesh: { + teapots: [{ url: `ws://127.0.0.1:${port}/__mesh__/control`, secret: SECRET }], + bootTimeoutMs: 300, + timeoutMs: 500, + reconnect: false, + }, + }); + +/** + * Two lifetimes. A: the teapot is up at boot, then goes away. B: the teapot is absent at boot and + * comes up afterwards. The current code builds the HTTP table once, at boot, and never changes it: + * routes spliced at boot stay in the table after their peer leaves, and a peer that arrives late + * is never spliced in. CARD-10 can reuse this to assert the index is not rebuilt per request. + */ +async function meshLifetimes() { + const results = []; + + const portA = await freePort(); + const teapotA = createApp({ modules: [TeapotModule], experimental: true, mesh: { secret: SECRET } }); + await teapotA.listen(portA); + const teacupA = teacupFor(portA); + try { + results.push(...(await probe(teacupA, 'A1 teapot up at boot'))); + await teapotA.close(); + results.push(...(await probe(teacupA, 'A2 teapot gone after boot'))); + } finally { + await teacupA.close(); + } + + const portB = await freePort(); + const teacupB = teacupFor(portB); + const teapotB = createApp({ modules: [TeapotModule], experimental: true, mesh: { secret: SECRET } }); + try { + results.push(...(await probe(teacupB, 'B1 teapot absent at boot'))); + await teapotB.listen(portB); + results.push(...(await probe(teacupB, 'B2 teapot up after boot'))); + } finally { + await teacupB.close(); + await teapotB.close(); + } + + return results; +} + +// ── mesh: local and remote routes answering one path (CARD-07 indexes them as two trees) ───────── + +@Route('/') +class RemoteMixCtl { + // Same path as a local GET, another method. + @Post('/dup/ping', { export: true }) dupPost() { + return { from: 'teapot', route: 'POST /api/dup/ping' }; + } + // A remote param route overlapping a local static one. + @Post('/v/:id', { export: true }) vPost() { + return { from: 'teapot', route: 'POST /api/v/:id' }; + } + // Remote only: remote routes are `buffer`, so the teacup's router resolves HEAD to it implicitly. + // Captured as observed at ed47836: the teacup forwards the request as HEAD, the teapot looks its + // plan up by (pattern, method) and has none for HEAD, so HEAD answers 404 while OPTIONS still + // advertises HEAD. That is the mesh proxy's behaviour, not the matcher's; CARD-07 must keep it. + @Get('/x', { export: true }) x() { + return { from: 'teapot', route: 'GET /api/x' }; + } +} +@Module({ mountpoint: '/api', controllers: [RemoteMixCtl] }) +class RemoteMixTeapotModule {} + +@Route('/') +class LocalMixCtl { + @Get('/dup/ping') dupGet() { + return { from: 'teacup', route: 'GET /api/dup/ping' }; + } + @Get('/v/b') vGet() { + return { from: 'teacup', route: 'GET /api/v/b' }; + } +} +@Module({ mountpoint: '/api', controllers: [LocalMixCtl] }) +class LocalMixTeacupModule {} + +const MIX_REQUESTS: Array<[string, string]> = [ + ...['PUT', 'OPTIONS', 'HEAD', 'GET', 'POST'].map((m): [string, string] => [m, '/api/dup/ping']), + ...['PUT', 'OPTIONS', 'HEAD', 'GET', 'POST'].map((m): [string, string] => [m, '/api/v/b']), + ...['PUT', 'OPTIONS', 'HEAD', 'GET'].map((m): [string, string] => [m, '/api/v/c']), + ...['HEAD', 'GET', 'OPTIONS', 'PUT'].map((m): [string, string] => [m, '/api/x']), +]; + +/** Full stable headers for both adapters, so HEAD body suppression and content headers are visible. */ +async function mixedTable() { + const teapot = createApp({ modules: [RemoteMixTeapotModule], experimental: true, mesh: { secret: SECRET } }); + const tServer = await teapot.listen(0); + const url = `ws://127.0.0.1:${(tServer.address() as AddressInfo).port}/__mesh__/control`; + const teacup = createApp({ + modules: [LocalMixTeacupModule], + experimental: true, + logger: quiet, + mesh: { teapots: [{ url, secret: SECRET }], reconnect: false }, + }); + + try { + const port = ((await teacup.listen(0)).address() as AddressInfo).port; + const out = []; + for (const [method, path] of MIX_REQUESTS) { + const res = await teacup.fetch(new Request(`http://parity.test${path}`, { method })); + out.push({ + adapter: 'fetch', + method, + path, + status: res.status, + headers: stableHeaders(res.headers), + body: await res.text(), + }); + } + for (const [method, path] of MIX_REQUESTS) { + const seen = await nodeRequestWithHeaders(port, method, path); + out.push({ adapter: 'node', method, path, ...seen }); + } + return out; + } finally { + await teacup.close(); + await teapot.close(); + } +} + +function nodeRequestWithHeaders(port: number, method: string, path: string) { + return new Promise<{ status: number; headers: Record; body: string }>((resolve, reject) => { + const req = http.request({ host: '127.0.0.1', port, method, path, agent: false }, (res) => { + let body = ''; + res.setEncoding('utf8'); + res.on('data', (chunk) => (body += chunk)); + res.on('end', () => { + const headers = Object.entries(res.headers).map(([k, v]): [string, string] => [ + k, + Array.isArray(v) ? v.join(', ') : String(v), + ]); + resolve({ status: res.statusCode ?? 0, headers: stableHeaders(headers), body }); + }); + }); + req.on('error', reject); + req.end(); + }); +} + +describe('router parity: owner-requested application cases', () => { + let fetchApp: App; + let nodeApp: App; + let port: number; + + beforeAll(async () => { + fetchApp = createApp({ modules: [CrossAllowModule] }); + nodeApp = createApp({ modules: [CrossAllowModule] }); + port = ((await nodeApp.listen(0)).address() as AddressInfo).port; + }); + + afterAll(() => nodeApp.close()); + + it('cross-pattern Allow through app.fetch and Node equals the frozen capture', async () => { + const run = async () => { + const out: Array = []; + for (const [method, path] of ALLOW_REQUESTS) + out.push({ adapter: 'fetch', ...(await fetchRequest(fetchApp, method, path)) }); + for (const [method, path] of ALLOW_REQUESTS) + out.push({ adapter: 'node', ...(await nodeRequest(port, method, path)) }); + return out; + }; + const expected = await frozen('owner-app-allow', run); + expectFrozenEqual(await run(), expected, 'cross-pattern Allow'); + }); + + it('the mesh HTTP route table across a peer lifetime equals the frozen capture', async () => { + const expected = await frozen('owner-mesh-lifetime', meshLifetimes); + expectFrozenEqual(await meshLifetimes(), expected, 'mesh lifetime'); + }, 30_000); + + it('local and remote routes on one path: Allow union, precedence and remote implicit HEAD equal the frozen capture', async () => { + const expected = await frozen('owner-mesh-allow', mixedTable); + expectFrozenEqual(await mixedTable(), expected, 'mesh local/remote mix'); + }, 30_000); +}); diff --git a/test/router-parity/ws.test.ts b/test/router-parity/ws.test.ts new file mode 100644 index 0000000..f3bb3a1 --- /dev/null +++ b/test/router-parity/ws.test.ts @@ -0,0 +1,183 @@ +/** + * WebSocket upgrade parity, kept apart from HTTP on purpose: WS selection is first-registered-wins + * 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). + */ +import 'reflect-metadata'; +import type { AddressInfo } from 'net'; +import WebSocket from 'ws'; +import { describe, it, beforeAll, afterAll } from 'vitest'; +import { createApp, Route, Get, Post, Ws, Stream, Module, param } from '../../src/index'; +import { channel } from '../../src/channel'; +import type { App } from '../../src/app/types'; +import type { WsRequest, WsSocket } from '../../src/http/ws-core'; +import { frozen, expectFrozenEqual } from './frozen'; + +const announce = (id: string, params: Record) => + (async function* () { + yield { id, params }; + })(); + +@Route('/') +class ParityWs { + // Registered before the static twin: WS does not rank, so this one answers /live/lobby. + @Ws('/live/:room') liveRoom(@param() p: Record) { + return announce('liveRoom', p); + } + @Ws('/live/lobby') liveLobby(@param() p: Record) { + return announce('liveLobby', p); + } + // Same path as the WS routes, different method, so the boot accepts it; it must not take upgrades. + @Post('/live/lobby') httpLobby() { + return { id: 'httpLobby' }; + } + @Get('/plain') plain() { + return { id: 'plain' }; + } + // `negotiate` routes are registered for both HTTP and WS. + @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); + } +} + +@Module({ mountpoint: '/', controllers: [ParityWs] }) +class ParityWsModule {} + +// The `ws` client runs its URL through the URL parser, so on the Node rows dot segments are already +// resolved before the server sees them; `app.upgrade` receives each path exactly as written here. +const UPGRADE_PATHS = [ + '/live/lobby', + '/live/kitchen', + '/live/lobby/', + '/live/x/../lobby', + '/live/a%20b', + '/live/lobby?x=1', + '/live/%E0%A4%A', + '/live//lobby', + '/plain', + '/nope', + '/feed', + '/__mesh__/control', +]; + +const HTTP_REQUESTS: Array<[string, string]> = [ + ['GET', '/live/lobby'], + ['POST', '/live/lobby'], + ['OPTIONS', '/live/lobby'], + ['GET', '/live/kitchen'], + ['GET', '/feed'], +]; + +interface UpgradeOutcome { + path: string; + sent: unknown[]; + closes: Array<{ code?: number; reason?: string }>; +} + +async function viaAppUpgrade(app: App, path: string): Promise { + const inbound = channel(); + const ac = new AbortController(); + const sent: unknown[] = []; + const closes: Array<{ code?: number; reason?: string }> = []; + let open = true; + const socket: WsSocket = { + inbound, + abort: ac.signal, + get isOpen() { + return open; + }, + send: (data) => sent.push(JSON.parse(data)), + close: (code, reason) => { + open = false; + closes.push({ code, reason }); + ac.abort(); + }, + terminate: () => { + open = false; + ac.abort(); + }, + }; + const request: WsRequest = { url: path, headers: {}, protocol: 'http', ip: '127.0.0.1' }; + await app.upgrade(request, socket); + return { path, sent, closes }; +} + +interface NodeUpgradeOutcome { + path: string; + status?: number; + sent: unknown[]; + close?: { code: number; reason: string }; +} + +function viaNodeUpgrade(port: number, path: string): Promise { + return new Promise((resolve) => { + const sent: unknown[] = []; + const client = new WebSocket(`ws://127.0.0.1:${port}${path}`); + client.on('unexpected-response', (_req, res) => { + resolve({ path, status: res.statusCode, sent }); + res.resume(); + client.terminate(); + }); + client.on('message', (data) => sent.push(JSON.parse(String(data)))); + client.on('close', (code, reason) => resolve({ path, status: 101, sent, close: { code, reason: String(reason) } })); + client.on('error', () => { + /* reported through unexpected-response or close */ + }); + }); +} + +describe('router parity: WebSocket upgrade outcomes', () => { + let app: App; + let nodeApp: App; + let port: number; + + beforeAll(async () => { + app = createApp({ modules: [ParityWsModule] }); + nodeApp = createApp({ modules: [ParityWsModule] }); + const server = await nodeApp.listen(0); + port = (server.address() as AddressInfo).port; + }); + + afterAll(async () => { + await nodeApp.close(); + }); + + it('app.upgrade outcomes equal the frozen capture', async () => { + const run = async () => { + const out: UpgradeOutcome[] = []; + for (const path of UPGRADE_PATHS) out.push(await viaAppUpgrade(app, path)); + return out; + }; + const expected = await frozen('ws-app-upgrade', run); + expectFrozenEqual(await run(), expected, 'app.upgrade'); + }); + + it('Node upgrade listener outcomes equal the frozen capture', async () => { + const run = async () => { + const out: NodeUpgradeOutcome[] = []; + for (const path of UPGRADE_PATHS) out.push(await viaNodeUpgrade(port, path)); + return out; + }; + const expected = await frozen('ws-node-upgrade', run); + expectFrozenEqual(await run(), expected, 'node upgrade'); + }); + + it('plain HTTP requests at the WS paths equal the frozen capture', async () => { + const run = async () => { + const out: Array<{ method: string; path: string; status: number; allow: string | null; body: string }> = []; + for (const [method, path] of HTTP_REQUESTS) { + const res = await app.fetch(new Request(`http://parity.test${path}`, { method })); + out.push({ method, path, status: res.status, allow: res.headers.get('allow'), body: await res.text() }); + } + return out; + }; + const expected = await frozen('ws-http-same-path', run); + expectFrozenEqual(await run(), expected, 'http at ws paths'); + }); +});