Description
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.
Description
UninstallMcpExclusionUseCaserebuilds the manifest's merge entries for every merge file of the tool, not only the ones it edited, and it keys the rebuild onsectionKey. Every real install recordssectionKey: 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—executecallsrebuildMergeEntries(toolId, manifest, mcpFilter)for all merge files afterprocessOneMergeFiletouched 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: nullthe 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 installrecords it, thenuninstall --mcp, then the merge entries no longer name the excluded keys.