Skip to content

refactor(cli): drop the MCP exclusion no command could reach - #816

Merged
blafourcade merged 2 commits into
nextfrom
refactor/drop-unreachable-mcp-exclusion
Sep 10, 2026
Merged

refactor(cli): drop the MCP exclusion no command could reach#816
blafourcade merged 2 commits into
nextfrom
refactor/drop-unreachable-mcp-exclusion

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

🎯 What & why

aidd framework remove has carried a way to strip single MCP servers from a tool's config since the manifest learned excludedMcp. It was never reachable. The only caller passed an empty filter, no command could pass anything else, and an install records sectionKey: null, which the exclusion skipped. The maintainer chose to delete it rather than wire it (#806).

🛠️ How it works

  • Deleted UninstallMcpExclusionUseCase and manifest/mcp-exclusions.ts, along with mcpFilter and the runMcpExclusions branch of the uninstall use case.
  • Deleted the excludedMcp field and its accessors from the manifest and the tool entry, and McpExclusion/mcpExclusionEquals from tools/domain/mcp-exclusion.ts. That file keeps transformFor.
  • Deleted the tests and the fixture that exercised only the removed path, plus the skill doc line.
  • Manifests already on disk: a manifest that still carries excludedMcp loads as before and drops the field on its next write. That is what the parser already does with any field it does not know. MANIFEST_VERSION stays 8.
  • framework remove behaves the same for users. It never excluded anything.

🧪 How to verify

git grep -n "excludedMcp\|mcpFilter" -- cli/src      # nothing
cd cli && pnpm vitest run tests/contexts/framework/domain/manifest.unit.test.ts -t "still recorded MCP exclusions"
node scripts/run-mutation.mjs framework

The test "drops the exclusions on its next write" was red before the source change: the rewrite still held excludedMcp. It is green after.

Measured on this branch:

Gate Result
typecheck, lint, test:arch, knip, type honesty clean
unit and integration 376 files, 4994 tests passed
e2e 50 files, 297 tests passed
smoke FAIL 0, SKIP 1
bundle 641.7 KB of 654 KB
framework mutation 95.4, floor 93

⚠️ Heads-up

  • CI runs the tools mutation scope because tools/domain/mcp-exclusion.ts changed. It was not run locally. The deleted lines held 7 killed and 1 surviving mutant.
  • The name mcp-exclusion.ts is now misleading, since the file holds only the win32 MCP command transform. The rename is left out to keep this PR a pure deletion.
  • No golden snapshot changed, and the src comment count is unchanged.

🔗 Linked issue

Closes #806

✅ I certify

  • I have read the contributing guide and followed the PR template.
  • Tests were written red first where behaviour is pinned, and every gate listed above passed locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb

blafourcade and others added 2 commits September 10, 2026 10:10
`framework remove` was the only caller of UninstallUseCase and passed an
empty mcpFilter, so UninstallMcpExclusionUseCase never removed or recorded
anything, and nothing read the manifest's excludedMcp. Deleted: the use
case, the mcpFilter option, McpExclusion and its equality, the manifest's
exclusion methods and the excludedMcp member of a tool entry, with the
tests and the round-trip fixture that exercised only that path.

A manifest already carrying excludedMcp still loads: the tool-entry parser
reads named fields and ignores the rest, so the field is dropped on the
next write. The new test asserting the rewrite omits it failed before the
deletion (the rewrite still held excludedMcp) and passes after.

Measured: typecheck, lint, knip and the type-honesty check clean;
test:arch 126 passed; unit and integration 4994 passed; e2e 297 passed.

Refs #806

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb
AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
The framework skill's concept table named a module the previous commit
deleted.

Refs #806

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb
AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
@blafourcade
blafourcade requested a review from a team as a code owner September 10, 2026 08:21
@blafourcade
blafourcade merged commit dad8527 into next Sep 10, 2026
26 checks passed
blafourcade added a commit that referenced this pull request Sep 11, 2026
…es (#836)

`tools/domain/mcp-exclusion.ts` holds only `transformFor`, the transform of an
MCP server's launch command for the target platform. The exclusion it was
named for was deleted with #816, so the name pointed at a feature that no
longer exists. The module becomes `mcp-launch-command.ts`, with its test file,
its one import and its entry in the context-boundary public-module list.
No behaviour change.

Fixes #824


Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb
AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@blafourcade
blafourcade deleted the refactor/drop-unreachable-mcp-exclusion branch September 11, 2026 07:42
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