Repository navigation
refactor: one decision tree for recall on HTTP and MCP; MCP honours the HTTP parameters (#1439, part C2) - #1576
Merged
Merged
Conversation
…he HTTP parameters (#1439, part C2)
🔍 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
Second part of PR C of the unified-surfaces plan.
uteke_core::recall_exec:Uteke::run_recall(&RecallRequest, RecallDefaults) -> RecallOutput. It is the decision tree the HTTP handler owned (explain guards, pack, unified recall, time travel, the memory-only path with its entity/category and before/after post-filters), moved verbatim. A guard failure is anError::Validationwith the exact text HTTP returned.POST /recallnow calls it and only renders the output (v1 flat or v2, the "No memories above similarity threshold" body). Its behaviour is unchanged.uteke_recallcalls it too. It now acceptsentity,category,strict,enrich,at,afterandbefore(it ignored them), with the HTTP guards (packandexplaincannot be combined with the time filters;explainnot with entity/category/enrich), and refuses an argument the tool does not declare, listing the supported ones (a typo such aslimtwas silently ignored). The list is built from the tool's owninputSchema, so the two cannot drift. The tool schema documents the new parameters.search_typeas memory-only (HTTP's behaviour), so MCP namesallexplicitly unlessexplainis set.Why
#1439 PR C (owner decisions of 2026-10-13: one behaviour per operation, towards HTTP; cloud contract uteke-cloud#173). Sharing the decision tree is what makes "honour entity/category/at/after/before on MCP too" a call instead of a second copy.
One thing for the reviewer: HTTP's default is memory-only while MCP's documented default is memories and documents, a disagreement the decisions did not list. I kept MCP's default (so this PR does not silently drop documents from MCP results); making MCP memory-only by default would be a one-line change if you want it.
Testing
developand from this branch, real servers with a mock embeddings endpoint, the same 4 memories (with entity/category metadata) and 20POST /recallbodies (plain, limit, search types, entity, category, after/before/at, explain and its three guards, pack and its guard, min_score, unknown strategy and search_type, blank query, limit over the cap,tags: []): the normalised responses, including the error bodies, are identical.run_recall; MCP tests for the new parameters, the guards and the unknown-argument error; the existing server tests (explain, isolation, cross-surface) pass unchanged.cargo test --workspace --locked, clippy-D warnings, fmt, docgen (no diff). The CLI local path is not touched, so no LongMemEval run is needed for this part. Cora MCP review before committing: no findings.