Repository navigation
test(mcp,cli): scope-isolation suites and the coverage document (#1467, part 3) - #1490
Merged
Merged
Conversation
🔍 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 3 of 3 of the scope-isolation regression gate (#1467); parts 1 and 2 are #1488 and #1489.
mod isolation_testsinuteke-mcp,uteke-core'stest-supportas a dev-dependency only): 20 scopedtools/callrequests throughhandle_jsonrpc_aswith a read-only token:uteke_recall(five strategies ×memory/all,pack,explain, tags),uteke_search,uteke_list(with a tag),uteke_graph,uteke_room_recall,uteke_room_memories,uteke_tags_list,uteke_room_list,uteke_stats,uteke_contradictions.every_read_tool_is_covered_or_exemptfails when a tool ofREAD_ONLY_TOOLSis neither covered nor exempt (with a reason), when something listed is stale, and when a tool that advertises anamespaceargument is not covered.crates/uteke-cli/tests/scope_isolation.rs): runs the real binary against a store seeded throughuteke remember --namespace ...(no ONNX runtime, FTS-only, server routing off):search,list(with a tag),export,room recall,orphans,tags list,stats,room list,contradictions list.uteke recallneeds the ONNX runtime, which CI lacks; the same code path is covered by the core, HTTP and MCP suites.docs/isolation-suite.md: the fixture, what each transport covers, the exemptions with reasons, how to add a surface, and the note that requiring theTestcheck is a repository setting.Why
The leak that matters to a user is over a transport, where each handler or tool parses its own scope argument. The last criteria of #1467 are the all-transport coverage and a document that tells the next endpoint author to add itself to the suite.
Testing
cargo test -p uteke-mcp isolation_tests(2 pass) andcargo test -p uteke-cli --test scope_isolation(1 passes, about 9 s: it spawns the binary a few dozen times);cargo clippy --workspace --all-targets -D warningsis clean.uteke_searchanduteke_listignoring the namespace inuteke-mcpfail with "scoped to alpha returned beta records"; the CLIsearchignoring the namespace fails the same way.uteke_room_document. By-ID fetches take no namespace, so IDs are global handles; if that should change, it is a separate design decision.Testas a required status check) that only the repository owner can change.Refs #1467. The issue stays open until
Testis a required check fordevelop; until then the suite runs but does not block.