Repository navigation
refactor: MCP forget and id resolution follow the HTTP rules; uteke forget is the same locally and via a server (#1439, part F) - #1581
Merged
Conversation
…orget is the same locally and via a server (#1439, part F) An unknown prefix and a stored-nowhere full UUID are both 'Memory not found'. Full UUIDs are normalised on every surface. uteke_forget refuses undeclared arguments. A local uteke forget resolves prefixes and refuses unknown ids. Via a server it asks for the same confirmation and refuses --cold/--all explicitly.
🔍 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
Part F of #1439 (one behaviour across surfaces), the
forgetoperation and id resolution:ForgetPolicy::MCPisForgetPolicy::HTTP: an unknown prefix isMemory not found: {id}; a full UUID that is not stored is refused (existence check, BUG: room_remember broken — remember_in_room() not exposed via HTTP AND tags causes 500 #762) on every surface instead of being passed to the core, which reported success. This also reachesuteke_get/update/pin/supersedethrough their shared resolver.DELETE /forget?id=accepts an upper-case or dash-less spelling of a stored id (it was a 404). Nothing that succeeded before fails.uteke_forgetrefuses undeclared arguments (tag,namespace) instead of ignoring them.uteke forget <id>on a local store resolves prefixes and refuses an id that is not stored (it printed "forgotten" for any string).uteke forgetvia a server asks for the same confirmation as locally (y/N prompt or--confirm; a tag forget without--confirmprints a notice and deletes nothing).--cold/--allvia a server are an explicit error (no fallback to a local store, which would delete from the wrong database).read_only_token_may_forgetfield is gone (the gate is an HTTP pipeline check).Why
The surfaces diverged on the same request (#1439; owner decision 2026-10-13: unify towards HTTP). Forgetting is destructive, so the unknown-id and confirmation gaps mattered most.
Testing
cargo fmt,cargo clippy --workspace --all-targets --locked -- -D warnings,cargo test --workspace --locked,cargo run -p docgen(no diff).forget_id(prefix resolves, unknown id/prefix refused).uteke forgetwithout--confirmno longer deletes (documented in the flag help since it existed locally); noted in the CHANGELOG.