test(mcp): drive session re-attach and RAG attach filter guards through their real entry points

- use_session_applies_persisted_mcp_tools_immediately now loads a session
  file from disk through the real use_session, proving the post-assignment
  filter refresh applies a re-attached session's persisted allowlist.
- New use_rag_does_not_drop_role_filters loads a yaml-driver RAG through
  the real use_rag and proves the tool-scope rebuild recomputes the role's
  filter layer instead of dropping it.
- Seed the process-wide client/model registries in a pre-main ctor (new
  ctor dev-dependency) so model resolution is deterministic across test
  orderings; the seed exposes only an embedding model so tests that assert
  'no chat model available' keep their premise.
This commit is contained in:
2026-08-27 15:12:22 -06:00
parent 92d9464b38
commit c0224e20cb
3 changed files with 111 additions and 17 deletions
+2 -1
View File
@@ -143,6 +143,7 @@ arboard = { version = "3.3.0", default-features = false }
libc = "0.2"
[dev-dependencies]
ctor = "1.0.13"
pretty_assertions = "1.4.0"
rmcp = { version = "3.1.2", features = ["server"] }
serial_test = "3"
@@ -154,4 +155,4 @@ path = "src/main.rs"
[profile.release]
lto = true
strip = true
opt-level = "z"
opt-level = "z"