Skip to content

feat: v2.0.0 — ExplainMatch + model provenance#7

Merged
SimplyLiz merged 1 commit intomainfrom
develop
Apr 13, 2026
Merged

feat: v2.0.0 — ExplainMatch + model provenance#7
SimplyLiz merged 1 commit intomainfrom
develop

Conversation

@SimplyLiz
Copy link
Copy Markdown
Contributor

Summary

  • ExplainMatch — new wire message and lip_explain_match MCP tool. Chunks result_uri's source into chunk_lines-line windows (default 20), batch-embeds all chunks, cosine-scores each against the query embedding (cached URI or on-the-fly text), and returns the top-k ExplanationChunk { start_line, end_line, chunk_text, score } records. Turns "this file is relevant" into "these specific lines drove the match."
  • Model provenanceset_file_embedding / set_symbol_embedding now record which model produced each vector. EmbeddingBatch handler persists used_model from embed_texts. QueryFileStatusembedding_model: Option<String>. QueryIndexStatusmixed_models: bool + models_in_index: Vec<String>. MCP lip_index_status emits a ⚠ MIXED MODELS warning when the index contains vectors from more than one model (cosine scores are unreliable across a model-upgrade boundary).
  • Version bumped to 2.0.0.

Test plan

  • cargo test --all — 284 tests, 0 failures
  • cargo fmt --all --check — clean
  • cargo build --all — clean
  • ExplainMatch round-trip test in types.rs
  • FileStatusResult.embedding_model and IndexStatusResult.mixed_models fields present in JSON output
  • Manual: lip explain_match against a real indexed file returns line ranges and scores

🤖 Generated with Claude Code

ExplainMatch: chunk-level semantic explanation. Given a query (file URI
or free text) and a result URI, chunks the result file, batch-embeds all
chunks, and returns the top-k by cosine score with start_line/end_line
and chunk_text. Turns "this file is relevant" into "these lines drove
the match."

Model provenance: set_file_embedding/set_symbol_embedding now take a
model name and store it in file_embedding_models/symbol_embedding_models.
EmbeddingBatch persists used_model from embed_texts. QueryFileStatus
exposes embedding_model per file. QueryIndexStatus exposes mixed_models
bool and models_in_index list — the MCP tool warns when a model upgrade
left cosine scores unreliable across the boundary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@SimplyLiz SimplyLiz merged commit b836e15 into main Apr 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant