Skip to content

Commit 493544b

Browse files
os-zhuangclaude
andauthored
ci(publish-smoke): surface the app's resolved pnpm + build approvals before install (#3157)
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. Claude-Session: https://claude.ai/code/session_01MN39HnZs8M92iDGqAMcvsK Co-authored-by: Claude <noreply@anthropic.com>
1 parent fc5a3a2 commit 493544b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

scripts/publish-smoke.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,26 @@ console.log(
171171
);
172172
EOF
173173

174+
# Diagnostics for the ERR_PNPM_IGNORED_BUILDS failure class (#3124). The
175+
# scaffolded app declares NO packageManager field (deliberately — see the
176+
# header), so the `pnpm` that runs HERE is NOT this repo's pinned 10.31.0:
177+
# with corepack enabled, corepack resolves the LATEST pnpm for a directory
178+
# with no pin (11.x today). That divergence is the whole reason #3124's local
179+
# repro (pnpm 10.31/10.33 both honor the allowlist) never reproduced the CI
180+
# red — CI runs a stricter pnpm major. Print the resolved version, the
181+
# build-approval config pnpm actually parsed, and the file it parsed it from,
182+
# so any future red run answers "which pnpm, and did it see the approvals?"
183+
# on its own. Never let a diagnostic fail the smoke (|| true).
184+
log "pnpm environment inside the app (no packageManager pin — corepack resolves latest)"
185+
( cd "$APP_DIR"
186+
echo " pnpm --version: $(pnpm --version 2>&1)"
187+
echo " build-approval config pnpm resolved (onlyBuiltDependencies):"
188+
pnpm config list 2>/dev/null | grep -iE 'only-built|built-dependencies|strict-dep-builds' | sed 's/^/ /' \
189+
|| echo " (no build-related config keys reported)"
190+
echo " pnpm-workspace.yaml as written:"
191+
sed 's/^/ /' pnpm-workspace.yaml
192+
) || true
193+
174194
log "Installing (pnpm, tarball-pinned)"
175195
(cd "$APP_DIR" && pnpm install --no-frozen-lockfile)
176196

0 commit comments

Comments
 (0)