Skip to content

Stop caching pnpm in npm publishers - #4217

Merged
rossirpaulo merged 2 commits into
canaryfrom
agent/fix-npm-publish-cache-cleanup
Jul 27, 2026
Merged

rossirpaulo merged 2 commits into
canaryfrom
agent/fix-npm-publish-cache-cleanup

Conversation

@rossirpaulo

@rossirpaulo rossirpaulo commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • use actions/setup-node@v6 directly in the Node.js and Web npm-only publishers
  • preserve the npm registry configuration required for trusted publishing
  • add a release-contract regression test that prevents either publisher from re-enabling the unused pnpm cache

Why

The 0.15.1-nightly.20260727.a Node and Web packages were successfully uploaded with OIDC provenance, but both release jobs failed afterward in the shared setup action's pnpm cache post-step. These publisher jobs intentionally install no pnpm dependency tree, so the cache path does not exist and should not be configured.

Validation

  • python3 -m unittest scripts.tests.test_release_pipeline_contract (20 tests)
  • YAML parsing for both changed workflows
  • actionlint for both changed workflows (excluding pre-existing SC2055 in untouched Web publish code)
  • applicable pre-commit hooks
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Updated the Node.js and Web SDK publishing workflows to use a standardized Node.js setup and to explicitly configure npm registry access.
    • Ensured npm publishing no longer relies on pnpm-specific caching behavior.
  • Tests

    • Added contract tests that verify both npm publishing workflows keep the expected Node.js setup and registry configuration, and do not enable pnpm caching.

@rossirpaulo
rossirpaulo marked this pull request as ready for review July 27, 2026 10:51
@vercel

vercel Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jul 27, 2026 11:23am
promptfiddle Ready Ready Preview, Comment Jul 27, 2026 11:23am
promptfiddle2 Ready Ready Preview, Comment Jul 27, 2026 11:23am

Request Review

@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – beps July 27, 2026 10:52 Inactive
@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b794e66-001e-4ebd-a50b-135ad5b2de09

📥 Commits

Reviewing files that changed from the base of the PR and between 9fa65e8 and 3dce767.

📒 Files selected for processing (1)
  • scripts/tests/test_release_pipeline_contract.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/tests/test_release_pipeline_contract.py

📝 Walkthrough

Walkthrough

Changes

NPM publisher setup

Layer / File(s) Summary
Direct npm workflow setup
.github/workflows/publish2-nodejs-sdk.yaml, .github/workflows/publish2-web-sdk.yaml
Both publishing workflows use actions/setup-node@v6, retain the latest Node version, configure the npm registry, and remove the repository composite setup action.
Publisher workflow contract validation
scripts/tests/test_release_pipeline_contract.py
Contract helpers and tests reference both workflows and verify npm setup while rejecting pnpm cache configuration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A bunny hopped through workflows bright,
Swapped pnpm shadows for npm light.
Node setup now runs clean and true,
With contracts checking each step too.
Hop, hop—publish with delight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: preventing pnpm caching in npm publisher workflows.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-npm-publish-cache-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 27, 2026 10:57 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
scripts/tests/test_release_pipeline_contract.py (1)

934-942: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Scope the contract assertions to the publisher job and parsed inputs.

These whole-file string checks can pass if another job contains actions/setup-node@v6, and cache: "pnpm" would evade the literal cache: pnpm check. Parse each workflow’s publish-npm job and assert the actual setup-node step’s registry-url and cache values.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/tests/test_release_pipeline_contract.py` around lines 934 - 942, The
test test_npm_publishers_do_not_enable_an_unused_pnpm_cache must parse each
workflow’s publish-npm job instead of scanning the whole file. Locate the actual
setup-node step and assert its registry-url equals the npm registry, its cache
value is not pnpm regardless of YAML quoting, and the job does not use the local
setup-node action.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@scripts/tests/test_release_pipeline_contract.py`:
- Around line 934-942: The test
test_npm_publishers_do_not_enable_an_unused_pnpm_cache must parse each
workflow’s publish-npm job instead of scanning the whole file. Locate the actual
setup-node step and assert its registry-url equals the npm registry, its cache
value is not pnpm regardless of YAML quoting, and the job does not use the local
setup-node action.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b6fc5d4-7eb6-4679-a6f5-cbaac8c61943

📥 Commits

Reviewing files that changed from the base of the PR and between 01f9b1a and 9fa65e8.

📒 Files selected for processing (3)
  • .github/workflows/publish2-nodejs-sdk.yaml
  • .github/workflows/publish2-web-sdk.yaml
  • scripts/tests/test_release_pipeline_contract.py

Copy link
Copy Markdown
Contributor Author

Addressed CodeRabbit’s valid contract-test nit in 3dce767bf: the test now scopes itself to each workflow’s publish-npm job, isolates the actual Setup Node.js step, parses that step’s with: inputs (including quoted scalars), and asserts the exact registry plus absence of cache: pnpm. The 20 release-contract tests and applicable pre-commit hooks pass.

@vercel
vercel Bot temporarily deployed to Preview – beps July 27, 2026 11:01 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 27, 2026 11:09 Inactive
@github-actions

Copy link
Copy Markdown

Binary size checks passed

✅ 7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 27.3 MB 11.6 MB file 27.1 MB +190.2 KB (+0.7%) OK
✅ packed-program Linux 🔒 17.7 MB 7.3 MB file 17.6 MB +38.7 KB (+0.2%) OK
✅ baml-cli macOS 🔒 21.2 MB 10.1 MB file 21.0 MB +182.2 KB (+0.9%) OK
✅ packed-program macOS 🔒 13.8 MB 6.4 MB file 13.8 MB +49.7 KB (+0.4%) OK
✅ baml-cli Windows 🔒 22.8 MB 10.3 MB file 22.7 MB +162.3 KB (+0.7%) OK
✅ packed-program Windows 🔒 14.7 MB 6.5 MB file 14.7 MB +35.1 KB (+0.2%) OK
✅ bridge_wasm WASM 16.5 MB 🔒 4.5 MB gzip 4.5 MB +29.8 KB (+0.7%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 27, 2026 11:23 Inactive
@rossirpaulo
rossirpaulo added this pull request to the merge queue Jul 27, 2026
Merged via the queue into canary with commit 5963412 Jul 27, 2026
73 checks passed
@rossirpaulo
rossirpaulo deleted the agent/fix-npm-publish-cache-cleanup branch July 27, 2026 11:36

This branch was previously deployed

3 inactive deployments
Preview – promptfiddle — 3dce767b Deployed Jul 27, 2026 by vercel[bot]
Preview – promptfiddle2 — 3dce767b Deployed Jul 27, 2026 by vercel[bot]
Preview – beps — 3dce767b Deployed Jul 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant