feat: wire consolidation pipeline into core, CLI, and HTTP (#1088) - #1095
Merged
Conversation
- Implement ConsolidationStore for Uteke (SQLite store + lazy embedder) - Add embed_text/add_to_index helpers on Uteke for the write path - CLI: uteke room consolidate <room> [--apply] [--max-calls N] (dry-run default) - HTTP: POST /room/consolidate (dry-run default; apply gated on extraction LLM config with 503; hard budget cap) - Register endpoint in API registry; document CLI + API in docs/ - Tests: trait dispatch, plan batching, deprecate+insert write paths
| self.store().recall_room(room_id, None, 0) | ||
| } | ||
|
|
||
| fn insert_memory(&self, memory: &mut Memory) -> Result<(), Error> { |
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
Cora review flagged non-atomic insert: if add_to_index or link_memory_to_room failed, the row stayed persisted but un-searchable and/or unlinked. Now both failure paths compensate by removing the index entry and deleting the row before returning the error. Added remove_from_index helper for the compensating action.
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
ConsolidationStoreforUteke(SQLite + lazy embedder) in newconsolidation_apimoduleembed_text/add_to_indexhelpers onUtekefor the consolidation write pathuteke room consolidate <room_id> [--apply] [--max-calls N]— dry-run by default, zero LLM callsPOST /room/consolidate— dry-run default;apply: truegated on server-side extraction LLM config (503 without it), hard budget cap (default 10, max 100)#1088); document CLI + API in docs/Why
Closes the integration gap from #1090–#1094: the pipeline was library-only (mock-tested). This wires it to the real store so rooms can actually be consolidated via CLI/HTTP. Rooms are only consolidated when explicitly requested — never automatic.
Testing
-D warningsclean → cora review (no major+ findings; println! findings are FP — CLI output convention) → CLI smoke on real DB (room create → 5 remembers → dry-run shows 1 batch/1 call) → HTTP live smoke (dry-run 200 JSON; apply without LLM config → 503)