Repository navigation
fix(room): honest room_delete reporting across CLI/HTTP/MCP - #1179
Merged
Merged
Conversation
…nlinked memories (#1173) Incident (2026-08-31, room codecora-product): MCP room_delete wiped all room memory links while the tool replied 'memories preserved' — and the HTTP registry description claimed 'delete a room and all its memories'. Both messages were wrong in opposite directions; from an agent's point of view the room-scoped data became unreachable (memories survive in the store but lose their only room access path). Core delete_room() is and was unlink-only (ON DELETE CASCADE removes room_memories/room_documents links only). This change makes every surface tell the truth: - store delete_room() now returns the number of removed memory links - HTTP DELETE /room/delete responds { deleted, unlinked_memories, note } - MCP uteke_room_delete reports the count instead of a fixed claim - CLI room delete prints the count; --json includes unlinked_memories - api_registry description fixed + docs/api-reference.md regenerated Semantics stay unlink-only (consistent with CLI behavior all along); no destructive purge path is added in this PR.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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
delete_room()(store + facade) now returns the number of memory links removed by the cascade, instead of()DELETE /room/deleteresponse becomes{ deleted, unlinked_memories, note }uteke_room_deletereports the actual link count instead of a fixed claimroom deleteprints the count;--jsonoutput includesunlinked_memoriesdocs/api-reference.mdvia docgenWhy
Closes #1173. Incident on 2026-08-31 (room
codecora-product): the Hermes tool called room_delete, all room memory links were removed by cascade, yet the tool replied "memories preserved" — while the API registry claimed the opposite ("and all its memories"). Both messages were wrong; the room-scoped memories became unreachable from any room path even though rows survive in the store. Forensics show core semantics were already unlink-only at HEAD and v0.13.x; the defect is reporting/documentation, not data handling.Testing
cargo fmt+cargo clippy --workspace --all-targetscleancargo test --workspace: 629 passed, 0 failed (incl. updateddelete_room_success/delete_room_cascades_room_memories)uteke-serve, scratch store):DELETE /room/delete?room_id=...→{"deleted":"http-demo","unlinked_memories":1,"note":"..."}; memory still retrievable viaPOST /search