test(route-parity): declared===enforced gate + honest standalone hono discovery (#3369)#3386
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 17 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
force-pushed
the
claude/route-parity-discovery-advertised-p2zv5e
branch
from
July 21, 2026 14:45
c2819f4 to
f95356f
Compare
…3369) Adds the "boot-the-real-server" route-parity gate #3369 calls for, rebased onto main after the #3361 Server-Timing fix (#3384) and the notifications mark-read e2e (#3388) landed independently. Keeps only the net-new, non-overlapping work. - runtime: route-parity e2e gate (`route-parity.integration.test.ts`). Boots the real hono app the way `os serve` mounts it (hono server + dispatcher plugin, services provisioned), reads `/api/v1/discovery`, and asserts every advertised / dispatcher-registered route is reachable (never 404/405/501) for an anonymous AND an admin principal, and that discovery is service-aware in both directions (no dead advertisement). Closes the "works in the dispatcher, dead on os serve" class (#3361/#3362/MCP 501) with one test. Does not duplicate the Server-Timing (#3384) / notifications mark-read (#3388) / REST `/data`·`/meta`·`/ui` (@objectstack/client) coverage. - http-dispatcher: document why `routes.mcp` is advertised on the `isMcpServerEnabled()` flag (the #2698 auto-load lockstep) rather than gated on service presence — comment only, keeps the dispatcher symmetric with @objectstack/rest. Test + comment only; no runtime code changes (no-release changeset). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015si15Q1KWMKpVQWYsEvgcS
os-zhuang
force-pushed
the
claude/route-parity-discovery-advertised-p2zv5e
branch
2 times, most recently
from
July 21, 2026 14:51
f95356f to
a40d0bf
Compare
os-zhuang
marked this pull request as ready for review
July 21, 2026 15:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The route-parity
declared === enforcedgate for HTTP routes #3369 asks for — the "one boot-the-real-server test" that closes the class of "works in the dispatcher, dead onos serve" bugs (#3361, #3362, MCP 501).Rebased & slimmed. While this was in flight, the two underlying fixes landed independently on
main:Server-Timing) → fix(server-timing): emit admin-gated per-request Server-Timing on the standard server (#3361) #3384, with a more correct fix (opens the disclosure gate inRestServer.resolveExecCtx, since@objectstack/restshadows the hono plugin's own CRUD onos serve; homesisPerfDisclosurePrincipalin@objectstack/observability).So this PR now carries only the net-new, non-overlapping work: the discovery route-parity gate.
Changes
1. Route-parity e2e gate (
packages/runtime/src/route-parity.integration.test.ts).Boots the real hono app the way
os servemounts it (hono server + dispatcher plugin, services provisioned), opens a socket, reads/api/v1/discovery, and asserts:/notifications,/notifications/read[/all],/mcp,/health,/ready);It deliberately does not duplicate the Server-Timing coverage (#3384's
server-timing-e2e.test.ts/rest-server-timing.test.ts), the notifications mark-read coverage (#3388), or the REST-owned/data·/meta·/uicoverage (@objectstack/clientintegration suite).2. Documented the MCP discovery lockstep (
http-dispatcher.ts, comment-only): whyroutes.mcpis advertised on theisMcpServerEnabled()flag (the #2698 auto-load lockstep) rather than gated on service presence — keeps the dispatcher symmetric with@objectstack/rest.Test + comment only; no runtime code changes (no-release changeset).
Verification
@objectstack/runtime: route-parity gate green;@objectstack/plugin-hono-server+@objectstack/clientsuites green locally.eslint/tsc --noEmitclean.Note
An earlier revision also trimmed the standalone
HonoServerPlugindiscovery to advertise only its mounted routes (/data+/auth/me/*). That was dropped: it's a shadowed fallback path (never served under realos serve), and it changed a discovery contract the@objectstack/clientsuite depends on (client.hono.test.tsexpectsmetadataadvertised). Not worth altering a cross-package contract for a shadowed path; can be revisited deliberately if desired.Refs: #3369, #3361 (fixed in #3384), #3362 (#3354 / #3388), #2698, #3358.
🤖 Generated with Claude Code
https://claude.ai/code/session_015si15Q1KWMKpVQWYsEvgcS