Repository navigation
chore(pack:verify): assert skills/mcpdo ships and drive an mcpdo tool call - #2679
Conversation
… call (#2650) pack:verify now also: - asserts skills/mcpdo/SKILL.md is in the npm pack file list; - ESM-resolves every bare import in the installed clients/mcpdo/build from inside the package (import.meta.resolve; a CJS require.resolve falsely fails @modelcontextprotocol/ext-tasks, which exports only an `import` condition); - runs `mcpdo @test tools/call echo message:=pack-verify` through the packaged daemon and checks the echoed text. The mcpdo daemon dir is shortened to a one-character name so the socket path stays well under macOS's 104-byte sun_path limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
There was a problem hiding this comment.
🟡 Changes recommended
The import scanner misclassifies import-like text in comments and strings as dependencies.
1 open finding
What changed in this PR
Extends the published-tarball verification to cover the packaged mcpdo surface.
Changes:
- Verifies the shipped skill and all bundled bare imports.
- Adds an end-to-end daemon tool call.
- Documents and tests the new checks.
| File | Description |
|---|---|
scripts/pack-and-verify.mjs |
Expands packaged mcpdo verification. |
scripts/lib/bundle-bare-imports.mjs |
Adds bare-import scanning and ESM resolution. |
scripts/lib/bundle-bare-imports.test.mjs |
Tests scanning and resolution behavior. |
docs/publishing.md |
Documents the expanded release check. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Copilot review closed after round 1. Its one finding (the scanner treating import-like text in comments or strings as an import) was declined in its thread: a false positive fails closed (red gate, specifier named, never a false green), the real bundle yields exactly its 18 real specifiers, and a tokenizing scanner is the #2334 trap AGENTS.md records. Nothing was pushed, so per the loop's exit rules this round ends the review. |

Closes #2650
What changed
npm run pack:verifynow covers the three things the v2.10.0 release checked on the installedmcpdoby hand:skills/mcpdo/SKILL.mdships. It is added to the step-2b required-files list. Nothing reads it at run time, so before this afilesedit that dropped it would have passed the gate.clients/mcpdo/buildresolves, using ESM rules. The newscripts/lib/bundle-bare-imports.mjsscans the bundle for bare specifiers and resolves each one withimport.meta.resolvefrom a probe module placed inside the installed package. It matches statements at the start of a line, sofrom "…"text inside bundle comments is ignored. ESM resolution matters here:@modelcontextprotocol/ext-tasksexports only animportcondition, sorequire.resolvefails on it withERR_PACKAGE_PATH_NOT_EXPORTED(I confirmed this locally).connect, the script runsmcpdo @test tools/call echo message:=pack-verify --plainand checks forEcho: pack-verify. If the call fails, the daemon is stopped before the script exits.The mcpdo daemon dir is now
<work>/dinstead of<work>/mcpdo-daemon. The socket lives in that directory, and macOS caps a socket path at 104 bytes.$TMPDIRis already long there, so the shorter name keeps the path under the limit.docs/publishing.mddescribes the new checks.Verification
npm run pack:verifypasses:tarball OK: 27 files … skills/mcpdo present,all 18 bare imports in the installed mcpdo bundle ESM-resolve from the consumer install, and the daemon flowconnect/list/tools/call/disconnectpasses.npm run local:gatepasses, including the newnode --testcases inscripts/lib/bundle-bare-imports.test.mjs. They cover import-onlyexports, a missing package,fromtext in comments, and checking that the probe file is cleaned up.v2/maindoes not typecheck right now (#2676), so this PR's CI will be red until that fix lands. To run both checks above, I applied #2676's one-line fix ([]asjoinSnapshot's fallbacks) in my working tree and reverted it before committing. This PR does not include that fix.🤖 Generated with Claude Code