Repository navigation
ci(release): skip npm packages an earlier attempt already staged - #1499
Merged
Merged
Conversation
A retry of 5.0.1's npm publish (run 38449949240) failed on the first platform package with `409 Cannot stage previously published version`: the 14 platform packages were already staged by the release run. The fallback that should have skipped them runs `npm stage list`, which can't authenticate in CI because OIDC is exchanged only on publish, so the job never reached the main package. Treat that 409 message as "already staged" in both stage steps, through one inline stage() helper. It stays inline because the job checks out the release tag, which predates any new script. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Mikola Lysenko (mikolalysenko)
enabled auto-merge
October 13, 2026 18:55
Tanmay Singla (Tanmay182003)
approved these changes
Oct 13, 2026
Tanmay Singla (Tanmay182003)
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
5.0.1's main npm package (
@socketsecurity/socket-patch) never staged: the release run got E401 on it after its publisher was fixed. The npm-only retry (run 38449949240) then failed on the first platform package with409 Cannot stage previously published version "5.0.1", because the 14 platform packages were already staged.The "already staged" fallback runs
npm stage list. That can't authenticate in CI, because the OIDC exchange only happens on publish. So the job never reached the main package.What
Both stage steps in
release.yml'snpm-publishjob now use one inlinestage()helper. If the version is already published, it skips. If the registry answers with that 409 message, it counts the package as staged and moves on. Any other failure still fails the step.The helper is inline, not a script, because the job checks out the release tag (
v5.0.1), which doesn't have any new script.After merge
Actions → Release →
npm-retry-version: 5.0.1stages@socketsecurity/socket-patch@5.0.1from CI, with signed provenance like the platform packages got. Then approve it with 2FA after the 14 platform packages.actionlintonrelease.ymlpasses.🤖 Generated with Claude Code
Note
Low Risk
Release workflow-only change to npm staging retry behavior; no runtime or registry credential changes beyond skipping known 409/published cases.
Overview
The npm-publish job’s platform and main stage-publish steps now share an inline
stage()helper that makes partial retries idempotent.Instead of treating
npm stage listas the “already staged” signal (which fails in CI because OIDC only runs on publish), a failednpm stage publishis skipped whennpm viewshows the version is already live, or when registry output containsCannot stage previously published version(409 for a staged-but-unapproved version). Those packages are still recorded instaged-packages.txt; any other error still fails the step. The helper stays inline sonpm-retry-versionruns work when the job checks out an older release tag.Reviewed by Cursor Bugbot for commit e226d75. Configure here.