Fixed in a2b71e2. walk now resets stackNodes and stackDepths to base in a finally, so a URIError from decodeSegment no longer leaves frames on the shared stack.
- **Regression…
Second-round review at 4de9f32 (follow-up to review #4): the deep-route regression is fixed. The iterative walk matches the frozen oracle on the 4,999-static-segment + /:x case, and the new buildFetch regression returns 200. I reviewed the revised traversal and retargeted mutants; Node 812/812, Deno 36/36, Bun 26/26, edge parity, lint (0 errors), format, typecheck, bench typecheck, build, complexity, and 21/21 mutants pass. No merge-blocking correctness issue found in this round.
Fixed in 5e0ae94. walk now runs on an explicit stack instead of recursion. Frames pop in the same order the recursive walk visited them: static child, then params in insertion order, then the…
P2 — deep valid routes now overflow the lookup stack (src/http/router.ts:554-575). The new walk recurses once per path segment without a depth limit. A GET route with 4,999 static segments followed by /:x and a matching 10,000-character URL succeeds in the frozen linear oracle (x === 'a'), but matchRoute throws RangeError: Maximum call stack size exceeded. I also reproduced the uncaught rejection through buildFetch(routes, undefined)(new Request(...)); this is a behavior regression for a route and URL the framework accepts. Static-only routes hide the issue through exactPaths. Please use an iterative traversal (or another approach that preserves matching for supported path depths) and add a regression case through the fetch adapter.