feat(status): report indexed embedding metadata#48
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c74670843
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .embed | ||
| .as_deref() | ||
| .unwrap_or(&defaults.embed_uri); | ||
| store.set_meta("embedding_model_uri", embedding_uri)?; |
There was a problem hiding this comment.
Rebuild when the embedding URI changes
When a user changes models.embed to another model with the same output dimension, engraph index can take the non-rebuild path and diff_vault will skip unchanged files, but this line still overwrites embedding_model_uri. engraph status then reports the new model even though existing vectors were produced by the old model, and searches embed queries with the new model against stale embeddings; the CLI also tells users the next index will re-embed the vault at src/main.rs:700. Compare the stored URI before writing it and force a rebuild/reset when it changes.
Useful? React with 👍 / 👎.
Refs #44.
What changed
engraph statusinstead of the obsolete hard-codedall-MiniLM-L6-v2label.Why
The status output could claim a model that the current llama.cpp implementation no longer uses. That makes index provenance and dimension troubleshooting misleading.
Impact
New indexing runs record the model identity used to build the index. Existing indexes report
<unknown>until they are indexed again; this PR does not force a rebuild.Validation
cargo fmt --checkcargo clippy -- -D warningscargo test --lib indexer::tests::test_index_records_embedding_metadatacargo test --lib search::tests::test_format_status— 2 passed