Repository navigation
Description
Description
After storing memories via uteke remember, they are persisted in SQLite but NOT immediately indexed in the usearch vector index. Semantic recall (uteke recall) returns empty results for newly created memories until uteke repair is manually run to rebuild the index.
This is distinct from #543 (concurrent writes) — this bug also occurs with single sequential writes to a fresh namespace.
Environment
- Uteke version: 0.6.1
- OS: Linux 6.8.0-1054-oracle (Oracle Cloud ARM)
- Reproducibility: Consistent on fresh namespace
Steps to Reproduce
# Fresh namespace
uteke namespace create ctest
# Store a memory
uteke remember --namespace ctest --type fact "Rust ownership model ensures memory safety"
# Immediately try semantic recall
uteke recall --namespace ctest "Rust ownership"
# Expected: returns the memory
# Actual: returns []
# Try FTS5 recall
uteke recall --strategy fts5 --namespace ctest "Rust"
# Expected: returns the memory
# Actual: returns []
# Text search works (different code path)
uteke search --namespace ctest "Rust"
# Returns: 1 result with score 1.0 ✅
# Run repair
uteke repair
# Now semantic recall works
uteke recall --namespace ctest "Rust ownership"
# Returns: 1 result with score 0.66 ✅Root Cause Analysis
Before repair:
- DB count: 19324
- Index count: 19448 (124 extra/stale vectors)
This suggests the usearch index accumulates stale entries and does not properly sync with SQLite inserts. The uteke search command works because it uses a different FTS5 code path (direct SQLite query) vs uteke recall --strategy fts5 which routes through the vector/FTS5 hybrid path.
Expected Behavior
After uteke remember, the memory should be immediately searchable via all recall strategies (vector, FTS5, hybrid).
Actual Behavior
Memory is in SQLite but not in vector index. uteke recall returns [] until uteke repair rebuilds the index from scratch.
Impact
- Critical for multi-agent use: Agents storing memories cannot recall them in subsequent turns
- Production blocker: Any workflow relying on write-then-read patterns is broken
- Confusing UX: Write appears successful (exit code 0, memory ID returned) but recall fails silently
Suggested Fix
- Ensure vector index is updated synchronously after each
remembercall - Add a consistency check that verifies the vector was actually inserted
- Consider an index write-ahead log to prevent stale entries
Workaround
Run uteke repair after storing new memories. Or use uteke search (text search) instead of uteke recall (semantic search) for immediate lookups.
Activity
fix: ensure FTS5 initialized on every startup (#544)
fix: ensure FTS5 initialized on every startup (#544)
Merge pull request #557 from codecoradev/fix/544-fts5-missing-on-startup
fix: ensure FTS5 initialized on every startup (#544)
Merge pull request #557 from codecoradev/fix/544-fts5-missing-on-startup