From 9708154eea660118d229865532acb036dde0f33b Mon Sep 17 00:00:00 2001 From: Hermenix Date: Sun, 11 Oct 2026 23:08:13 +0000 Subject: [PATCH] test(mcp): count the unnarrowed resources against the listing, not a literal `--toolsets` has to leave the resources alone, and the subtest that says so asserted `5` and `3` -- so the stream's two resources turned a correct server into a red check, which is the second literal in this file the surface outgrew in one day. Counted against `uris` and `templates` from the listing subtest instead. That is the comparison the assertion was always about: not "six", but "as many as this server lists when nothing is narrowed". Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_011ZeH65zd6pFTgBSu52W9PE --- checks/vm-mcp.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/checks/vm-mcp.nix b/checks/vm-mcp.nix index a33d75d..cdd0a7b 100644 --- a/checks/vm-mcp.nix +++ b/checks/vm-mcp.nix @@ -519,8 +519,12 @@ testers.runNixOSTest ( timeout=180, ) ) - assert len(still_there["resources"]) == 5, still_there - assert len(still_there["resourceTemplates"]) == 3, still_there + # Every one of them, unnarrowed: `--toolsets` is a tool budget and + # must not take the host's context away with it. Counted against + # the full listing above rather than against a literal, so the next + # resource added cannot make this pass by being forgotten. + assert len(still_there["resources"]) == len(uris), still_there + assert len(still_there["resourceTemplates"]) == len(templates), still_there # And a tool outside the selection must be unreachable, not merely # unlisted, or the flag is cosmetic.