Skip to content

gut: eliminate callers and delete ~14 EXCLUDE-STUB files in src/auto-reply/#2373

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/delete-auto-reply-stubs-2368
Apr 16, 2026
Merged

gut: eliminate callers and delete ~14 EXCLUDE-STUB files in src/auto-reply/#2373
alexey-pelykh merged 1 commit intomainfrom
gut/delete-auto-reply-stubs-2368

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

  • Delete 14 EXCLUDE-STUB files in src/auto-reply/reply/ and eliminate all their callers
  • Delete 3 cascade files (targets.ts, shared.test.ts, memory-flush.test.ts) — dead code depending on deleted stubs
  • Remove commands-acp/ directory (empty after deletions)
  • Update 14 disposition entries: EXCLUDE-STUB → EXCLUDE-GUT

Stubs deleted (14)

commands-session-abort.ts, agent-runner-memory.ts, commands-acp.ts, commands-acp/context.ts, commands-acp/shared.ts, commands-approve.ts, commands-bash.ts, commands-compact.ts, commands-models.ts, dispatch-acp.ts, memory-flush.ts, message-preprocess-hooks.ts, post-compaction-context.ts, stage-sandbox-media.ts

Key caller changes

  • commands-core.ts: removed 7 handlers from HANDLERS array + dead ACP reset branch
  • dispatch-from-config.ts: restored send-policy-deny enforcement (was silently bypassed by stub)
  • agent-runner.ts: removed no-op memory flush + post-compaction context calls
  • discord/mattermost model picker: short-circuit to empty data (was crashing at runtime)

Closes #2368

Test plan

  • pnpm check passes (format + typecheck + lint)
  • pnpm test passes (730/730 suites, 6427 tests)
  • All 14 disposition entries updated
  • commands-acp/ directory removed

🤖 Generated with Claude Code

…reply/ (#2368)

Delete 14 EXCLUDE-STUB files and eliminate all their callers:

Stubs deleted:
- reply/commands-session-abort.ts (handleAbortTrigger, handleStopCommand)
- reply/agent-runner-memory.ts (runMemoryFlushIfNeeded)
- reply/commands-acp.ts (handleAcpCommand)
- reply/commands-acp/context.ts (resolveAcpCommandBindingContext)
- reply/commands-acp/shared.ts (parseSteerInput, SESSION_ID_RE)
- reply/commands-approve.ts (handleApproveCommand)
- reply/commands-bash.ts (handleBashCommand)
- reply/commands-compact.ts (handleCompactCommand)
- reply/commands-models.ts (handleModelsCommand, buildModelsProviderData)
- reply/dispatch-acp.ts (shouldBypassAcpDispatchForCommand, tryDispatchAcpReply)
- reply/memory-flush.ts (resolveMemoryFlushPromptForRun)
- reply/message-preprocess-hooks.ts (emitPreAgentMessageHooks)
- reply/post-compaction-context.ts (readPostCompactionContext)
- reply/stage-sandbox-media.ts (stageSandboxMedia)

Cascade deletions:
- reply/commands-acp/targets.ts (dead: depended on 2 deleted stubs)
- reply/commands-acp/shared.test.ts (test for deleted stub)
- reply/memory-flush.test.ts (test for deleted stub)
- Removed commands-acp/ directory (empty after deletions)

Caller simplifications:
- commands-core.ts: removed 7 stub handlers from HANDLERS array, removed
  dead ACP reset branch (would crash at runtime via undefined.channel)
- commands-session.ts: removed re-exports of abort/stop handlers
- agent-runner.ts: removed runMemoryFlushIfNeeded call (was silently
  resetting activeSessionEntry to undefined), removed readPostCompactionContext
  block (was always no-op)
- dispatch-from-config.ts: removed ACP dispatch bypass and both
  tryDispatchAcpReply call sites, restored send-policy-deny enforcement
- get-reply.ts: removed emitPreAgentMessageHooks and stageSandboxMedia calls
- discord/monitor/model-picker.ts: inlined empty ModelsProviderData type,
  loadDiscordModelPickerData returns empty data directly
- plugin-sdk/mattermost.ts: removed buildModelsProviderData re-export
- mattermost monitor/slash-http: short-circuit model picker to "No models
  available" (was crashing at runtime accessing undefined.providers)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) April 16, 2026 12:44
@alexey-pelykh alexey-pelykh merged commit c61609d into main Apr 16, 2026
12 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/delete-auto-reply-stubs-2368 branch April 16, 2026 12:52
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>
alexey-pelykh added a commit that referenced this pull request Apr 21, 2026
…ies (#2452)

Both `buildModelsProviderData` and `handleModelsCommand` entries referenced
`src/auto-reply/reply/commands-models.ts`, which was deleted in #2373
(commit c61609d). The audit script treats patterns whose files don't
exist as "resolved" (scripts/check-obsolescence-audit.mjs:294), so both
entries were already inert — removing them reduces dead tracking data
without changing audit coverage.

Total findings unchanged at 50 (50 stubs + 0 known patterns, baseline 134).

Sibling `handleModelsCommand` removed under the same root cause, confirmed
by user as in-scope for this cleanup even though #2452 names only
`buildModelsProviderData`.
alexey-pelykh added a commit that referenced this pull request Apr 21, 2026
…ies (#2452) (#2453)

Both `buildModelsProviderData` and `handleModelsCommand` entries referenced
`src/auto-reply/reply/commands-models.ts`, which was deleted in #2373
(commit c61609d). The audit script treats patterns whose files don't
exist as "resolved" (scripts/check-obsolescence-audit.mjs:294), so both
entries were already inert — removing them reduces dead tracking data
without changing audit coverage.

Total findings unchanged at 50 (50 stubs + 0 known patterns, baseline 134).

Sibling `handleModelsCommand` removed under the same root cause, confirmed
by user as in-scope for this cleanup even though #2452 names only
`buildModelsProviderData`.
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.

gut: eliminate callers and delete ~14 EXCLUDE-STUB files in src/auto-reply/

1 participant