You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): the MCP exclusion strips nothing from a manifest a real install recorded #806
UninstallMcpExclusionUseCase rebuilds the manifest's merge entries for every merge file of the tool, not only the ones it edited, and it keys the rebuild on sectionKey. Every real install records sectionKey: null, so on a real project the use case removes MCP keys from disk and then strips nothing from the manifest's merge entries. Found by the mutation pass of #798; no test drives it with the manifest a real install writes.
Affected file(s)
cli/src/contexts/framework/application/uninstall/uninstall-mcp-exclusion-use-case.ts — execute calls rebuildMergeEntries(toolId, manifest, mcpFilter) for all merge files after processOneMergeFile touched a subset.
Expected behaviour
Only the merge entries of the files the use case edited are rewritten, and a manifest recorded by a real install (sectionKey: null) loses the excluded keys the same way a fixture with a section key does.
Observed behaviour
With sectionKey: null the manifest's merge entries are unchanged after the exclusion.
AI tool
Any tool declaring MCP merge files
aidd-cli version
5.2.2 (branch next)
OS
Any
Additional context
Surfaced in #804. The test to write first: a manifest as plugin install records it, then uninstall --mcp, then the merge entries no longer name the excluded keys.
Read before fixing, and the defect is larger than the title says.
framework remove is the only caller of UninstallUseCase, and it passes mcpFilter: [] (cli/src/presentation/commands/framework.ts:105). No command exposes an MCP filter, so UninstallMcpExclusionUseCase has run with an empty filter since the CLI moved into this repository (daeef56a): nothing is ever removed, and nothing is ever recorded.
Manifest.addExcludedMcp / excludedMcp is written by that use case and read by nothing outside manifest/tool-entry.ts: no install step consults it, so even a recorded exclusion would not keep an entry out.
The shape mismatch the title names is real too: real installs record MCP merge files with sectionKey: null and whole-top-level-key hashes (install-runtime-config-use-case.ts:187), while the exclusion expects per-server keys under a section, so the two would not meet even with a filter.
Two ways to close this, both a product call rather than a patch:
Wire it: framework remove --mcp <server…> passing the filter, installs recording MCP files under their entrySection (mcpServers) so per-server tracking exists, and an install step that honours excludedMcp.
Recommendation: 2, unless someone asked for per-server MCP removal. The feature has had no user-reachable entry point for its whole life here, and #804's 95 % floor now pins dead code.
Decision: delete. The exclusion was never reachable (no command passes a non-empty filter, nothing reads excludedMcp, installs record sectionKey: null), so it goes rather than gets wired. Work on refactor/drop-unreachable-mcp-exclusion; an existing manifest carrying excludedMcp must keep loading.
Activity
blafourcade commentedon Sep 10, 2026
Read before fixing, and the defect is larger than the title says.
framework removeis the only caller ofUninstallUseCase, and it passesmcpFilter: [](cli/src/presentation/commands/framework.ts:105). No command exposes an MCP filter, soUninstallMcpExclusionUseCasehas run with an empty filter since the CLI moved into this repository (daeef56a): nothing is ever removed, and nothing is ever recorded.Manifest.addExcludedMcp/excludedMcpis written by that use case and read by nothing outsidemanifest/tool-entry.ts: no install step consults it, so even a recorded exclusion would not keep an entry out.sectionKey: nulland whole-top-level-key hashes (install-runtime-config-use-case.ts:187), while the exclusion expects per-server keys under a section, so the two would not meet even with a filter.Two ways to close this, both a product call rather than a patch:
framework remove --mcp <server…>passing the filter, installs recording MCP files under theirentrySection(mcpServers) so per-server tracking exists, and an install step that honoursexcludedMcp.UninstallMcpExclusionUseCase,McpExclusion,excludedMcpon the manifest (with a manifest read that tolerates the old field), and the tests test(cli): kill the surviving mutants of the framework context #804 wrote for the dead path.Recommendation: 2, unless someone asked for per-server MCP removal. The feature has had no user-reachable entry point for its whole life here, and #804's 95 % floor now pins dead code.
blafourcade commentedon Sep 10, 2026
Decision: delete. The exclusion was never reachable (no command passes a non-empty filter, nothing reads
excludedMcp, installs recordsectionKey: null), so it goes rather than gets wired. Work onrefactor/drop-unreachable-mcp-exclusion; an existing manifest carryingexcludedMcpmust keep loading.refactor(cli): drop the MCP exclusion no command could reach (#816)