Skip to content

Delete dead code across the repo - #189

Merged
sdcarlson merged 2 commits into
mainfrom
chore/delete-dead-code
Nov 1, 2026
Merged

sdcarlson merged 2 commits into
mainfrom
chore/delete-dead-code

Conversation

@sdcarlson

Copy link
Copy Markdown
Collaborator

Summary

Removes ~4,900 lines of dead code (175 files, +651/−4911), in two commits:

  1. Delete the unreachable capability-provider subsystem: providers/ (bring, managed, maxun, mcp, openapi, fromManifest), admission.ts, provider.ts, mcp.ts, mcpClient.ts and bring.ts. Only each other and their own tests imported these; no production, script or e2e path reached them. Drops @modelcontextprotocol/client and @modelcontextprotocol/server. Tests that used providers as fixture builders now seal manifests directly. This commit passes typecheck, lint and tests on its own, so it can be reverted cleanly if the subsystem is still wanted.
  2. Delete dead code across the repo:
    • Code that only its own tests used, e.g. searchApiIndex, exportSnapshot, routeWires, resolveBlockIcon, createLLMService, modelIntentCompiler and validateAllTemplates.
    • Branches that can never run:
      • the create-intent destructive gate (create intents are always destructive: false)
      • polymarket/newsapi focus formatting (real block IDs look like polymarket_live_odds)
      • summaryOnly/timeWindow wire filtering (nothing sets these options)
    • The write-only speech-timing module.
    • Unused aliases, getters and props, duplicate default exports, two unused barrel files, a stale CSS variable and commented-out code.
    • About 90 exports that nothing outside their own file uses are now file-private.

How it was found

A knip pass, then per-area dead-code hunters with an adversarial verifier for each area. The verifiers rejected 6 candidates as live behavior: the MCP/async runtime binds in execute.ts, the MindPanel Graph tab, the "Change Aesthetic" command and Polymarket resume. Those were kept.

Test plan

  • npm run typecheck is clean
  • npm run lint has 0 errors and the same 5 warnings as before
  • npm test: 1573 passed, 29 skipped
  • npm run build succeeds

🤖 Generated with Claude Code

sdcarlson and others added 2 commits October 31, 2026 18:24
providers/ (bring, managed, maxun, mcp, openapi, fromManifest), admission.ts,
provider.ts, mcp.ts, mcpClient.ts and bring.ts were only imported by each
other and their own tests; no production, script or e2e path reached them.
Drops @modelcontextprotocol/client and @modelcontextprotocol/server with them.
Tests that used the providers as fixture builders now seal manifests directly.
DESIGN.md updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Remove test-only production code (searchApiIndex, exportSnapshot,
  getCapability/listCapabilities, routeWires, resolveBlockIcon,
  createLLMService, modelIntentCompiler, validateAllTemplates, ...)
- Remove unreachable branches (create-intent destructive gate,
  polymarket/newsapi focus formatting, summaryOnly/timeWindow wire filtering)
- Remove the write-only speech timing module and its plumbing
- Remove unused aliases, getters, props, duplicate default exports,
  two unused index.ts barrels, a stale CSS variable and commented-out code
- Make ~90 exports used only within their own file module-private

Found per area and adversarially verified; typecheck, lint, tests and
production build all pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T01:26:41.056956Z 316b5e6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sdcarlson
sdcarlson merged commit 8a21350 into main Nov 1, 2026
5 checks passed
@sdcarlson
sdcarlson deleted the chore/delete-dead-code branch November 1, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant