Repository navigation
test(server): scope-isolation suite over HTTP with a read-route coverage gate (#1467, part 2) - #1489
Merged
Merged
Conversation
…age gate (#1467, part 2)
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 16, 2026
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 2 of 3 of the scope-isolation regression gate (#1467); part 1 is #1488.
crates/uteke-server/src/handlers/isolation_tests.rsruns the two-namespace store of part 1 (seed_two_scopes, plus one unrelated memory per scope so/orphanshas hits) throughroute, withuteke-core'stest-supportfeature as a dev-dependency only (a normal build ofuteke-serverstill resolvesuteke-corewith[onnx,usearch,vecq]).every_scoped_read_route_returns_only_its_own_namespace: 20 scoped read requests per namespace:/recallwith each of the five strategies ×search_typememory and all, pluspack,explainand a tag filter;/search,/list(with and without a tag),/recent,/export,/graph,/room/memories,/room/recall,/orphans,/tags,/room/list,/stats(GET and POST),/doc/search,/doc/list. Every memory ends inof <namespace>, so a response must hold its own marker (the check is not vacuous where hits are expected) and never the other namespace's marker or project tag, whatever the JSON shape.counts_are_per_namespaceanda_foreign_room_asked_for_under_a_scope_yields_nothing.every_read_route_is_covered_or_exempt: every GET or non-writing POST row of the registry must be insurfacesor inEXEMPTwith a reason (by-ID and by-slug fetches, room-ID routes, the route table,/health,/mcp, ...), and nothing listed may be stale. A new read route added without an isolation check fails this test (the "new endpoints get added to the suite" criterion).Why
Part 1 gates the core API; the leak that matters to users is over a transport, where each handler parses its own scope parameter. The HTTP suite catches a handler that drops it.
Testing
cargo test -p uteke-server isolation_tests: 4 pass;cargo clippy --workspace --all-targets -D warningsis clean.POST /searchignoring the namespace fails with "scoped to alpha returned beta records";GET /exportignoring it fails the same way./memory,/provenance,/timeline,/edges) take no namespace, so IDs are global handles; they are listed as exemptions with that reason rather than skipped silently.docs/isolation-suite.md) follows. Requiring theTestcheck in branch protection is a repository setting for the owner.