ci(publish-smoke): surface the app's resolved pnpm + build approvals before install (#3124)#3157
Merged
Merged
Conversation
…fig before install (#3124) The Publish Smoke gate died on ERR_PNPM_IGNORED_BUILDS with no way to see why: the failure was CI-only and every local repro (pnpm 10.31/10.33) honored the allowlist and exited 0. The missing fact: the scaffolded app declares no packageManager field (by design — it must test what a fresh user's pnpm resolves, not this repo's pin), so with corepack enabled the `pnpm` that installs the app is the LATEST pnpm (11.x), not the repo-pinned 10.31.0. pnpm 11 makes an unapproved build script a hard error where pnpm 10 only warned. The app's build approvals were declared for pnpm 11 in #3119; this adds the missing visibility so a future red run answers on its own which pnpm ran and whether it parsed the approvals. Prints, from inside the app dir right before install: `pnpm --version`, the build-approval keys pnpm actually resolved (onlyBuiltDependencies via either allowBuilds or onlyBuiltDependencies), and the pnpm-workspace.yaml as written. Diagnostics only — never fails the smoke. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MN39HnZs8M92iDGqAMcvsK
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
os-zhuang
marked this pull request as ready for review
July 18, 2026 02:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3124.
What was actually happening
The
Publish Smokegate died at the smoke app's install with[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: better-sqlite3@…, esbuild@…— for the exact two packages the allowlist names — and it never reproduced
locally (pnpm 10.31.0 / 10.33.0 both honor the allowlist and exit 0).
The missing fact, confirmed by local reproduction here:
packageManagerfield (deliberate — thegate must test what a fresh user's pnpm resolves, not this repo's pin).
corepack enable(the workflow does this), corepack resolves thelatest pnpm for a directory with no pin — pnpm 11.x, not the repo's
pinned
10.31.0. Verified:corepack pnpm --versioninside a/tmpappwith no pin →
11.14.0, while the same command in the repo →10.31.0.error. So the gate's local repro (pnpm 10.x, only warns) could never see
the CI red (pnpm 11, hard error).
The app-side fix — declaring
allowBuilds/onlyBuiltDependenciesin thescaffolded template so a fresh install passes on pnpm 11 — already landed in
#3119. I reproduced the full current flow (template
pnpm-workspace.yamloverrides:block,corepack pnpm@11.14.0, freshstore,
CI=true, transitivebetter-sqlite3+ directesbuild) and it nowbuilds both and exits 0. The
ERR_PNPM_IGNORED_BUILDScause is resolved.What this PR adds
The one thing #3124 explicitly asked to land first — visibility. Right
before the tarball-pinned install, the script now prints, from inside the app
dir:
pnpm --version— so the pnpm/corepack version divergence is never invisibleagain;
only-built-dependencies,which pnpm derives from either
allowBuildsoronlyBuiltDependencies), so ared run answers "did pnpm even see the approvals?" directly;
pnpm-workspace.yamlas written.Diagnostics only, wrapped in
|| true— they can never fail the smoke. Nobehavior change to the install itself.
Testing
bash -n scripts/publish-smoke.sh— clean.resolved version, the
only-built-dependencies[]entries pnpm parsed fromboth approval keys, and the workspace file.
corepack pnpm@11.14.0(fresh store,CI=true)with the current template + appended overrides: both
esbuildand atransitive
better-sqlite3build, exit 0 — theERR_PNPM_IGNORED_BUILDSfailure does not recur.
🤖 Generated with Claude Code
Generated by Claude Code