Skip to content

fix: compile deterministic routes and diagnose ambiguous paths - #13

Merged
WilliamRagstad merged 3 commits into
codex/http-harness-20261025from
codex/route-specificity-20261025
Oct 25, 2026
Merged

WilliamRagstad merged 3 commits into
codex/http-harness-20261025from
codex/route-specificity-20261025

Conversation

@WilliamRagstad

Copy link
Copy Markdown
Member

Route selection previously sorted only by length after hash-map iteration, so a generic route could hide a literal one. Compile a deterministic table using left-to-right literal > parameter > wildcard precedence. Reject equivalent route shapes with both source locations and warn about crossing overlaps. Match complete paths and keep matching data in Rust until the owning V8 runtime is selected.

PR 2 of 4; depends on #12. Refs #8. Documents exact matching, wildcard, method, and raw-string parameter behavior. Bodyless write routes are valid, fixing a missing-body diagnostic panic.

Validation: cargo test --locked — 4 passed, including reversed declaration/module order, nested locations, method separation, wildcard fallbacks, missing segments, and duplicate/ambiguous route diagnostics.

@WilliamRagstad
WilliamRagstad marked this pull request as ready for review October 25, 2026 22:15
@WilliamRagstad
WilliamRagstad merged commit f2ba5de into codex/http-harness-20261025 Oct 25, 2026
1 check passed
@WilliamRagstad
WilliamRagstad deleted the codex/route-specificity-20261025 branch October 25, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant