-
Notifications
You must be signed in to change notification settings - Fork 504
Open
Description
Problem
this.synchronizers Map in Context class is in-memory only. After MCP server restart, synchronizers are recreated from scratch.
Current Behavior
// handlers.ts:320-330
const synchronizer = this.synchronizers.get(collectionName);
if (!synchronizer) {
// Recreate synchronizer - loses previous file hash state
const newSynchronizer = new FileSynchronizer(codebasePath, this.ignorePatterns);
await newSynchronizer.initialize();
}initialize() regenerates all file hashes.
Impact
First background sync after restart scans entire codebase to rebuild file hash map, even though merkle files exist on disk.
Expected Behavior
FileSynchronizer already persists to ~/.context/merkle/<hash>.json. The synchronizers Map should be reconstructed from these files on startup.
Location
packages/mcp/src/handlers.ts:320-330packages/core/src/sync/synchronizer.ts:217-221- initialize() loads from disk but Map not restored
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels