Repository navigation
Conversation
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch has not been deployed
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.
Linked issues and pull requests
None.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Entity resolution skips candidate-index construction when every mention already has a stored mapping. Writes containing new mentions share one candidate index.
Why
Stored mappings use their saved canonical text and evidence counts without consulting the fuzzy candidate indexes. Constructing those indexes before examining the mentions performs unnecessary work. Preparation happens when the first missing mention needs it, and later missing mentions reuse the result.
Scope and risk
The change moves candidate-index construction inside the existing resolver. The namespace-scoped candidate query, row normalization, evidence weighting, redirects, ranking and persisted fields keep their existing behavior. Unit cases check complete written rows and reuse an empty index as well as a populated one. Validation counts operations; no latency improvement is claimed.
Compatibility, rollout and rollback
Tests
.venv/bin/python -m pytest tests/unit/test_entity_resolution.py -q -n 0: 85 passed after the change.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex wrote the change. The resolver call paths, complete row assertions and source-preservation proof were checked.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.