Skip to content

feat: wire consolidation pipeline into core, CLI, and HTTP (#1088) - #1095

Merged
ajianaz merged 2 commits into
developfrom
feat/consolidation-integration
Aug 25, 2026
Merged

feat: wire consolidation pipeline into core, CLI, and HTTP (#1088)#1095
ajianaz merged 2 commits into
developfrom
feat/consolidation-integration

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

What

  • Implement ConsolidationStore for Uteke (SQLite + lazy embedder) in new consolidation_api module
  • Add embed_text / add_to_index helpers on Uteke for the consolidation write path
  • CLI: uteke room consolidate <room_id> [--apply] [--max-calls N] — dry-run by default, zero LLM calls
  • HTTP: POST /room/consolidate — dry-run default; apply: true gated on server-side extraction LLM config (503 without it), hard budget cap (default 10, max 100)
  • Register endpoint in API registry (#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

  • Layered: unit (trait dispatch, plan batching on real SQLite, deprecate+insert write paths) → cargo test workspace 585 passed / 0 failed → clippy -D warnings clean → 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)

- 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> {
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

🔍 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.
@ajianaz
ajianaz merged commit 0c3f89e into develop Aug 25, 2026
13 of 14 checks passed
@ajianaz
ajianaz deleted the feat/consolidation-integration branch August 25, 2026 04:42
ajianaz added a commit that referenced this pull request Aug 25, 2026
…1096)

The manual consolidate endpoint entry was placed in the wrong spot and
used hand-written content; docgen now renders it from the API registry
(including the #1088 related-tag).

Co-authored-by: ajianaz <ajianaz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants