fix(release): skip already-published npm packages so job reruns are idempotent - #51
Conversation
…dempotent npm hard-rejects publishing over an existing version, so a rerun of a partially-failed publish-npm job died on the platform packages before reaching togl-cli (hit on v0.5.1: four platform packages published, wrapper blocked). Guard each publish with an npm view existence check — the npm equivalent of uv publish --check-url. Claude-Session: https://claude.ai/code/session_014DjTALJi3LJhYmrdpw6Rej
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe release workflow now checks whether each package version exists on npm before publishing, skipping packages that are already available. Changesnpm publishing
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
Pull request overview
This PR makes the npm release workflow rerunnable by skipping npm publish for packages that already exist at the release tag’s version, avoiding npm’s hard failure on republishing the same version. This directly improves reliability of the publish-npm job when a prior run partially succeeded.
Changes:
- Add per-package registry prechecks (
npm view <pkg>@<version>) before publishing platform packages. - Add a similar precheck for the
togl-cliwrapper package so reruns can proceed past already-published artifacts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
crossbeam-epoch 0.9.18 -> 0.9.20 (RUSTSEC-2026-0204, invalid pointer deref in fmt::Pointer) and anyhow 1.0.102 -> 1.0.103 (RUSTSEC-2026-0190, Error::downcast_mut unsoundness). cargo audit is clean after the bumps. Claude-Session: https://claude.ai/code/session_014DjTALJi3LJhYmrdpw6Rej
npm hard-rejects publishing over an existing version, so a rerun of a partially-failed
publish-npmjob dies on the platform packages before reachingtogl-cli(exactly what happened on v0.5.1: all four platform packages published with provenance, then the wrapper's stale trusted-publisher config failed it, and reruns were blocked). Each publish now checks the registry first and skips existing versions — the npm equivalent ofuv publish --check-url.Merging this as
fix:triggers the v0.5.2 release PR, whose gated release will publish all five npm packages (wrapper included) via OIDC — completing the npm destination and validating the corrected trusted publishers end to end.https://claude.ai/code/session_014DjTALJi3LJhYmrdpw6Rej
Summary by CodeRabbit