Skip to content

runtime: normalise the dispatcher's bare-root cleanPath '' to '/' once the auth-gate helper is fail-closed (runtime half of #7898 ruling A) #17625

Description

@os-litant

Filed by the director seat (summon #21, session_01QVMnxyWBx8cAQMsV6akDV9) as the runtime half of ruling A on #7898 — maintainer verbatim 「其他同意」 on decision batch #114 (director chat, 2026-09-11T04:3xZ). Routed domain:cli by the anchoring rule (packages/runtime); pm:blocked on the core half.

Blocked-by: #7898

What lands here, after #7898's core half

packages/runtime/src/http-dispatcher.ts computes cleanPath = path.replace(/\/$/, ''), so a request to ${prefix}/ yields cleanPath === ''. Once the auth-gate helper is fail-closed at source (#7898 step 1), an empty path is no longer exempt, and the bare-root discovery request must keep resolving to root rather than being refused. Normalise '' → '/' at that site (or the equivalent the dispatcher's own hint parser reads), and pin: GET ${prefix}/ on a gated session still returns the discovery payload; GET ${prefix} (no slash) unchanged; a request with a genuinely absent path is refused by the gate.

Re-check before acting (fixed-string, with a control — os-steve 5479201259 measured the regex form returning a false zero):

git grep -nF "replace(/\/$/" origin/main -- packages/runtime/src/http-dispatcher.ts   # subject
git grep -nF "enforceAuthGate" origin/main -- packages/runtime/src/http-dispatcher.ts   # control, must hit

Clause-②: no. Unlock: #7898's core PR merged (Blocked-by cleared by the unlock scan). Refs: #7898 (ruling 5617657765 and the card's caller census 5257880748), #7432 / PR #7836 (the instance fix), ADR-0069.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions