Skip to content

fix(runtime): mount /mcp and /keys HTTP routes — were unreachable (ADR-0036)#1631

Merged
xuyushun441-sys merged 1 commit into
mainfrom
fix/mount-mcp-keys-routes
Jun 6, 2026
Merged

fix(runtime): mount /mcp and /keys HTTP routes — were unreachable (ADR-0036)#1631
xuyushun441-sys merged 1 commit into
mainfrom
fix/mount-mcp-keys-routes

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

What

The dispatcher mounts HTTP routes explicitly (no catch-all). #1626 (MCP transport) and #1630 (key-gen) added branches inside dispatch() but never registered the matching server.<verb>() routes — so /api/v1/mcp and /api/v1/keys 404'd at the HTTP layer before reaching the dispatcher. Unit tests called the handlers directly, which hid the gap; it surfaced in live staging e2e (generic {"error":"Not found"}, no routes.mcp in discovery).

Fix

  • Register /mcp (GET/POST/DELETE → dispatch(), transport reads the method) and /keys (POST) in the dispatcher plugin, routed through dispatch() so the host's project-aware kernel swap + executionContext resolution run first.
  • dispatcher-plugin.routes.test.ts — the regression test that asserts the routes are registered (would have caught this).

Verify

Full runtime suite 379 green; tsc clean. After merge + cloud bump + a fresh env spawn, /api/v1/mcp and /api/v1/keys are reachable on staging.

🤖 Generated with Claude Code

…R-0036)

The dispatcher mounts routes explicitly (no catch-all). #1626 (MCP transport)
and #1630 (key-gen) added dispatch() branches but never registered the HTTP
routes, so /api/v1/mcp and /api/v1/keys 404'd at the HTTP layer before reaching
the dispatcher. Unit tests called handlers directly, hiding it; caught in live
staging e2e.

- Register /mcp (GET/POST/DELETE) + /keys (POST) via dispatch() in the
  dispatcher plugin (transport reads the method from the request).
- dispatcher-plugin.routes.test.ts asserts the registrations (the missing
  regression). Full runtime suite 379 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys xuyushun441-sys merged commit 0ec7717 into main Jun 6, 2026
1 of 2 checks passed
@xuyushun441-sys xuyushun441-sys deleted the fix/mount-mcp-keys-routes branch June 6, 2026 23:26
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 6, 2026 11:26pm

Request Review

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

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants