Skip to content

fix(release): make registry publishing re-runnable and independent - #4

Merged
adhikjoshi merged 1 commit into
mainfrom
fix/resilient-registry-publish
Aug 24, 2026
Merged

fix(release): make registry publishing re-runnable and independent#4
adhikjoshi merged 1 commit into
mainfrom
fix/resilient-registry-publish

Conversation

@adhikjoshi

@adhikjoshiadhikjoshi commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The v0.1.2 release published five of six npm platform packages, tripped npm's spam heuristic on the sixth, and took PyPI down with it.

GitHub release ✅ 11 assets
Homebrew cask ✅ 0.1.2
npm platform ⚠️ 5/6 — win32-x64 got 403 "Package name triggered spam detection"
npm entry ❌ never reached
PyPI ❌ step never ran

Nothing was user-visible-broken: the entry package never published, so nobody could install a half-resolved tree. That is the platform-first ordering doing its job.

Three faults, all in the wiring rather than the packages:

1. npm spam detection. Six similarly-named packages published back to back tripped it on the sixth. It's rate-shaped, not permanent — publishes are now paced and that specific 403 is retried with backoff.

2. A retry could not recover. npm refuses to republish an existing version, so re-running would have failed on the five that succeeded and never reached the sixth. Already-published versions are now skipped, which makes re-running the release job the correct recovery for a partial publish.

3. PyPI was hostage to npm. They're independent registries. The upload now runs with if: always() and --skip-existing.

Also fixes a repeat of an earlier mistake of mine: secrets is not an available context in a step-level if, so the guard reads the mapped env var.

Verified against the live registry

modelslab-cli-darwin-x64 YES -> skip
modelslab-cli-linux-x64 YES -> skip
modelslab-cli-win32-arm64 YES -> skip
modelslab-cli-win32-x64 NO -> publish
modelslab-cli NO -> publish
403 spam detection -> retry
429 Too Many Requests -> retry
cannot publish over ... -> skip (already there)
402 payment required -> fatal

It identifies exactly the two packages v0.1.2 left unpublished.


View with [code]smithAutofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The v0.1.2 release published five of six npm platform packages, tripped npm's
spam heuristic on the sixth, and took PyPI down with it. Three separate faults,
all in how the publish steps were wired rather than in the packages themselves.
npm publishing moves into packaging/npm/publish.sh
- npm's spam detection refused the sixth similarly-named package in a row with
`403 Package name triggered spam detection`. It is rate-shaped, not permanent,
so publishes are paced and that specific failure is retried with backoff.
- npm refuses to republish an existing version, so a naive retry of a partial
release fails on everything that already succeeded and never reaches what
did not. Versions already on the registry are skipped, which makes re-running
the release job the correct recovery.
- A conflict raised between the check and the publish is treated as success
rather than an error; it means a concurrent run got there first.
- Platform-before-entry ordering is unchanged and now enforced in one place.
PyPI no longer depends on npm succeeding
- They are independent registries. `if: always()` on the upload, and
`--skip-existing` so a re-run after a partial upload is safe rather than a
guaranteed failure on the versions that already landed.
- Also fixes a repeat of an earlier mistake: `secrets` is not an available
context in a step-level `if`, so the guard reads the mapped env var.
Verified the skip and retry logic against the live registry: it identifies
exactly the two packages v0.1.2 left unpublished, classifies spam and 429 as
retryable, publish-conflict as already-done, and everything else as fatal.
@adhikjoshi
adhikjoshi merged commit 57d77eb into mainAug 24, 2026
8 checks passed
@adhikjoshi
adhikjoshi deleted the fix/resilient-registry-publish branch August 24, 2026 16:33
Sign up for freeto 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

@adhikjoshi