Skip to content

Commit 303d500

Browse files
authored
fix(ci): allow dist/ in the MCP pack allowlist, which is the only thing it ships (#9950)
#9946 unblocked the MCP publish build; packing then failed on the very next step with "Unexpected file in package tarball". The allowlist permits package/(bin|lib|scripts)/, which describes a source layout this package has not had for some time. Its package.json ships `files: ["dist", "scripts", ...]` and both `bin` entries point at dist/bin/*.js -- so dist/ is not stray output, it is the entire package. Verified against a real `npm pack`: the tarball contains dist/, scripts/ and the four metadata files, and the old pattern rejected exactly the 9 dist/ entries. With the corrected pattern all three smoke-test stages pass locally -- allowlist clean, secret scan clean, and the installed binary answers --help. The mismatch stayed invisible because the build step failed first, so packing never ran. Fixing one exposed the next: this is the second half of the same never-succeeded publish.
1 parent 648e68c commit 303d500

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/publish-mcp.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ jobs:
153153
PACK_JSON="$(npm pack --workspace @loopover/mcp --pack-destination "$RUNNER_TEMP" --json)"
154154
TARBALL="$(node -e 'const fs=require("fs"); const input=fs.readFileSync(0,"utf8"); process.stdout.write(JSON.parse(input)[0].filename)' <<< "$PACK_JSON")"
155155
TARBALL_PATH="$RUNNER_TEMP/$TARBALL"
156-
UNEXPECTED_FILES="$(tar -tzf "$TARBALL_PATH" | grep -Ev '^(package/(bin|lib|scripts)/.+|package/(package.json|README.md|CHANGELOG.md|LICENSE))$' || true)"
156+
# Allowlist mirrors packages/loopover-mcp/package.json's own `files`: the package ships COMPILED
157+
# output under dist/ (its `bin` entries are dist/bin/*.js), plus the runtime scripts/ it declares.
158+
# `bin|lib` here described a pre-dist source layout the package has not had for some time -- the
159+
# mismatch stayed invisible only because the build step above failed first, so packing never ran.
160+
UNEXPECTED_FILES="$(tar -tzf "$TARBALL_PATH" | grep -Ev '^(package/(dist|scripts)/.+|package/(package.json|README.md|CHANGELOG.md|LICENSE))$' || true)"
157161
if [ -n "$UNEXPECTED_FILES" ]; then
158162
printf '%s\n' "$UNEXPECTED_FILES"
159163
echo "Unexpected file in package tarball"

0 commit comments

Comments
 (0)