fix(cli): warn when embedding reindex has no entities - #1190
Merged
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
bm reindex --embeddingsonly rebuilds vectors for entities already present in the database. On a fresh CLI-only project it could therefore report0 entities embeddedand finish successfully while files still had not been indexed, with no explanation of the prerequisite.Fixes #1184.
What Changed
--embeddingsdoes not discover project filesbm reindexor the MCP server's initial indexImplementation Details
The lifecycle boundary is unchanged. Embeddings-only mode still operates exclusively on database entities and does not implicitly run the project-index coordinator. The warning is emitted only when
--embeddingsruns without the search/index phase andreindex_vectors()reports zero total entities.That keeps existing incremental and provider-rebuild behavior predictable while making the unsynced-project no-op explicit.
Testing
Automated
uv run pytest -q tests/cli/test_db_reindex.py --no-cov: 9 passedjust fast-check: Ruff fix/check, formatting, and ty type checking passedgit diff --check: passedManual
Risks / Follow-ups
--embeddings; plainbm reindexremains the command that owns project discovery and indexing.