From 2a9707ed4695228006634424fdb2c549535cf798 Mon Sep 17 00:00:00 2001 From: Lourince Daging Date: Fri, 17 Jul 2026 15:46:01 +0200 Subject: [PATCH] test(mcp): pin the stdio tool-count invariant at 70 after two mirrors landed The invariant is asserted as an absolute count, so two tool-registering PRs that are each correct against the same base race each other: #6751's loopover_simulate_open_pr_pressure mirror and #6755's loopover_intake_idea mirror both bumped 68 -> 69, but both tools registered, leaving 70 live against a 69 assertion. main has been red on validate-tests since, which also closes unrelated contributor PRs on inherited CI failure. Pin the count at 70 -- matching the 70 registerStdioTool registrations and 70 STDIO_TOOL_DESCRIPTORS entries now on main -- and record both mirrors in the header so the next bump starts from the real base. --- test/unit/mcp-tool-rename-aliases.test.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/unit/mcp-tool-rename-aliases.test.ts b/test/unit/mcp-tool-rename-aliases.test.ts index 28d833607..bc76a16ee 100644 --- a/test/unit/mcp-tool-rename-aliases.test.ts +++ b/test/unit/mcp-tool-rename-aliases.test.ts @@ -11,7 +11,8 @@ // (#6615 registered the loopover_close_pr write-tool — 9th of the 9 buildXSpec builders — taking the count from 62 to 63.) // (#6732 registered the loopover_monitor_open_prs CLI mirror, taking the count from 63 to 64.) // (#6752 registered the loopover_build_results_payload CLI mirror, taking the count from 67 to 68.) -// (#6755 registered the loopover_intake_idea CLI mirror, taking the count from 68 to 69.) +// (#6755 registered the loopover_intake_idea CLI mirror and #6751 the loopover_simulate_open_pr_pressure +// mirror. Both landed from a 68-tool base, so together they take the count from 68 to 70.) import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"; import { mkdtempSync, rmSync } from "node:fs"; @@ -55,14 +56,14 @@ describe("MCP legacy alias retirement (#4777) — discovery invariants", () => { }); afterEach(disconnect); - it("lists exactly 69 loopover_ tools and zero gittensory_-prefixed aliases", async () => { + it("lists exactly 70 loopover_ tools and zero gittensory_-prefixed aliases", async () => { const { tools } = await client.listTools(); const names = tools.map((t) => t.name); const primary = names.filter((n) => n.startsWith("loopover_")); const legacy = names.filter((n) => n.startsWith("gittensory_")); - expect(primary.length).toBe(69); + expect(primary.length).toBe(70); expect(legacy.length).toBe(0); - expect(names.length).toBe(69); + expect(names.length).toBe(70); }); it("no loopover_ tool's description carries a stale deprecation notice", async () => { @@ -72,11 +73,11 @@ describe("MCP legacy alias retirement (#4777) — discovery invariants", () => { } }); - it("`loopover-mcp tools --json` reports the same 69-tool count the live server registers", async () => { + it("`loopover-mcp tools --json` reports the same 70-tool count the live server registers", async () => { const { tools } = await client.listTools(); const payload = JSON.parse(run(["tools", "--json"])) as { count: number; tools: Array<{ name: string }> }; expect(payload.count).toBe(tools.length); - expect(payload.count).toBe(69); + expect(payload.count).toBe(70); expect([...payload.tools.map((t) => t.name)].sort()).toEqual([...tools.map((t) => t.name)].sort()); }); });