Skip to content

Commit 926f4ad

Browse files
os-zhuangclaude
andauthored
docs(hono): verdict anchor on the catch-all — read ADR-0076 OQ#9 before splitting into per-prefix mounts (#3608) (#3637)
The first place anyone (human or agent) tempted to "fix" the catch-all looks is this line, not the issue tracker. Anchor the #3576 verdict and the #2852 RLS-leak failure mode here; reopen conditions stay archived on #3608 (closing as deliberately-unscheduled). Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 313d7be commit 926f4ad

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/adapters/hono/src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,16 @@ export function createHonoApp(options: ObjectStackHonoOptions): Hono {
359359
// ─── Catch-all: delegate to dispatcher.dispatch() ─────────────────────────
360360
// Handles meta, data, packages, analytics, automation, i18n, ui, openapi,
361361
// custom API endpoints, and any future routes added to HttpDispatcher.
362+
//
363+
// DELIBERATE SHAPE — read before "improving" this into explicit per-prefix
364+
// mounts (ADR-0076 OQ#9 verdict, #3576 / #3608): dispatch() is a thin
365+
// gates+registry pipeline (env resolution → identity → auth gate →
366+
// membership → scope strip, then a first-match DomainHandlerRegistry
367+
// lookup — enumerable via registry.list()). A naive split into
368+
// `app.all(prefix + domain + '/*')` mounts bypasses those cross-cutting
369+
// gate stages (the #2852 RLS-leak class: handlers running without an
370+
// ExecutionContext). Revisit only if the gate stages are middleware-ized
371+
// for an independent reason — reopen conditions are archived on #3608.
362372
app.all(`${prefix}/*`, async (c) => {
363373
try {
364374
const subPath = c.req.path.substring(prefix.length);

0 commit comments

Comments
 (0)