mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
e846ae85d8
The previous backfill trigger relied on Alembic revision tracking, but alembic_version only stores the head revision — intermediate revisions (like the backfill trigger) are invisible after a multi-step upgrade or fresh DB creation. Three changes fix this: 1. Replace Alembic revision check with a simple "entities exist but embeddings are empty" check that works regardless of migration path 2. Generate embeddings during sync — after FTS indexing, batch-embed all synced entities at the end of the sync operation 3. Add background backfill at MCP startup for the upgrade path (entities already exist, no embeddings) without blocking server readiness Also adds clear startup logging for semantic embedding status so issues are easy to spot in the logs. 📋 Covers: fresh DB, upgrade from pre-embedding version, db reset, interrupted backfill Signed-off-by: Pedro Hernandez <pedro@basicmachines.co> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>