Skip to content

gut: delete dead LLM provider code + zero-caller stubs#2364

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/dead-stubs-2363
Apr 15, 2026
Merged

gut: delete dead LLM provider code + zero-caller stubs#2364
alexey-pelykh merged 1 commit intomainfrom
gut/dead-stubs-2363

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

Closes #2363

  • Delete 7 MBP violation files (dead LLM provider code — ~730 lines):
    extensions/qwen-portal-auth/, ollama-stream.ts, model-auth-markers.ts,
    provider-auth-result.ts, minimax-portal-auth.ts, google-gemini-cli-auth.ts,
    qwen-portal-auth.ts
  • Delete 15 compiler-verified zero-caller stubs (~430 lines):
    cloudflare-ai-gateway, huggingface-models, models-config.providers,
    skills-install-extract, synthetic-models, together-models, venice-models,
    clawbot-cli, memory/index, memory/internal, memory-core, memory-lancedb,
    provider-env-vars, ui/controllers/skills
  • Clean up all config references across package.json, tsdown.config.ts,
    vitest.config.ts, release-check.ts, write-plugin-sdk-entry-dts.ts,
    check-no-raw-channel-fetch.mjs, check-plugin-sdk-exports.mjs, and
    subpaths.test.ts

22 files deleted, 1,161 lines removed, zero breakage.

Scope note

The issue targets 66 zero-caller stubs + 6 MBP violations (72 total). This PR
addresses all 7 MBP violations and 15 zero-caller stubs (22 total). The
remaining ~50 EXCLUDE-STUB entries have callers from other stubs (forming
dead code chains where stub A imports stub B). Those require cascading
deletion and are tracked as separate follow-up work.

Test plan

  • pnpm check passes (format + typecheck + lint)
  • pnpm test passes (730 suites, 6427 tests)
  • Zero-caller status verified by pnpm tsgo after deletion — no
    "Cannot find module" errors for any deleted file

🤖 Generated with Claude Code

Remove 22 dead code files (1,161 lines) identified by disposition registry
deep audit:

MBP violations — dead LLM provider code:
- extensions/qwen-portal-auth/ (entire extension directory)
- src/agents/ollama-stream.ts (dead Ollama streaming impl, ~615 lines)
- src/agents/model-auth-markers.ts (dead credential type constants)
- src/plugin-sdk/provider-auth-result.ts (LLM OAuth builder)
- src/plugin-sdk/minimax-portal-auth.ts (dead SDK re-exports)
- src/plugin-sdk/google-gemini-cli-auth.ts (dead SDK re-exports)
- src/plugin-sdk/qwen-portal-auth.ts (dead SDK re-exports)

Zero-caller stubs (compiler-verified zero callers):
- src/agents/{cloudflare-ai-gateway,huggingface-models,models-config.providers,
  skills-install-extract,synthetic-models,together-models,venice-models}.ts
- src/clawbot-cli.ts, src/memory/{index,internal}.ts
- src/secrets/provider-env-vars.ts
- src/plugin-sdk/{memory-core,memory-lancedb}.ts
- ui/src/ui/controllers/skills.ts

Also cleans up all references in: package.json exports, tsdown/vitest config,
release-check, write-plugin-sdk-entry-dts, check-no-raw-channel-fetch
allowlist, check-plugin-sdk-exports, and subpaths.test.ts.

Remaining ~95 EXCLUDE-STUB entries with live callers (forming dead code
chains where stubs import other stubs) are tracked separately.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) April 15, 2026 19:45
@alexey-pelykh alexey-pelykh merged commit 3b48061 into main Apr 15, 2026
12 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/dead-stubs-2363 branch April 15, 2026 19:53
alexey-pelykh added a commit that referenced this pull request Apr 21, 2026
…ns RPC + dangling gateway methods (#2413)

Closes the final AC grep gaps from #2337 after the provider/model cascade
landed via #2350 / #2364 / #2373. Three classes of survivors removed:

- Stale `vi.mock("../agents/model-catalog.js", ...)` block in
  `remoteclaw-tools.session-status.test.ts` — mocks a module deleted in #2350
- Dangling gateway method-list entries for handlers removed in #2350 —
  `skills.bins`, `models.list` in method-scopes.ts; `models.list`,
  `skills.status`, `skills.bins`, `skills.install`, `skills.update` in
  server-methods-list.ts
- Active runtime call to `skills.bins` RPC in `node-host/runner.ts` that
  fails at node-host startup (handler was removed in #2350). Deletes the
  `SkillBinsCache` class, `resolveSkillBinTrustEntries` + `resolveExecutablePathFromEnv`
  helpers, the RPC call, and cascades the dead `SkillBinsProvider` /
  `SkillBinTrustEntry` types from `invoke-types.ts` + `invoke.ts` handler
  signature cleanup

Also bumps `.fork-boundary-mock-baseline` 134 → 133 to lock in the
improvement from removing the dead model-catalog mock.

Verification:
- `git grep "model-catalog\|modelSupportsVision\|loadModelCatalog" src/` → zero
- `git grep "models\.list\|skills\.bins\|skillsHandlers\|modelsHandlers" src/` → zero
- `pnpm check` passes, `pnpm test` passes (7010/7010), zombie-import gate passes

Part of #2337.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 21, 2026
…ns RPC + dangling gateway methods (#2413) (#2448)

Closes the final AC grep gaps from #2337 after the provider/model cascade
landed via #2350 / #2364 / #2373. Three classes of survivors removed:

- Stale `vi.mock("../agents/model-catalog.js", ...)` block in
  `remoteclaw-tools.session-status.test.ts` — mocks a module deleted in #2350
- Dangling gateway method-list entries for handlers removed in #2350 —
  `skills.bins`, `models.list` in method-scopes.ts; `models.list`,
  `skills.status`, `skills.bins`, `skills.install`, `skills.update` in
  server-methods-list.ts
- Active runtime call to `skills.bins` RPC in `node-host/runner.ts` that
  fails at node-host startup (handler was removed in #2350). Deletes the
  `SkillBinsCache` class, `resolveSkillBinTrustEntries` + `resolveExecutablePathFromEnv`
  helpers, the RPC call, and cascades the dead `SkillBinsProvider` /
  `SkillBinTrustEntry` types from `invoke-types.ts` + `invoke.ts` handler
  signature cleanup

Also bumps `.fork-boundary-mock-baseline` 134 → 133 to lock in the
improvement from removing the dead model-catalog mock.

Verification:
- `git grep "model-catalog\|modelSupportsVision\|loadModelCatalog" src/` → zero
- `git grep "models\.list\|skills\.bins\|skillsHandlers\|modelsHandlers" src/` → zero
- `pnpm check` passes, `pnpm test` passes (7010/7010), zombie-import gate passes

Part of #2337.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Dead LLM provider code + zero-caller stubs cleanup

1 participant