refactor(v0.44): remove second request-time route winner semantics (#1215) - #1256
Merged
Conversation
…1215) Alpha.10 truth closure: generated request-time code owned a second matcher with a DIFFERENT precedence rule (specificity rank vs the canonical RouteTable declaration order) plus its own params decoding — client and server could pick different winners for the same path (divergence proven at base SHA: /:slug vs /about). Amendment authority: ADR-0151 (generated entry sections border the ADR-0122 §2/§3 frozen surface; Alpha.10 truth-closure scope, umbrella #1155). - generated code now exports isRequestTimePath(pathname): boolean — a derived, conservative-superset admission predicate over the shared URLPattern grammar; no winner selection, no params, no precedence - canonical winner semantics stay with App RouteTable (client) and the Hono entry registered in the same declaration order (server); the matchRequestTimeRoute contract is deleted - adversarial corpus proves one observable winner across RouteTable / admission predicate / Hono entry (declaration orders, optional, catch-all, method-specific, HEAD/GET, encoded/malformed/unsafe params, query collisions) Implemented by fresh kimi-code/k3-256k HIGH session (.agents/v044-kimi-implementer.md), packet A10.7. No publish, no tag.
Contributor
|
APIError: Insufficient Balance |
Deploying openelement with
|
| Latest commit: |
944c36a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://81b85188.lessjs.pages.dev |
| Branch Preview URL: | https://v044-a10-7-route-admission.lessjs.pages.dev |
… boundary gate (#1215) The gate parsed the deleted second-matcher route table ('{ path, paramNames, pattern }'); generated output now carries the derived isRequestTimePath admission patterns (new URLPattern({ pathname })). Update the parser + fixture test to the new shape. Verified against the real starter dist: deno task fullstack:boundary-check passes.
Contributor
|
APIError: Insufficient Balance |
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Issue #1215 (umbrella #1155, Alpha.10). Generated request-time code owned a second matcher:
renderRequestTimeRouteTablesorted by specificity rank andmatchRequestTimeRouteran first-match-wins with its own percent-decoding — precedence DIFFERENT from the canonical RouteTable's declaration order. Proven divergence at base SHA: corpus['/:slug'(rt), '/about'(rt)], path/about→ RouteTable winner/:slug, generated matcher winner/about.Owner
Route winner semantics: App RouteTable (client) + Hono entry registered in the same declaration order (server runtime). Generated code now owns ONLY admission:
isRequestTimePath(pathname): boolean, a derived conservative-superset predicate over the sharednormalizeRoutePatternForURLPatterngrammar. This PR REMOVES a semantic authority (winner selection/params/precedence in generated code).Amendment authority
ADR-0151 (generated entry sections border the ADR-0122 §2/§3 frozen surface; Alpha.10 truth-closure scope).
Evidence
request-time-admission-parity.test.ts: adversarial corpus across three surfaces (canonical RouteTable / admission predicate / Hono entry) — both declaration orders for/:slugvs/about, optional segments, catch-all, method-specific + HEAD/GET + 405, encoded/malformed/unsafe params (:__proto__), query collisions. Proves: one observable winner; admission === derived OR; no admission false-negative for request-time winners. Structural pins: nomatchRequestTimeRoute/sort/params/decoding in generated code.deno task testexit 0 (1663 + 150); all static gates green.matchRequestTimeRouteis gone.Risk
Sanctioned coarsening: a path admitted by a request-time pattern but canonically won by an earlier static route now reaches the server entry, which renders the same page (Hono order = declaration order, corpus-proven). Malformed encoded paths matching a request-time pattern reach the server as raw params (canonical no-crash semantics) instead of the old matcher's 400; non-admitted malformed paths still 400 in tryStatic (#823). Rollback: revert.