fix: don't fail the release on npm propagation timeout after our own publish - #276
Conversation
The previous commit made verify_integrity treat an unreadable registry digest as success at every call site. #272 asks for that only right after this run's own successful npm publish, where the upload itself is the correctness signal and a propagation timeout must not abort the release. The other two call sites never uploaded anything: a package that already exists (the idempotent re-run, and the --verify-only mirror check before the canonical publication) and a version that a concurrent run published first. There the registry digest is the only proof that the package is ours, so an unreadable digest fails closed again. A digest mismatch still fails everywhere. The release handoff test now covers both fail-closed paths and asserts the ::warning:: annotation of the soft path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hacktron Security Check - SkippedReason: OSS PR review limit reached for this approved repository and developer. New OSS PRs for this repository will resume at the start of the next cycle.
|
|
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 configurationConfiguration used: Repository: fortemate/dicechess-engine/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAfter this run successfully publishes a package, an integrity read timeout now produces a warning instead of failing. Other integrity checks, including mirror verification and concurrent publication checks, remain fail-closed. ChangesPublish integrity verification
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PublishScript
participant NpmRegistry
participant GitHubActions
PublishScript->>NpmRegistry: Publish package
PublishScript->>NpmRegistry: Poll published integrity
NpmRegistry-->>PublishScript: Integrity remains unavailable
PublishScript->>GitHubActions: Emit warning annotation when enabled
Merge Risk: ⚪ Minimal · up to A successful publish can continue when npm’s digest is slow to appear, while the other integrity checks still fail. No merge-blocking issue was found. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
|
|
@CodeRabbit review |
✅ Action performedReview finished.
|



Summary
Supersedes #273.
Ops: Releasekeeps failing after a successfulnpm publishbecause the npmjs.org read-after-write delay outlasts any fixed poll budget (#132, #266, #272). #273 (Jules) downgraded the unreadable-digest timeout inverify_integrityto a warning, but at every call site, and Hacktron flagged that as fail-open (finding). The finding holds for two of the three call sites.This branch keeps the Jules commit (cherry-picked with
-x) and adds one commit that limits the soft timeout to the call site #272 asks about:verify_integritycall sitenpm publish::warning::annotation, the release continues--verify-onlymirror check before the canonical publicationnpm publishfailed but the version appeared (concurrent run)A mismatched digest still fails at every call site.
Changes
npm-publish-if-missing.sh:verify_integrity after-publishon the twonpm publishsuccess branches; every other call keeps the fail-closed default.test-npm-release-handoff.sh: new cases where an unreadable digest fails the--verify-onlymirror check and the concurrent-publication path; the soft path now also asserts the::warning::annotation.For the reviewer
CD: Publish npmjs.orgchecks it, the canonical publication does not start andOps: Releasedoes not reach the GitHub Release. That is the gate doing its job, and the incidents behind Release: npm publish should not fail when registry propagation-check times out #272 were on npmjs.org, but the third item of the Release: npm publish should not fail when registry propagation-check times out #272 Definition of Done reads broader. Please confirm.CD: Publish npmjs.orgrun.Ops: Releaseonly watches that run (gh run watch --exit-status), so the parent run shows nothing. After a soft timeout nothing re-checks the npmjs.org digest; a final fail-closed--verify-onlyagainst npmjs.org at the end ofOps: Releasewould restore that without blocking the bookkeeping steps. Not in this PR.Test plan
mise run package:test-handoffpasseserror: unreadable mirror digest passed verification.mise/liband.mise/tasks(the CI command) is cleanmise run spdx:checkpasses--verify-onlyand re-run) and concurrent paths fail on an unreadable or empty digest, the post-publish path passes with a warning, a mismatch failsCloses #272
🤖 Generated with Claude Code