feat(router)!: fail boot on unreachable or ambiguous constrained params (CARD-13, #127) #132

Merged
chrnx merged 3 commits from feature/fprd-001b-constraint-ambiguity into develop 2026-10-14 02:22:30 +00:00
Showing only changes of commit e41d9560ba - Show all commits
+5 -1
View File
@@ -32,7 +32,11 @@ class ParityHttp {
@Get('/n/:num(\\d+)') nNum(@param() p: Record<string, string>) {
return reply('nNum', p);
}
@Get('/n/:code([0-9a-f]+)') nCode(@param() p: Record<string, string>) {
// Was `[0-9a-f]+`, overlapping `\d+` above: an equal-rank tie settled by registration order.
// CARD-13 (#127) makes that pair a boot error, so the app can no longer declare it; the tie stays
// covered at matcher level (`matcher-hand.json`), which never boots an app. `[a-f]+` keeps both
// frozen requests — `/n/42` and `/n/ff` — answered exactly as captured.
@Get('/n/:code([a-f]+)') nCode(@param() p: Record<string, string>) {
return reply('nCode', p);
}
@Get('/files') files(@param() p: Record<string, string>) {