Skip to content

fix(mcp): Reconcile config drift#134

Merged
gricha merged 3 commits into
mainfrom
gricha/ref/reconcile-mcp-configs
Jul 13, 2026
Merged

fix(mcp): Reconcile config drift#134
gricha merged 3 commits into
mainfrom
gricha/ref/reconcile-mcp-configs

Conversation

@gricha

@gricha gricha commented Jul 13, 2026

Copy link
Copy Markdown
Member

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 check passed 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.

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>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dotagents Ready Ready Preview Jul 13, 2026 3:51pm

Request Review

@gricha gricha marked this pull request as ready for review July 13, 2026 14:48
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jul 13, 2026
Comment thread packages/dotagents/src/cli/commands/install/agent-runtime.ts Outdated
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>
Comment thread packages/dotagents/src/cli/commands/sync.ts
Keep successful MCP repairs in the repair count and reserve warnings for incompatible configs that remain unresolved.

Co-authored-by: Codex <codex@openai.com>
Comment thread packages/dotagents/src/targets/mcp-writer.ts
@gricha gricha merged commit 63e461e into main Jul 13, 2026
20 checks passed
@gricha gricha deleted the gricha/ref/reconcile-mcp-configs branch July 13, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant