Repository navigation
feat(api): room rename, room update, memory room-move + CLI memory update - #1203
Merged
Merged
Conversation
…date (#1202) - rename_room: registry row + room_memories + room_documents move in one transaction (FK-safe insert->repoint->delete; FKs are ON DELETE CASCADE only, no ON UPDATE) - update_room: title/description edit; schema v19 adds additive rooms.description column (fresh + migrated stores); structural export/import carry it, backward-compatible with 5-column exports - move_memory_to_room: M2M move preserving link author/role/joined_at provenance; Ok(0) when not a member of source - uteke update <id> CLI: in-place memory edit closing the CLI surface gap - Surfaces: HTTP /room/rename|update|memory/move, CLI room rename|update|move-memory + update, MCP uteke_room_rename|update| memory_move; api_registry + docgen regenerated Closes #1202
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
CI runners have no ONNX runtime — Uteke::open() lazy-init fails there. open_with_backend(path, None) matches the namespace_management_tests pattern; these ops never touch embeddings anyway.
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
Implements the remaining gaps from #1202 (audited against code first — items 4 and the API side of item 5 already existed):
Uteke::rename_room(old, new)): rewrites the registry row and everyroom_memories/room_documentsreference in ONE transaction. The FKs areON DELETE CASCADEonly (noON UPDATE), so the implementation uses an FK-safe insert-new-row → repoint-children → delete-old-row order. Title, description, and namespace are preserved; errors on missing source or taken target (Error::Validation).Uteke::update_room(id, title?, description?)): edits title and/or description,None= keep current. Adds the additiverooms.descriptioncolumn via schema v19 (fresh stores get it in CREATE TABLE; existing stores migrate with a guardedALTER TABLE). Structural export now carries the 6th column and import accepts both 5- and 6-column exports.Uteke::move_memory_to_room(id, from, to)): rooms are many-to-many (room_memoriesPK(room_id, memory_id)), so the move reads the link's provenance, then delete+insert in one transaction —author/role/joined_attravel with the link.Ok(0)when the memory is not a member offrom; target room must exist; same-room moves rejected.uteke update <id>CLI: in-place memory edit (content/tags/importance/pinned/type). The facade (Uteke::update_memory), HTTP (PUT /memory), and MCP (uteke_update) surfaces already existed — this closes the CLI-only gap (feat(api): room rename, room update (title/description), memory room-move + CLI memory update #1202 item 5).Surfaces per op (mirrors the #1183 pattern): HTTP
POST /room/rename({from, to}),POST /room/update({room_id, title?, description?}; 404 when room missing),POST /room/memory/move({memory_id, from_room, to_room}; 404 when the link is absent); CLIuteke room rename <old> <new>,uteke room update <id> [--title ...] [--description ...],uteke room move-memory <id> --from <room> --to <room>,uteke update <id> [--content ...] [--tags ...] [--importance ...] [--pinned ...] [--type ...]; MCPuteke_room_rename,uteke_room_update,uteke_room_memory_move.Why
Fleet ops across many agents/projects need room lifecycle management: renaming a room today means create-new + re-remember everything, which breaks anything referencing the room name (agent routing config, memory hooks, channel-mirror conventions).
link_memory_to_roomhad no reverse, so consolidating rooms was impossible without losing link provenance.roomshad no description column and no metadata edit path. Closes #1202 (items 1, 2, 3, 5-CLI).Testing
uteke-core(rooms::tests): rename moves registry + member links (author-filterable recall on the new ID), rename preserves document links, rename rejects missing source / taken target / same-ID, update sets title+description independently (andNonefor missing room), move preserves link provenance (verified via direct SQL onroom_memories), move rejects missing target room / same-room. Schema-migration test updated:MAX(version)now asserts 19.uteke-server:room_rename_update_move_endpoints_roundtrip(full flow: create → room/remember → rename → update → move → 404 on double-move) androom_update_missing_room_returns_404.cargo fmt --checkclean;cargo clippy --workspace --all-targets -- -D warningsclean; fullcargo test --workspacegreen.