Repository navigation
refactor(core): route remaining index writes through index_sync - #1348
Merged
Merged
Conversation
Migrate maintenance (aging cleanup, prune, lifecycle, repair, re-embed, shutdown), consolidate, edges (supersede/undo) and import/export to the index_sync policy. Adds insert_unsaved/remove_unsaved for batch paths that save once, and SyncOutcome::warn_if_stale. Document paths in lib.rs stay for #1341. Refs #1340 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 7, 2026
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
Step 2 of the index sync module (#1340, tracked in #1345; step 1 was #1347).
index_sync:maintenance.rs(aging cleanup soft/hard, prune, lifecycle deprecate + prune, repair rebuild save, re-embed, shutdown),consolidate.rs(3 sites),edges.rs(supersede / undo_supersession),import_export.rs(write-ahead insert, rollback, final save).index_syncgainsinsert_unsaved/remove_unsavedfor batch paths that save once at the end, andSyncOutcome::warn_if_stale.lib.rsdocument paths now uses the one retry policy; direct calls left in core areindex.build(full rebuild) and the document upsert/delete paths inlib.rs, which belong to refactor(core): document upsert as embed-then-commit #1341.Why
Finishes the single-policy goal of #1340 for everything but documents: 5 maintenance loops that copied
for id … index.remove; if let Err(e) = index.save() { warn }and 2let _ = index.save()(undo_supersession) are gone; a persist failure now behaves the same everywhere.Behaviour changes (intended)
shutdownpersists with the same policy (a flush error is still returned).<operation>: index persist failed after 3 attempts: …).undo_supersessionno longer ignores a failed persist silently (it warns).Testing
insert_unsavednever saves and rejects wrong dims without retrying; transient insert retries then one persist) on top of the 9 from refactor(core): index_sync module owns insert/remove/persist policy (operations.rs) #1347.cargo fmt --check,cargo clippy --workspace --all-targetsclean;cargo test --workspacegreen (core 596); vecq-only core build green (594).Refs #1340
🤖 Generated with Claude Code