Skip to content

fix(web): remove unused internal diagnostic endpoint - #7989

Merged
iscekic merged 1 commit into
mainfrom
drain/remove-diagnostic-endpoint
Oct 19, 2026
Merged

iscekic merged 1 commit into
mainfrom
drain/remove-diagnostic-endpoint

Conversation

@iscekic

@iscekic iscekic commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

bot: Removes an unused internal diagnostic API route from the web app.

Change

  • Deletes apps/web/src/app/api/milvus/test/route.ts (the whole apps/web/src/app/api/milvus/ directory; it contained only that file).
  • The route had no callers: not referenced by any client, test, script, or documentation (repo-wide search: no matches). The authenticated code-indexing tRPC routes already cover the same operations.
  • No other code changes. MilvusIndexStorage, getMilvusClient, and createEmbeddingService remain in use by the authenticated code-indexing routers.

Route surface review

Per review request, all route handlers under apps/web/src/app/api/ were checked against the standing requirement that each endpoint touching server state or credentials enforces authentication or a service-to-service secret:

  • Routes are gated as expected via the existing auth helpers, cron bearer secrets, internal service secrets with constant-time comparison, scoped callback tokens, and webhook signature verification.
  • Remaining public routes are public by design: marketplace catalogs, model stats, marketing tags, OpenAPI document, health checks, login/OAuth flows, and signed-token link flows.
  • No other route requires the same treatment in this change.

Verification

  • pnpm --filter web typecheck passes on the branch (tsgo, no errors).
  • Booted the web app locally on this VM against dev Postgres/Redis and exercised the surface:
    • GET /api/milvus/test?embed=hello&search=world → 404 (route gone).
    • GET /api/defaults → 200 (server live, other routes unaffected).
    • GET /api/up → live JSON health response.
  • No permanent tests added: the change is a deletion with no remaining references; existing suites for the package are untouched by the diff.

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: Scope: Plan: delete apps/web/src/app/api/milvus/test/route.ts (the whole apps/web/src/app/api/milvus/ directory — it contains only test/route.ts), no other repo references exist. Keep MilvusIndexStorage/getMilvusClient/createEmbeddingService for the authenticated code-indexing routers. Verify by grep, web typecheck, and booting the app locally to confirm the path now 404s while other API routes still answer. Agree?
    Answer: Widen scope
    Confidence: 0.50 · Precedent: Fix the root cause and the class of the issue: session 00eb2a1d3e4b, "if anything repeats the same mistake over and over again, fix the class"; session 89824a222897, "if you saw a gap, fix it"
  2. Question: Verify depth: Verification depth: the brief asks to confirm the route returns 404 after the change. I plan to boot the web app on this VM and curl the removed path plus a known-good route. Anything more?
    Answer: Local 404 check (Recommended)
    Confidence: 0.85 · Precedent: Run only the tests and lint for touched files: session 30e048f42118, "never run the full test suite, leave that for CI"

The endpoint served no purpose in production: it was not referenced by
any client, test, or script, and duplicated behavior already available
through the authenticated code-indexing routes.
@iscekic iscekic added drain Work item from the findings drain janitor:trust Janitor finding: trust boundary hardening labels Oct 19, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The PR deletes a single unused, unauthenticated diagnostic route (apps/web/src/app/api/milvus/test/route.ts); repo-wide search confirms no remaining references, and all imported symbols (getMilvusClient, MilvusIndexStorage, createEmbeddingService) remain used by authenticated code-indexing paths, so the change is safe.

Files Reviewed (1 file)
  • apps/web/src/app/api/milvus/test/route.ts - deleted; no issues

Verification notes: the deletion removes the whole apps/web/src/app/api/milvus/ directory. Grep found no references to api/milvus/test, /api/milvus, or milvus/test anywhere in the repo, and no middleware.ts entry mentions milvus. MilvusIndexStorage is still consumed via apps/web/src/lib/code-indexing/storage.ts, getMilvusClient via apps/web/src/app/api/internal/triage/check-duplicates/route.ts, and createEmbeddingService via the same two files, so no dangling imports result. The removed file is a whole-file deletion, which has no commentable RIGHT-side lines, so no inline comments were posted. The landing-page/SEO rules in the custom instructions do not apply (this repo is Kilo-Org/cloud, and the diff changes no pages).


Reviewed by deepseek-v4.1-flash · Input: 39.2K · Output: 2.2K · Cached: 200.1K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the merge:human Substantive functional risk requires human review. label Oct 19, 2026
@iscekic
iscekic enabled auto-merge October 19, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain janitor:trust Janitor finding: trust boundary hardening merge:human Substantive functional risk requires human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants