Repository navigation
fix(core): documents has_children, legacy-path move, tag rename dupes, empty index rebuild, recompute_importance - #1375
Merged
Conversation
…cates, empty index rebuild, recompute_importance - upsert_document / delete_document keep the parent's has_children flag in step (old and new parent on re-parenting) - move_document: a legacy row with an empty path no longer matches every document (old_prefix '/%') - rename_tag onto a tag the memory already has no longer duplicates it in the JSON column - VectorIndex::build(&[]) keeps the current dimensionality instead of resetting to 768 - recompute_importance reads only the columns it needs and runs in one transaction Refs #1332 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 8, 2026
Closed
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.
What
Core part of #1332 (validated Cora-scan findings, medium):
documents.rs:upsert_document(update branch) anddelete_documentrefresh the parent's denormalizedhas_childrenvia one helper; a re-parenting upsert fixes both the old and the new parent.documents.rs:move_documenton a legacy row with an emptypath(pre-v12, never backfilled) no longer usesold_prefix = "/%", which matched every document and rewrote all paths/depths; such a document is moved on its own.tags.rs:rename_tagonto a tag the memory already carries no longer leaves it twice in the JSONtagscolumn.vector.rs:VectorIndex::build(&[])keeps the current dimensionality (it reset to 768, sorepair()on an empty store broke the next insert of a non-768 embedder).store.rs:recompute_importanceselects only the columns it needs (it loaded every embedding blob) and runs in one transaction instead of one autocommit per row. Formula unchanged.Why
Findings from the v0.19.1 review, re-verified against the code before touching it (see #1332).
Testing
recompute_importancetest pins the formula (hot/cold/pinned) so the rewrite cannot change values.cargo fmt --check,cargo clippy --workspace --all-targetsclean;cargo test --workspacegreen (core 648); vecq-only core build green (645).recompute_importanceon a large store; an upsert that moves a document does not rewrite its descendants' paths (separate, not in fix: remaining medium findings from Cora scan (documents, tags, CLI routing/export) #1332).Refs #1332
🤖 Generated with Claude Code