chrnx merged pull request Green-Tea/core#131 2026-10-12 20:10:46 +00:00
perf(router): reset the walk stack only when a lookup throws (#109)
chrnx pushed to develop at Green-Tea/core 2026-10-12 20:10:46 +00:00
d07d6add04 Merge pull request 'perf(router): reset the walk stack only when a lookup throws (#109)' (#131) from fix/router-walk-stack-reset into develop
1b30f15c02 perf(router): reset the walk stack only when a lookup throws
Compare 2 commits »
chrnx pushed to fix/router-walk-stack-reset at Green-Tea/core 2026-10-12 19:28:19 +00:00
1b30f15c02 perf(router): reset the walk stack only when a lookup throws
chrnx created branch fix/router-walk-stack-reset in Green-Tea/core 2026-10-12 19:28:18 +00:00
chrnx created pull request Green-Tea/core#131 2026-10-12 19:28:18 +00:00
perf(router): reset the walk stack only when a lookup throws (#109)
chrnx created pull request Green-Tea/core#130 2026-10-12 19:16:14 +00:00
test(router): record D4 lookup evidence and no miss-time recompilation (CARD-10, #109)
chrnx created branch feature/fprd-001b-lookup-evidence in Green-Tea/core 2026-10-12 19:15:45 +00:00
chrnx pushed to feature/fprd-001b-lookup-evidence at Green-Tea/core 2026-10-12 19:15:45 +00:00
c5c2c99b18 test(bench): record D4 lookup evidence for the radix router (CARD-10, #109)
b128139e2f test(router): prove misses after index build recompile nothing (CARD-10, #109)
Compare 2 commits »
chrnx created pull request Green-Tea/core#129 2026-10-12 19:00:22 +00:00
test(router): prove introspection parity after the radix index (CARD-09, #109)
chrnx pushed to feature/fprd-001b-introspection-parity at Green-Tea/core 2026-10-12 19:00:02 +00:00
fcee6892bf test(router): prove introspection parity after the radix index (CARD-09, #109)
chrnx created branch feature/fprd-001b-introspection-parity in Green-Tea/core 2026-10-12 19:00:02 +00:00
chrnx deleted branch feature/fprd-001b-radix-index from Green-Tea/core 2026-10-12 18:54:52 +00:00
chrnx pushed to develop at Green-Tea/core 2026-10-12 18:54:49 +00:00
cb123e3774 Merge pull request 'perf(router): radix index for HTTP route lookup (CARD-07, #109)' (#128) from feature/fprd-001b-radix-index into develop
a2b71e2472 fix(router): drop pending walk frames when a segment fails to decode
4de9f32e31 test(router-parity): retarget walk mutants to the iterative walk
5e0ae94ba2 fix(router): walk the radix index without recursion
996fb3f7a5 test(router-parity): retarget mutants to the radix index (owner-approved)
Compare 8 commits »
chrnx merged pull request Green-Tea/core#128 2026-10-12 18:54:48 +00:00
perf(router): index HTTP routes in a radix tree (CARD-07, #109)
chrnx commented on pull request Green-Tea/core#128 2026-10-12 18:49:03 +00:00
perf(router): index HTTP routes in a radix tree (CARD-07, #109)

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…
chrnx pushed to feature/fprd-001b-radix-index at Green-Tea/core 2026-10-12 18:48:38 +00:00
a2b71e2472 fix(router): drop pending walk frames when a segment fails to decode
chrnx commented on pull request Green-Tea/core#128 2026-10-12 18:38:19 +00:00
perf(router): index HTTP routes in a radix tree (CARD-07, #109)

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.

chrnx commented on pull request Green-Tea/core#128 2026-10-12 03:10:36 +00:00
perf(router): index HTTP routes in a radix tree (CARD-07, #109)

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…

chrnx pushed to feature/fprd-001b-radix-index at Green-Tea/core 2026-10-12 03:08:14 +00:00
4de9f32e31 test(router-parity): retarget walk mutants to the iterative walk
5e0ae94ba2 fix(router): walk the radix index without recursion
Compare 2 commits »
chrnx commented on pull request Green-Tea/core#128 2026-10-12 02:06:50 +00:00
perf(router): index HTTP routes in a radix tree (CARD-07, #109)

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.