fix: use a fresh UUID instead of run_id for preview publish versions - #841
Merged
Conversation
github.run_id stays the same across re-runs of the same workflow run, so a run that fails after publishing (but before finishing) would collide with itself on retry.
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
8542f16 < |
2026-08-20 07:42 UTC | 0 | 0 | 0 |
Last scanned: 8542f16 · 2026-08-20 07:42 UTC
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
8542f16 |
2026-08-20 07:42 UTC | — | — | — |
8542f16 < |
2026-08-20 07:42 UTC | 0 | 0 | 0 |
Last scanned: 8542f16 · 2026-08-20 07:42 UTC
jinglongchenTS
enabled auto-merge
August 20, 2026 07:47
MirelaPaun
approved these changes
Aug 20, 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.

0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage
Summary
github.run_idstays the same across re-runs of the same workflow run (onlygithub.run_attemptchanges). If a run reaches the publish step and succeeds, but a later step fails, re-running it recomputes the identical0.0.0-<run_id>version and collides with what the earlier attempt already published.Observed for real on a
npm publish pagerrun on #839/#840 today (run 32344017177, attempt 2 of 2) — attempt 1 happened to fail before reaching the publish step, so no collision occurred that time, but the risk is real for any run that fails later.Switches to a UUID generated fresh via
uuidgenon every execution, which has no such collision risk regardless of why or how many times the job is retried.README.mdupdated to match (0.0.0-<run id>→0.0.0-<uuid>).Test plan
0.0.0-$(uuidgen)produces valid semver (checked with thesemverpackage)masterto be testable via a realnpm publishcomment