Skip to content

ci(publish-smoke): surface the app's resolved pnpm + build approvals before install (#3124) - #3157

Merged
os-zhuang merged 1 commit into
mainfrom
claude/publish-smoke-pnpm-builds-1io1io
Jul 18, 2026
Merged

ci(publish-smoke): surface the app's resolved pnpm + build approvals before install (#3124)#3157
os-zhuang merged 1 commit into
mainfrom
claude/publish-smoke-pnpm-builds-1io1io

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Closes#3124.

What was actually happening

The Publish Smoke gate 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:

  • The scaffolded app declares no packageManager field (deliberate — the
    gate must test what a fresh user's pnpm resolves, not this repo's pin).
  • With corepack enable (the workflow does this), corepack resolves the
    latest pnpm for a directory with no pinpnpm 11.x, not the repo's
    pinned 10.31.0. Verified: corepack pnpm --version inside a /tmp app
    with no pin → 11.14.0, while the same command in the repo → 10.31.0.
  • pnpm 11 turned an unapproved build script from a warning into a hard
    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 / onlyBuiltDependencies in the
scaffolded template so a fresh install passes on pnpm 11 — already landed in
#3119. I reproduced the full current flow (template pnpm-workspace.yaml

  • the script's appended overrides: block, corepack pnpm@11.14.0, fresh
    store, CI=true, transitive better-sqlite3 + direct esbuild) and it now
    builds both and exits 0. The ERR_PNPM_IGNORED_BUILDS cause 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 invisible
    again;
  • the build-approval keys pnpm actually resolved (only-built-dependencies,
    which pnpm derives from either allowBuilds or onlyBuiltDependencies), so a
    red run answers "did pnpm even see the approvals?" directly;
  • the pnpm-workspace.yaml as written.

Diagnostics only, wrapped in || true — they can never fail the smoke. No
behavior change to the install itself.

Testing

  • bash -n scripts/publish-smoke.sh — clean.
  • Ran the diagnostic block against a representative app dir; it prints the
    resolved version, the only-built-dependencies[] entries pnpm parsed from
    both approval keys, and the workspace file.
  • Faithful install repro on corepack pnpm@11.14.0 (fresh store, CI=true)
    with the current template + appended overrides: both esbuild and a
    transitive better-sqlite3 build, exit 0 — the ERR_PNPM_IGNORED_BUILDS
    failure does not recur.

🤖 Generated with Claude Code


Generated by Claude Code

…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
@vercel

vercelBot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJul 18, 2026 1:30am

Request Review

@os-zhuangos-zhuang added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Jul 18, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review July 18, 2026 02:58
@os-zhuang
os-zhuang merged commit 493544b into mainJul 18, 2026
18 checks passed
@os-zhuang
os-zhuang deleted the claude/publish-smoke-pnpm-builds-1io1io branch July 18, 2026 02:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish Smoke has never passed on main — app install dies on ERR_PNPM_IGNORED_BUILDS despite the allowlist

2 participants

@os-zhuang@claude