Skip to content

Commit 3d82216

Browse files
phernandezclaude
andcommitted
docs: Update SPEC-19 with sync_status_service removal and Logfire instrumentation
Updated Phase 1 implementation checklist to reflect: - Removal of sync_status_service (unnecessary complexity) - Addition of Logfire instrumentation for observability - All 1184 tests passing after cleanup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 584c1ce commit 3d82216

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

specs/SPEC-19 Sync Performance and Memory Optimization.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,13 @@ ALTER TABLE entity ADD COLUMN size INTEGER;
437437
- [x] Removed `SyncService._compute_checksum_async()` wrapper method
438438
- [x] Inlined all 7 checksum calls to use `file_service.compute_checksum()` directly
439439
- [x] All file I/O operations now properly consolidated in FileService with non-blocking I/O
440-
- [ ] Keep sync status service (used by MCP tools)
440+
- [x] Removed sync_status_service completely (unnecessary complexity and state tracking)
441+
- [x] Removed `sync_status_service.py` and `sync_status` MCP tool
442+
- [x] Removed all `sync_status_tracker` calls from `sync_service.py`
443+
- [x] Removed migration status checks from MCP tools (`write_note`, `read_note`, `build_context`)
444+
- [x] Removed `check_migration_status()` and `wait_for_migration_or_return_status()` from `utils.py`
445+
- [x] Removed all related tests (4 test files deleted)
446+
- [x] All 1184 tests passing
441447

442448
**Phase 1 Implementation Summary:**
443449

@@ -484,6 +490,13 @@ Phase 1 is now complete with all core fixes implemented and tested:
484490
- I/O efficiency: True async with aiofiles (no thread pool blocking)
485491
- Network efficiency: 50% fewer calls on TigrisFS via scandir caching
486492
- Architecture: Clean separation of concerns (FileService owns all file I/O)
493+
- Reduced complexity: Removed unnecessary sync_status_service state tracking
494+
495+
**Observability**:
496+
- [x] Added Logfire instrumentation to `sync_file()` and `sync_markdown_file()`
497+
- [x] Logfire disabled by default via `ignore_no_config = true` in pyproject.toml
498+
- [x] No telemetry in FOSS version unless explicitly configured
499+
- [x] Cloud deployment can enable Logfire for performance monitoring
487500

488501
**Next Steps**: Phase 2 cloud-specific fixes and Phase 3 production measurement.
489502

src/basic_memory/mcp/tools/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,5 +510,3 @@ async def call_delete(
510510

511511
except HTTPStatusError as e:
512512
raise ToolError(error_message) from e
513-
514-

tests/mcp/test_tool_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Tests for MCP tool utilities."""
22

3-
from unittest.mock import AsyncMock, patch, MagicMock
3+
from unittest.mock import AsyncMock
44

55
import pytest
66
from httpx import AsyncClient, HTTPStatusError

0 commit comments

Comments
 (0)