Skip to content

fix(release): verify npm integrity before CDN replication - #285

Merged
DecisionNerd merged 1 commit into
mainfrom
fix/284-npm-integrity-resume
Aug 1, 2026
Merged

DecisionNerd merged 1 commit into
mainfrom
fix/284-npm-integrity-resume

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #284

Summary

  • verify existing and newly published npm tarballs against npm dist.integrity
  • avoid false failures while the public tarball CDN is still replicating
  • retain fail-closed exact-byte comparison and checksum-safe resume

Evidence

  • npm metadata for the published package was live while its tarball URL returned HTTP 404
  • deterministic publisher tests cover matching, newly indexed, drift, and unsupported integrity
  • make pre-push-fast passes

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Note

Verify npm package integrity against dist.integrity before CDN replication

  • Replaces checksum-based verification in publish_npm_artifacts.py with SRI-based integrity checks using npm's dist.integrity metadata.
  • Adds published_integrity(name, version) to fetch dist.integrity from the npm registry instead of downloading and hashing the tarball.
  • Adds archive_matches_integrity(path, integrity) to validate the local archive against one or more SRI tokens (sha256/sha384/sha512); raises if no supported digest is present or if encoding is malformed.
  • Updates publish_one to call these new helpers, report 'integrity matches' on success, and raise on mismatch during both pre-publish checks and post-publish polling.
  • Behavioral Change: previously published packages returning a 404 on the tarball would yield None; now a missing dist.integrity field raises an error.

Macroscope summarized 051160b.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling Developer tooling and automation release:none No release note or version impact labels Aug 1, 2026
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 492756dc-0f12-4a62-a9b6-b1bbb5e86861

📥 Commits

Reviewing files that changed from the base of the PR and between 0005b9c and 051160b.

⛔ Files ignored due to path filters (2)
  • CHANGELOG.md is excluded by !**/*.md
  • docs/reference/changelog.md is excluded by !**/*.md, !**/docs/**
📒 Files selected for processing (2)
  • scripts/ci/test-publish-npm-artifacts.py
  • scripts/publish_npm_artifacts.py

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

@DecisionNerd
DecisionNerd merged commit c2f8834 into main Aug 1, 2026
20 checks passed
@DecisionNerd
DecisionNerd deleted the fix/284-npm-integrity-resume branch August 1, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation release:none No release note or version impact tooling Developer tooling and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release: verify npm publish via registry integrity before CDN replication

1 participant