Skip to content

fix(ci): restore cloud and main checks during pnpm registry outages - #31793

Merged
nwparker merged 3 commits into
mainfrom
nwparker/ci-checks
Oct 22, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/ci-checks

Conversation

@nwparker

@nwparker nwparker commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Cloud Verify, Mobile Checks, and hourly template qualification fail before tests because npm's version-specific pnpm metadata endpoint stalls even while package catalogs and tarballs remain available. Add a shared fallback that installs the exact pinned pnpm through npm with lifecycle scripts disabled, verifies registry signatures and the manifest checksum, and only then executes it. Use it in desktop, mobile, and cloud CI.

Cloud images bootstrap pnpm through the working catalog path and verify signatures before use. Upgrade the broker's Alpine packages to fix CVE-2026-107891 in musl; keep all existing vulnerability gates and remove build tools from runtime images.

Validation: live fallback installation with registry signature, attestation, checksum, and version verification; full cloud test command; 191 focused CI/routing tests; changed-code quality and formatting checks; all three linux/amd64 cloud image builds and runtime smoke checks. Trivy found zero fixable vulnerabilities in all three rebuilt images. The full PR workflow is checked before merge.

@nwparker
nwparker requested a review from Jinwoo-H as a code owner October 22, 2026 03:03
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The changes add a local pnpm setup action with a fallback that installs and verifies the manifest-pinned version. CI workflows use the local action, and workflow path filters and change-scope classification include it. Three Dockerfiles install pnpm in the build stage and copy it into the runtime stage. Tests cover successful fallback execution, signature-audit failure, and lockfile-integrity mismatch.

Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to 4f38c

The cloud images can build with a signed pnpm artifact that differs from the version pinned by the manifest checksum. Verify that checksum in all three Docker builds before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (18 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the CI fix and its purpose during pnpm registry outages. It is concise and matches the main changes.
Description check Passed The description clearly explains what changed, why the fallback is needed, the cloud image updates, and the reported validation. It does not use the required template headings and does not provide an …
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.
Full details: Description check

Explanation

The description clearly explains what changed, why the fallback is needed, the cloud image updates, and the reported validation. It does not use the required template headings and does not provide an explicit linked issue, visual-proof statement, checklist, or AI disclosure. The main required context is present, so the description is mostly complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (18 skipped: 18 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6573ad85-8865-46d0-8789-d3f94c4aeeea
📥 Commits

Reviewing files that changed from the base of the PR and between 5c5f9a2 and 4f38c08.

📒 Files selected for processing: 20
  • .github/actions/install-node-dependencies/action.yml
  • .github/actions/setup-pnpm/action.yml
  • .github/workflows/cloud-deploy-relay-production-capacity-job.yml
  • .github/workflows/cloud-deploy-relay-production-capacity.yml
  • .github/workflows/cloud-deploy-relay-production-multi-target.yml
  • .github/workflows/cloud-deploy-relay-production-same-cap-job.yml
  • .github/workflows/cloud-deploy-relay-production.yml
  • .github/workflows/cloud-monitor-relay-production-job.yml
  • .github/workflows/cloud-operate-relay-asia-admission.yml
  • .github/workflows/cloud-operate-relay-production-rehome-job.yml
  • .github/workflows/cloud-prove-relay-asia-staging.yml
  • .github/workflows/cloud-verify.yml
  • .github/workflows/hourly-mac-build.yml
  • .github/workflows/mobile.yml
  • .github/workflows/pr.yml
  • cloud/apps/push/Dockerfile
  • cloud/apps/relay-fence-broker/Dockerfile
  • cloud/apps/relay/Dockerfile
  • config/scripts/pr-code-change-scope.mjs
  • config/scripts/setup-pnpm-action.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Comment on lines +5 to +6
RUN npm install --prefix /opt/pnpm --ignore-scripts --no-audit --no-fund "$(node -p 'require("./package.json").packageManager.split("+")[0]')" \
&& npm audit signatures --prefix /opt/pnpm

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Verify the manifest checksum before running pnpm.

Line 5 discards the +sha512 value pinned in package.json. npm audit signatures verifies registry signatures, but it does not compare the installed tarball with that manifest checksum. A differently signed artifact for the same version can therefore pass this check and run during the build. Compare the installed pnpm tarball integrity with the manifest checksum before the first pnpm command. Apply the same check in the relay and relay-fence-broker Dockerfiles. (docs.npmjs.com)

@nwparker
nwparker merged commit 8ba1c9b into main Oct 22, 2026
59 checks passed
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