Skip to content

(janitor/dead-code): delete dead mcp-gateway routes.schema re-export - #6632

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dead-code-mcp-gateway-routes-schema
Sep 25, 2026
Merged

kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dead-code-mcp-gateway-routes-schema

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

What was deleted

services/mcp-gateway/src/schemas/routes.schema.ts — a single 6-line file that only re-exported UserConnectRouteParamsSchema, OrgConnectRouteParamsSchema, and their inferred types from @kilocode/mcp-gateway. Its parent src/schemas/ directory was also removed (now empty).

Evidence it was unreachable

  • Repository-wide searches for routes.schema, schemas/routes, and the re-exported symbols found zero references outside the file itself (ripgrep over services/, packages/, apps/, scripts/, dev/, and all config files).
  • The only consumers of these schemas — services/mcp-gateway/src/handlers/connect.handler.ts and services/mcp-gateway/src/handlers/protected-resource.handler.ts — import them directly from @kilocode/mcp-gateway, not from this file.
  • The file is a leftover from feat(mcp-gateway): implement OAuth runtime gateway (#3717); it is a pure re-export with no module-level side effects, so deleting it cannot remove any initialization or behavior.

Dynamic and configured entry points checked

  • Worker entry is src/mcp-gateway.worker.ts (wrangler.jsonc main); it does not import schemas/.
  • No wrangler.jsonc bindings, Durable Objects, queues, cron triggers, alarms, RPC, or migrations reference the file (only MCPGatewayInstance DO and v1 SQLite migration, both unrelated).
  • services/mcp-gateway/package.json has no exports/files map referencing it.
  • tsconfig.json include is a broad src/**/*.ts glob, not a per-file reference.
  • No dynamic import() or require() references it.

Contract and compatibility considerations

  • @kilocode/mcp-gateway package still exports the schemas from src/routes.ts via its index.ts; no public contract is changed.
  • No persisted data, migration, or rollback path depends on this file (it defines no schema, just re-exports existing ones).

Validation performed

  • pnpm --filter cloudflare-mcp-gateway run typecheck — clean before and after.
  • pnpm --filter cloudflare-mcp-gateway run test — 18 passed before and after.
  • pnpm --filter cloudflare-mcp-gateway run lint — 0 warnings / 0 errors.
  • git diff --check — clean.

services/mcp-gateway/src/schemas/routes.schema.ts only re-exports route
param schemas from @kilocode/mcp-gateway and has no importers, side
effects, or config references. Handlers already import these schemas
directly from the package.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 23, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 23, 2026 07:58
@kilo-code-bot

kilo-code-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Single-file dead-code deletion of an unreferenced 6-line re-export; repository-wide search confirms no importers, and remaining consumers import these schemas directly from @kilocode/mcp-gateway, so the change is safe.

Files Reviewed (1 file)
  • services/mcp-gateway/src/schemas/routes.schema.ts (deleted)

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

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

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant