Fix auto-resync and partial sync metadata#8
Merged
critesjosh merged 4 commits intomainfrom Mar 4, 2026
Merged
Conversation
Introduces sync metadata (.sync-metadata.json) to track MCP server version, Aztec version, and last sync timestamp. When the MCP server version changes, repos are automatically force-resynced to pick up config changes (new sparse paths, renamed repos, etc.). Also fixes two correctness issues: - Auto-resync now passes force:true so tag/commit-pinned repos are actually re-cloned rather than silently skipped - Sync metadata is only written on full syncs, preventing partial syncs from recording misleading global state Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move tool name and required argument validation before the auto-resync so unknown tools and missing args don't trigger an expensive forced sync - Check syncRepos result and throw an McpError when auto-resync fails, instead of silently continuing against a partially updated checkout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…retry loops - Abort sync when aztec-packages fails during any version-targeted or forced re-clone to prevent mixed-version workspaces - Add metadataSafe flag to SyncResult; only write .sync-metadata.json when all repos succeed and it's a full sync - Add stampMetadataMcpVersion for partial syncs so they aren't mistaken for legacy installs that need a full auto-resync - Add retryable/hard_failure/deferred result types to auto-resync attempts with 30-minute backoff for retryable failures - Treat docs-missing as cosmetic (write metadata anyway) to avoid infinite retry loops for versions without versioned docs - Use atomic 3-step rename swap (.old backup) in cloneRepo so a failed rename doesn't leave the repo unavailable - Block read-only tools on in-flight syncs to prevent filesystem races, but only trigger sync once per MCP version change (stance A) - Use while loop for manual sync lock to prevent waiter races Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Mar 4, 2026
Closed
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.
Summary
force: truetosyncRepos, ensuring tag/commit-pinned repos are actually re-cloned with potentially updated sparse paths and config rather than silently skipped.writeSyncMetadatais now only called on full syncs (noreposfilter), preventing a single-repo refresh from overwriting global state with a misleading version/timestamp that could cause incorrect auto-resyncs later..sync-metadata.jsontracking (MCP version, Aztec version, timestamp) andMCP_VERSIONderived frompackage.json, plus theneedsResync()check that triggers auto-resync on version mismatch.Test plan
repos: ["aztec-examples"]) does not overwrite.sync-metadata.json🤖 Generated with Claude Code