fix(mcp): Reconcile config drift#134
Merged
Merged
Conversation
Compare desired MCP entries semantically and repair changed transport fields during install and sync. Remove empty dedicated files while preserving entries with unknown ownership in shared configs. Keep the existing public write and verify wrappers compatible for v1 callers. Co-Authored-By: Codex <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Limit reconciliation to currently declared server names and leave all other MCP content untouched. Report incompatible files without overwriting them. Co-authored-by: Codex <codex@openai.com>
Keep successful MCP repairs in the repair count and reserve warnings for incompatible configs that remain unresolved. Co-authored-by: Codex <codex@openai.com>
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.
Repair MCP config drift through one reconciliation lifecycle used by install and sync.
Previously, verification only checked whether expected server names existed. Changed commands, arguments, environment mappings, URLs, and headers could therefore be reported as healthy. Reconciliation now compares serialized values semantically and repairs each affected target once.
dotagents now owns only currently declared server names. Every undeclared server and unrelated top-level field is preserved in every existing target, including dedicated MCP files. With no declarations, install and sync are byte-for-byte no-ops. Unreadable or structurally incompatible files are reported and left untouched. Because there is no durable ownership ledger, entries generated by earlier declarations may remain after those declarations are removed.
The existing public write and verify wrappers retain their v1 behavior. Install and sync surface unresolved MCP incompatibilities as warnings without warning for successful creation or repair.
Garfield review/fix/verify passed with no remaining medium-or-higher findings.
pnpm checkpassed all 798 tests. Docker QA passed the full example plus MCP-specific drift repair, manual-content preservation, empty-state no-op, and incompatible-file warning behavior.