Observation filed while implementing #10710, which explicitly parked it: "Test doubles
outliving a removed route may be worth a finding — file it, do not fix it here."
The residue
/graphql was removed from the runtime dispatcher — packages/runtime/src/http-dispatcher.ts:2026
is // /graphql removed — GraphQL is not in the product plan (#2462 follow-on), and there is
no handleGraphQL anywhere in packages/runtime. Three test-side survivors still declare it:
packages/adapters/hono/src/__mocks__/runtime.ts:6 — handleGraphQL = vi.fn().mockResolvedValue({ data: {} });packages/adapters/hono/src/hono-wildcard-fallthrough.test.ts:37 — handleGraphQL: vi.fn(),packages/adapters/hono/src/hono.test.ts:10 — handleGraphQL: vi.fn().mockResolvedValue({ data: {} }),
Plus one stale comment on the code side:
Why it is worth a card rather than a shrug
A double that declares a method the real subject no longer has is a double that can never
diverge from the subject — the test asserting against it is pinned to a shape nothing
implements, and it stays green by construction. It also reads, to the next author grepping
handleGraphQL, as evidence that the runtime still has the method: the mock is the only
non-CHANGELOG hit in packages/** once #10710 lands, which is exactly how the doc claim
this came from survived as long as it did.
Whether the doubles should shrink is a real question, not an obvious yes — a wildcard
fall-through test may want a method the dispatcher does not route, precisely to prove it
falls through. That is worth someone deciding deliberately rather than by default. The
anonymous-deny.ts:7 comment has no such defence.
Related in kind, different defect: #9165 (a partial test double discovered only by deleting
the catch that hid it).
Back-links: #10710, #10583
Generated by Claude Code
Generated by Claude Code
Observation filed while implementing #10710, which explicitly parked it: "Test doubles
outliving a removed route may be worth a finding — file it, do not fix it here."
The residue
/graphqlwas removed from the runtime dispatcher —packages/runtime/src/http-dispatcher.ts:2026is
// /graphql removed — GraphQL is not in the product plan (#2462 follow-on), and there isno
handleGraphQLanywhere inpackages/runtime. Three test-side survivors still declare it:packages/adapters/hono/src/__mocks__/runtime.ts:6—handleGraphQL = vi.fn().mockResolvedValue({ data: {} });packages/adapters/hono/src/hono-wildcard-fallthrough.test.ts:37—handleGraphQL: vi.fn(),packages/adapters/hono/src/hono.test.ts:10—handleGraphQL: vi.fn().mockResolvedValue({ data: {} }),Plus one stale comment on the code side:
packages/core/src/security/anonymous-deny.ts:7— describes the anonymous-deny surfaces as"each surface (REST
/data, dispatcher/graphql+/meta, raw-hono/data)". Two ofthe three named surfaces are gone:
/graphqlwas removed, and the raw-hono/dataroutesleft in v17 (plugin-hono-server 的 registerStandardEndpoints 把「重复供给」和「独家供给」绑在同一个开关上 —— 拆开是退役的前置条件 #4073, per
content/docs/permissions/authorization.mdx:53).Why it is worth a card rather than a shrug
A double that declares a method the real subject no longer has is a double that can never
diverge from the subject — the test asserting against it is pinned to a shape nothing
implements, and it stays green by construction. It also reads, to the next author grepping
handleGraphQL, as evidence that the runtime still has the method: the mock is the onlynon-CHANGELOG hit in
packages/**once #10710 lands, which is exactly how the doc claimthis came from survived as long as it did.
Whether the doubles should shrink is a real question, not an obvious yes — a wildcard
fall-through test may want a method the dispatcher does not route, precisely to prove it
falls through. That is worth someone deciding deliberately rather than by default. The
anonymous-deny.ts:7comment has no such defence.Related in kind, different defect: #9165 (a partial test double discovered only by deleting
the
catchthat hid it).Back-links: #10710, #10583
Generated by Claude Code
Generated by Claude Code