From 55aa4f57dcea853713e1208951add971adb0b2ef Mon Sep 17 00:00:00 2001 From: Sebastien Tardif Date: Tue, 7 Jul 2026 19:48:27 -0400 Subject: [PATCH] fix: align MCP doc_set e2e test with selector param Latest patchloom MCP schema requires `selector` for doc_set. The e2e test still sent `key`, which fails with unknown field(s) and blocked Dependabot PRs that run the managed-install suite. Signed-off-by: Sebastien Tardif --- test/unit/patchloomCli.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/unit/patchloomCli.test.ts b/test/unit/patchloomCli.test.ts index 155f330..382c67c 100644 --- a/test/unit/patchloomCli.test.ts +++ b/test/unit/patchloomCli.test.ts @@ -787,12 +787,13 @@ describe("managed install end-to-end MCP", { timeout: 120_000 }, async () => { jsonrpc: "2.0", method: "notifications/initialized" }) + "\n"); - // Call doc_set to change port from 3000 to 8080 (relative path) + // Call doc_set to change port from 3000 to 8080 (relative path). + // MCP param is `selector` (CLI arg name); not `key`. child.stdin!.write(JSON.stringify({ jsonrpc: "2.0", id: 3, method: "tools/call", params: { name: "doc_set", - arguments: { path: "config.json", key: "port", value: 8080 } + arguments: { path: "config.json", selector: "port", value: 8080 } } }) + "\n"); @@ -810,8 +811,9 @@ describe("managed install end-to-end MCP", { timeout: 120_000 }, async () => { const callResponse = JSON.parse(callLine) as Record; assert.equal(callResponse.jsonrpc, "2.0"); assert.equal(callResponse.id, 3); - const callResult = callResponse.result as Record; - assert.ok(callResult, "tools/call should return a result (not an error)"); + const callResult = callResponse.result as Record | undefined; + assert.ok(callResult, + `tools/call should return a result (not an error): ${JSON.stringify(callResponse)}`); assert.ok(!callResult.isError, `tools/call should not be an error: ${JSON.stringify(callResult)}`);