Skip to content

fix(cli): the MCP exclusion strips nothing from a manifest a real install recorded #806

Description

@blafourcade

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.tsexecute 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Low

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions