Repository navigation
fix(release): verify all npm release tarballs - #13045
Conversation
|
Warning Review limit reached
Next review available in: 4 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release workflow adds artifact verification jobs for TypeScript, Rust, and pnpr packages. Each job compares packed payloads with staged files, runs an installation smoke test, and gates the corresponding publish job. ChangesRelease artifact verification
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ReleaseWorkflow
participant VerificationJob
participant NpmTarballs
participant InstalledWrapper
ReleaseWorkflow->>VerificationJob: start product-specific verification
VerificationJob->>NpmTarballs: pack release packages
VerificationJob->>NpmTarballs: compare payload files by SHA256
VerificationJob->>InstalledWrapper: run install script and --version smoke test
VerificationJob-->>ReleaseWorkflow: permit publishing
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoVerify packed Rust npm tarballs before publishing in release workflow
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.github/workflows/release.yml:
- Around line 440-443: Update the manifest.files validation loop in the release
workflow to process only regular files, not directories. Add a file-type check
before invoking tar and checksum validation, while preserving the existing
checks for listed files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2d46b8b0-9d03-45f0-89f6-09327a9b43fe
📒 Files selected for processing (1)
.github/workflows/release.yml
Confidence Score: 5/5Safe to merge — the new verify jobs are read-only (no write permissions, no OIDC token), all publish jobs still run in their existing environment-gated contexts, and the skip-cascade for conditional releases (Rust, pnpr) is correct. The changes add defensive verification gates before publishing and make no functional changes to the publish steps themselves. All previously flagged issues have been resolved: smoke-test tarballs are guarded with test -n, the zero-iteration loop now throws on empty manifests, and absent declared payload files now cause a hard failure. The job structure is correct and the security boundary between verification and OIDC-enabled publishing is preserved. No files require special attention. Reviews (3): Last reviewed commit: "fix(release): verify declared package pa..." | Re-trigger Greptile |
PR Code Suggestions ✨Latest suggestions up to 8c81259 Warning
Previous suggestionsSuggestions up to commit 7f36ae1
Suggestions up to commit dc1e99c
Suggestions up to commit bdf7bb3
✅ Suggestions up to commit 66bd3e4
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Code review by qodo was updated up to the latest commit dc1e99c |
dc1e99c to
7f36ae1
Compare
|
Code review by qodo was updated up to the latest commit 7f36ae1 |
|
Code review by qodo was updated up to the latest commit 8c81259 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
170-198: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the duplicated pack+hash verification loop into one shared script. The same manifest-parsing + payload-hash-comparison logic (only the hash tool differs by OS) is copy-pasted into all three new verify jobs; keeping it in one place removes the risk of the checks drifting apart as the workflow evolves.
.github/workflows/release.yml#L170-L198: replace this inline block with a call to a shared script (e.g..github/scripts/verify-npm-package.sh <package-dir>), passingshasum -a 256for this macOS job..github/workflows/release.yml#L490-L519: call the same shared script for eachpnpm/npm/*package dir, passingsha256sumfor this Linux job..github/workflows/release.yml#L787-L817: call the same shared script for eachpnpr/npm/*package dir, passingsha256sumfor this Linux job.🤖 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 @.github/workflows/release.yml around lines 170 - 198, Extract the shared manifest parsing, tarball packing, and payload hash verification into a reusable .github/scripts/verify-npm-package.sh accepting a package directory and hash command. Replace the inline logic at .github/workflows/release.yml lines 170-198 with calls for each package, passing shasum -a 256; update lines 490-519 and 787-817 to call the same script for each package, passing sha256sum. Preserve the existing package lists and verification behavior at all three sites.
🤖 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 @.github/workflows/release.yml:
- Around line 170-198: Extract the shared manifest parsing, tarball packing, and
payload hash verification into a reusable .github/scripts/verify-npm-package.sh
accepting a package directory and hash command. Replace the inline logic at
.github/workflows/release.yml lines 170-198 with calls for each package, passing
shasum -a 256; update lines 490-519 and 787-817 to call the same script for each
package, passing sha256sum. Preserve the existing package lists and verification
behavior at all three sites.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 536d1784-a265-460c-9167-6e8b19c04124
📒 Files selected for processing (1)
.github/workflows/release.yml
Summary
Adds pre-publish verification gates for every npm package released by this workflow: Rust pacquet, the v11 JavaScript CLI and
@pnpm/exe, and pnpr. Dedicated read-only verification jobs pack generated packages, verify declared literal payload files are non-empty and byte-for-byte identical to their source artifacts, and smoke-test the relevant installed command before a separate trusted-publishing job can run.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting. (Releaseworkflow only.)
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit