From 3411bda2d1ded0d9edf55350ef8d3b4185fce2e2 Mon Sep 17 00:00:00 2001 From: agent_vscode Date: Sat, 11 Jul 2026 00:08:00 +0300 Subject: [PATCH] fix(mcp): adapt e2e node-ops calls to the #413 XOR input of patchNode/insertNode #413 changed patchNode/insertNode to take { markdown? | node? } (exactly one), but test-e2e.mjs still passed the raw ProseMirror node directly, so the e2e-mcp CI job died with the XOR guard error right after the node_ops seed step. Wrap both call sites in { node: ... }. Co-Authored-By: Claude Fable 5 --- packages/mcp/test-e2e.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/mcp/test-e2e.mjs b/packages/mcp/test-e2e.mjs index 6de1d891..2dd6851b 100644 --- a/packages/mcp/test-e2e.mjs +++ b/packages/mcp/test-e2e.mjs @@ -316,7 +316,8 @@ async function main() { const [idA, idB, idC] = seedIds; // patchNode: replace the middle paragraph; siblings' ids must be unchanged. - await client.patchNode(nid, idB, mkPara(idB, "Bravo PATCHED.")); + // #413 XOR input: the raw ProseMirror node goes under the `node` key. + await client.patchNode(nid, idB, { node: mkPara(idB, "Bravo PATCHED.") }); await new Promise((r) => setTimeout(r, 16000)); const afterPatch = (await client.getPageJson(nid)).content; const patchText = JSON.stringify(afterPatch); @@ -327,7 +328,7 @@ async function main() { // insertNode: place a new block after the first paragraph. await client.insertNode( nid, - mkPara("nodeops-ins", "Inserted paragraph."), + { node: mkPara("nodeops-ins", "Inserted paragraph.") }, { position: "after", anchorNodeId: idA }, ); await new Promise((r) => setTimeout(r, 16000));