Skip to content

fix(release): retry an npm publish that a transient signing failure killed - #1568

Closed
zfy0701 wants to merge 1 commit into
mainfrom
claude/auto-retry-temporary-failures-ecd9d3
Closed

fix(release): retry an npm publish that a transient signing failure killed#1568
zfy0701 wants to merge 1 commit into
mainfrom
claude/auto-retry-temporary-failures-ecd9d3

Conversation

@zfy0701

@zfy0701 zfy0701 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What broke

v1.51.0-rc.2 was tagged but never published. pnpm publish failed with
[CA_CREATE_SIGNING_CERTIFICATE_ERROR] error creating signing certificate - (403) Forbidden
from Sigstore's Fulcio CA while building the provenance attestation. The release job
publishes through npm OIDC trusted publishing, which implies provenance, so every publish
depends on that CA answering.

Why the retry cannot live in the workflow

semantic-release pushes the git tag and its channel note before running publish plugins.
Re-running the job therefore finds the release already made, reports no new version, and
exits — the package never reaches npm, and image publication is skipped for want of a
version output. The retry has to sit inside the publish command, and the publish call is the
retry unit because pnpm attests and uploads in one step.

What changed

scripts/npm-publish-with-retry.sh wraps the pnpm publish line that the daemon, CLI, and
setup publish scripts all shared: three attempts, 20s and 40s apart. An attempt that uploaded
before failing leaves the version on the registry, so a republish conflict counts as done —
matched on the message, because that answer is a 403 as well.

Note that scripts is part of the setup package's change-detection input set (it mirrors the
control-plane image inputs), so this commit alone makes setup publish on the next release —
which also closes the gap left by the failed one. The daemon and CLI input sets do not
include scripts, so they are unaffected.

Testing

Exercised the wrapper against a stubbed pnpm: a transient failure retries and then
succeeds, a republish conflict short-circuits to success, and a permanent failure exhausts
the attempts and exits non-zero.

🤖 Generated with Claude Code

…illed

The release job publishes with npm OIDC trusted publishing, which implies a
provenance attestation, which needs a signing certificate from Sigstore's
Fulcio CA. That call answered `CA_CREATE_SIGNING_CERTIFICATE_ERROR ... (403)
Forbidden` on v1.51.0-rc.2 and took the whole release down with it.

Re-running the job cannot recover that: semantic-release pushes the tag and its
channel note before publish plugins run, so the next run reads the release as
already made, exits with no new version, and the package never reaches npm --
while the image built from the same commit embeds it. The retry therefore has
to sit inside the publish command, and the publish is the retry unit because
attestation and upload are one pnpm call.

Three attempts, 20s and 40s apart. An attempt that uploaded before failing
leaves the version on the registry, so a republish conflict counts as done --
matched on the message, since that answer is a 403 as well.
@zfy0701 zfy0701 closed this Aug 28, 2026
@agentconnect-md-test

Copy link
Copy Markdown
Contributor

Review result: one blocking release-path issue.

v1.51.0-rc.2 is the base tag, and this PR changes only scripts/. However, CLI_PATHS and DAEMON_PATHS exclude scripts, while the lockfile is unchanged. Both publish drivers will therefore report “unchanged” and exit before reaching the new retry wrapper. Only setup detects this change through COMMON.

All three 1.51.0-rc.2 package versions currently return 404. Please add the shared wrapper/publish-driver paths to the CLI and daemon detectors, or otherwise force their recovery publish.

The wrapper passed sh -n under dash, and git diff --check passed. I attempted REQUEST_CHANGES, but GitHub reported the PR was already closed, so the formal review was not submitted.

sent by review-bot (Codex · gpt-5.6-sol) · open in session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant