Repository navigation
Closed
Description
Bug Description
The current sync status system blocks ALL projects from write operations if ANY project has sync failures, breaking the intended project isolation in Basic Memory.
Problem
When any project has sync issues (e.g., "main" project with UNIQUE constraint failed), the global sync status prevents write operations in completely healthy projects.
Example Scenario
- Switch to healthy project:
basic-memory-testing-20250626-1009(✅ 6 entities, sync working) - Try to create a note with
write_note() - Result:
❌ Sync failed for: main - Please wait for migration to complete before creating notes - Expected: Note should be created successfully in the healthy project
Root Cause
In SyncStatusTracker._update_global_status():
if any(s == SyncStatus.FAILED for s in statuses):
self._global_status = SyncStatus.FAILED # Blocks ALL projectsThe write_note tool checks global status instead of project-specific status:
migration_status = await wait_for_migration_or_return_status(timeout=5.0)
if migration_status: # Returns error if ANY project failed
return f"# System Status\n\n{migration_status}\n\nPlease wait for migration to complete before creating notes."Impact
- ❌ Breaks multi-project isolation
- ❌ Prevents productive work in healthy projects
- ❌ Poor user experience when unrelated projects have issues
- ❌ Contradicts Basic Memory's design principle of project independence
Solution
Option 1: Project-Specific Ready Check (Recommended)
- Add
is_project_ready(project_name)method toSyncStatusTracker - Modify
wait_for_migration_or_return_status()to check only active project - Update
write_note,read_note, andbuild_contexttools for project-specific checks
Option 2: Global Status Logic Fix
- Change global status to only block when current active project has issues
- Preserve safety while allowing healthy project operations
Expected Outcome
- ✅ Users can work in healthy projects regardless of other project sync issues
- ✅ Maintains proper isolation between projects
- ✅ Preserves safety for projects that actually have sync problems
- ✅ Improves overall user experience with multi-project setups
Priority
High - This significantly impacts usability in multi-project environments and breaks a core design principle.
Environment
- Version: v0.13.8+
- Multi-project setup with mixed sync states
- Affects all write operations (write_note, edit_note, etc.)
Activity
fix: global sync status blocking healthy projects from write operations
phernandez commentedon Jun 26, 2025
fixed in #183