Repository navigation
fix(ci): verify artifact integrity after duplicate npm publication - #49
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe release script now publishes validated tarballs and handles duplicate-version rejections by checking registry metadata. The release workflow invokes this command, and tests and release guidance describe the confirmation behavior and its failure cases. Changesnpm release publication
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant ReleaseWorkflow
participant ReleaseScript
participant NpmRegistry
ReleaseWorkflow->>ReleaseScript: Invoke publish with prepared version
ReleaseScript->>NpmRegistry: Publish validated tarball
NpmRegistry-->>ReleaseScript: Publish result
ReleaseScript->>NpmRegistry: Read version metadata after matching duplicate rejection
NpmRegistry-->>ReleaseScript: Version and SHA-512 integrity
Merge Risk: ⚪ Minimal · up to The release job now recovers from a duplicate npm upload only when the registry confirms the same tarball integrity. All other failures still fail the job. No merge-blocking risk was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new recovery path preserves publishing permissions and provenance, requires matching artifact integrity, and never republishes during confirmation. Already-visible versions still use the older version-only skip check, so integrity confirmation is not universal across reruns. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
A later push retried npm publication of 0.6.0 after the release run had already succeeded. The metadata guard missed the existing version, and npm rejected the duplicate upload. Recover that explicit rejection only when fresh registry metadata confirms the validated tarball’s SHA-512 integrity.
The publish step now runs through the release script. Duplicate confirmation makes at most five registry reads, with two seconds between reads and the existing 30-second request timeout. Registry reads request cache revalidation. Authentication errors, other publish errors, metadata failures, unavailable versions and integrity mismatches remain failures; the recovery path never republishes.
The external adopter report correctly identified the first release attempt’s Go checksum-database 404 for
gateway/v0.6.0. Its conclusion that npm was unpublished became outdated: attempt 2 subsequently passed and published 0.6.0. The release guide records both that incident and the later duplicate-upload failure, with links to the runs. This change does not bypass checksum verification or publish a new release.Validation:
node --test .github/scripts/release.test.mjs— 13 passing tests, including delayed visibility, matching/mismatched integrity, non-duplicate errors, bounded confirmation and registry failure.actionlint .github/workflows/release.yml— passed.git diff --check— passed.Summary by CodeRabbit