[ZEPPELIN-6412] Shard embedding search index persistence by note #5535
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.49) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.49 · 321 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.345
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #5535"
general
weight: 0.35
tbonelee
What is this PR for?
EmbeddingSearchcurrently keeps all entries in a singleembedding_index.binfile. Although paragraph embeddings are updated incrementally in memory, every flush serializes and rewrites the entire index.This PR shards the persisted index by note. Updating a paragraph now rewrites only the shard belonging to the affected note, while semantic search continues to operate across the complete in-memory index.
What type of PR is it?
Bug Fix
What changes were made?
Per-note persistence
notes/Shard lifecycle and recovery
Legacy index migration
embedding_index.binusing an all-or-nothing staging directoryTests and documentation
Todos
What is the Jira issue?
How should this be tested?
EmbeddingSearchShardingTestcontains 20 tests covering:All 20 tests pass.
Screenshots (if appropriate)
Not applicable.
Questions:
docs/embedding-search.mdhas been updated to describe per-note persistence.