CachedStore not invalidated after sync pull #6

Closed
opened 2026-06-02 05:01:03 +00:00 by victor · 0 comments
Owner

After do_sync performs a vcs.pull(), the git HEAD advances but the CachedStore SQLite cache is never rebuilt. New tasks pulled from the remote are on disk as TOML files but are invisible to the MCP server until it restarts.

The CachedStore only rebuilds in open() when the stored HEAD hash differs from the current one. The MCP server opens the store once at startup, so subsequent syncs never trigger a rebuild.

Fix: add an invalidate_cache(head_hash) method to the Store trait (default no-op) and implement it in CachedStore to conditionally rebuild. Call it in do_sync after a successful pull.

After `do_sync` performs a `vcs.pull()`, the git HEAD advances but the `CachedStore` SQLite cache is never rebuilt. New tasks pulled from the remote are on disk as TOML files but are invisible to the MCP server until it restarts. The `CachedStore` only rebuilds in `open()` when the stored HEAD hash differs from the current one. The MCP server opens the store once at startup, so subsequent syncs never trigger a rebuild. Fix: add an `invalidate_cache(head_hash)` method to the `Store` trait (default no-op) and implement it in `CachedStore` to conditionally rebuild. Call it in `do_sync` after a successful pull.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
victor/task-manager#6
No description provided.