Skip to content

Fix provenance 409 - #2755

Merged
remusao merged 2 commits into
masterfrom
fix-provenance-409
Nov 12, 2026
Merged

remusao merged 2 commits into
masterfrom
fix-provenance-409

Conversation

@remusao

@remusao remusao commented Nov 12, 2026

Copy link
Copy Markdown
Owner

No description provided.

@remusao remusao added the PR: Internal 🏠 Changes only affect internals label Nov 12, 2026
- Root cause: npm provenance uploads a signed entry to Sigstore's Rekor log
  with a 5s timeout. Rekor has been slow, so the client timed out after Rekor
  had stored the entry, resent it, got 409 "equivalent entry already exists",
  and `sigstore` (hard-coded `fetchOnConflict: false`) failed the publish:
  v7.4.25 published only tldts-utils and tldts-tests.
- Fix: patch sigstore 5.0.1 (used by lerna's libnpmpublish) to fetch the
  existing entry on conflict (it is ours: same signature and ephemeral key, so
  provenance stays valid) and to wait 30s instead of 5s, since that fetch hits
  the same slow Rekor. Drop once sigstore-js#1791 ships.
- Root cause: npm has no multi-package transaction, so a failure mid-publish
  leaves an already-pushed version partly on npm, with nothing to finish it.
- Fix: if publishing fails, run `lerna publish from-package` once more (it
  publishes only the missing packages), only when this run made the release
  commit (HEAD != GITHUB_SHA), HEAD is tagged with lerna's version, and HEAD
  is on origin/master. The manifests are restored first (a failed publish
  leaves lerna's `gitHead` in them, which `from-package` rejects), so the
  bytes match the tag; the release concurrency group keeps a newer release
  from running in between. If the retry fails too, cut a new version.
@remusao
remusao merged commit b6b7184 into master Nov 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Internal 🏠 Changes only affect internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant