Skip to content

fix(release): wait for npm metadata before verifying publish - #50

Merged
przeprogramowani merged 2 commits into
masterfrom
fix/cli-publish-verify-race-20260916
Sep 16, 2026
Merged

przeprogramowani merged 2 commits into
masterfrom
fix/cli-publish-verify-race-20260916

Conversation

@przeprogramowani

Copy link
Copy Markdown
Owner

Cause

Direct publish-npm.yml published @przeprogramowani/10x-cli@1.22.1 from d21ba2d, then immediately fetched registry metadata. npm had accepted the package (being processed) but dist.tarball was still missing → Cannot read properties of undefined (reading 'tarball'). Tag and GitHub Release were skipped. 1.22.1 tag/Release were completed separately after byte verification; this PR is the durable path.

Change

  • scripts/publish-npm-verify.mjs: bounded poll (backoff, 3 minute cap, attempt logs) until metadata has dist.tarball and dist.integrity, then the same strict pack/gitHead/byte compare. Never republish on mismatch or timeout.
  • After pack, decide: version absent → publish; already on npm and bytes match cli_sha → skip publish (resume tag/Release only).
  • Publish step runs only when steps.decide.outputs.action == 'publish'. Verify always runs.

Proof

Local: new tests 5/5, typecheck, lint 0 errors, actionlint on publish-npm.yml. No merge in this PR. No Toolkit/PR47 changes.

claude and others added 2 commits September 16, 2026 17:18
Direct publish-npm verified immediately after npm accepted 1.22.1,
while registry metadata still lacked dist.tarball. Poll until
integrity exists, then keep the strict pack/gitHead compare. When
the version is already on npm and matches the pack from cli_sha,
skip publish and only complete tag/Release.
@przeprogramowani
przeprogramowani merged commit 43d6a69 into master Sep 16, 2026
12 checks passed
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.

2 participants