fix(cli): require explicit MCP registration replacement - #41
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-running
orchestral mcp addwith an existing name previously replaced its entire registration, including environment and permission settings, before printingUpdated. It now fails without writing the registry unless--replaceis explicit. Replacement builds a new entry from the supplied arguments and existing defaults; the help explains that omitted settings reset.For example,
orchestral mcp add my-tool -- new-commandpreserves an existingmy-toolentry and reports the duplicate.orchestral mcp add my-tool --replace -- new-commandexplicitly replaces it.The real CLI regression verifies byte-for-byte preservation after rejection, replacement of command/environment/permissions and other settings, exclusion of inherited Host environment from the MCP entry, and preservation of other servers. Added an Unreleased changelog entry; the version remains unchanged.
Validation:
cargo test --locked -p orchestral-cli --test agent_live_e2e mcp_user_registry_ -- --nocapture: 2 passed, 0 failed, 0 ignored; 80 unrelated tests filtered out.cargo fmt --all -- --checkandgit diff --check: passed.mcp add --help: checked the replacement/reset explanation.The full workspace and platform checks are left to the existing PR CI; no model calls or user registry were used locally.