Skip to content

test(mcp,cli): scope-isolation suites and the coverage document (#1467, part 3) - #1490

Merged
ajianaz merged 1 commit into
developfrom
test/scope-isolation-mcp-cli
Oct 16, 2026
Merged

ajianaz merged 1 commit into
developfrom
test/scope-isolation-mcp-cli

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

What

Part 3 of 3 of the scope-isolation regression gate (#1467); parts 1 and 2 are #1488 and #1489.

  • MCP (mod isolation_tests in uteke-mcp, uteke-core's test-support as a dev-dependency only): 20 scoped tools/call requests through handle_jsonrpc_as with 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_exempt fails when a tool of READ_ONLY_TOOLS is neither covered nor exempt (with a reason), when something listed is stale, and when a tool that advertises a namespace argument is not covered.
  • CLI (crates/uteke-cli/tests/scope_isolation.rs): runs the real binary against a store seeded through uteke 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 recall needs 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 the Test check 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) and cargo 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 warnings is clean.
  • Mutation checks, then reverted: uteke_search and uteke_list ignoring the namespace in uteke-mcp fail with "scoped to alpha returned beta records"; the CLI search ignoring the namespace fails the same way.
  • Exemptions are explicit: by-ID and by-slug fetches, room-ID tools, document tools, the dispatch alias uteke_room_document. By-ID fetches take no namespace, so IDs are global handles; if that should change, it is a separate design decision.
  • Making the check blocking is a branch-protection setting (Test as a required status check) that only the repository owner can change.

Refs #1467. The issue stays open until Test is a required check for develop; until then the suite runs but does not block.

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit dfea00a into develop Oct 16, 2026
18 checks passed
@ajianaz
ajianaz deleted the test/scope-isolation-mcp-cli branch October 16, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant