fix(embeddings): enumerate nodes independently of stored paths - #962
Open
y4ho0 wants to merge 1 commit into
Open
fix(embeddings): enumerate nodes independently of stored paths#962y4ho0 wants to merge 1 commit into
y4ho0 wants to merge 1 commit into
Conversation
code-review-graph reviewOverall risk: 0.40 (MEDIUM) — 8 changed function(s)/class(es), 17 affected flow(s), 1 test gap(s) Risk-scored changes
Affected execution flows
Test gaps
Token savings: this graph-backed report used ~14,880 fewer tokens (~69%) than reading every changed file in full (estimated, chars/4 approximation). Powered by code-review-graph — local-first analysis; no code leaves the CI runner. |
Owner
|
Integrated on |
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 issue
Closes #945
What & why
Graphs with legacy Windows path spellings can produce zero embeddings because node enumeration passes stored paths through normalized file lookups. The tool then incorrectly reports that semantic search is active.
Explicit embedding and opted-in refresh now enumerate all non-File nodes directly, including virtual nodes outside the file inventory. The summary reports that semantic search is unavailable when the resulting embedding count is zero; an already-current index still reports active. Stored paths, node identities, and provider/model checks are preserved.
How it was tested
Python 3.13.15 on macOS. Regression tests use real SQLite stores with simulated legacy Windows paths and deterministic embedding providers. They cover initial embedding, explicit refresh, repeat runs, virtual nodes, and empty/File-only graphs.
The coverage run reached 85.06% (65% required), with 2,992 passed, 9 skipped, 2 xpassed, and one failure in the unchanged real filesystem-watcher test
test_recreated_directory_survives_and_is_reindexed. That test passed in isolated reruns on both this branch and clean upstream. An initial Python 3.14 run also hit the existing Windows event-loop test failure, reproduced on the unmodified base; final validation uses CI-supported Python 3.13.Checklist