Repository navigation
fix(npm): repair broken publish pipeline and installer fallback - #67
Merged
Merged
Conversation
npm publishing has been failing silently since 2026-04-07. The registry sits at 1.8.1 while git tags are at v1.17.0 — nine minor releases that never shipped to the primary install channel. Three separate faults, each of which hid the next: 1. `continue-on-error: true` on the publish step meant a failed publish still reported the release as successful. Removed, so a publish failure now fails the release. 2. publish-npm.sh runs under `set -e`, so the first platform package E404 aborted the script before the root package was published — which is why the root stayed at 1.8.1. Platform failures are now collected and re-raised at the end, so one bad platform no longer blocks the others or the root package, and CI still goes red. 3. install.js pinned its redirect allowlist to objects.githubusercontent.com. GitHub now serves release assets from release-assets.githubusercontent.com, so every download failed and checksum verification was silently skipped. The allowlist now matches the githubusercontent.com parent domain and requires https, and is covered by tests. This was added 2026-07-09, three months after the last successful publish, so it never reached a user. Restores `postinstall: node install.js` as a fallback alongside the platform packages: install.js returns early when the matching optionalDependency already provided the binary, and otherwise downloads from GitHub Releases. A platform package that fails to publish now degrades to a download instead of leaving no binary at all. Note: the underlying E404 is a credential problem this commit cannot fix. NPM_TOKEN can write the existing @tawandotorg/claude-sync but cannot create new packages in the @tawandotorg scope; it needs read/write on the whole scope. Until it is rotated, releases will now fail loudly rather than silently.
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 26, 2026
## [1.17.1](v1.17.0...v1.17.1) (2026-07-26) ### Bug Fixes * **npm:** repair broken publish pipeline and installer fallback ([#67](#67)) ([0911b2a](0911b2a))
|
🎉 This PR is included in version 1.17.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
npm publishing has been failing silently since 2026-04-07. The registry is at
1.8.1while git tags are atv1.17.0— nine minor releases that never reached the primary install channel, including the/resumehistory fix and thesync_pathsfix.@tawandotorg/claude-sync@tawandotorg/claude-sync-*platform packagesThree faults, each of which hid the next:
continue-on-error: trueon the publish step meant a failed publish still reported the release green. That is why this went unnoticed for 16 weeks. Removed.publish-npm.shruns underset -e, so the first platform-package E404 aborted the script before the root package was published — the direct cause of the root being stuck at 1.8.1. Platform failures are now collected and re-raised at the end, so one bad platform blocks neither the others nor the root package, and CI still goes red.install.jspinned its redirect allowlist toobjects.githubusercontent.com. GitHub now serves release assets fromrelease-assets.githubusercontent.com, so every download failed and checksum verification was silently skipped along the way. Now matches thegithubusercontent.comparent domain and requires https. Added 2026-07-09, three months after the last successful publish, so it never reached a user.Also restores
postinstall: node install.jsas a fallback alongside the platform packages, per the chosen design:install.jsreturns early when the matchingoptionalDependencyalready supplied the binary, and otherwise downloads from GitHub Releases. A platform package that fails to publish now degrades to a download instead of leaving no binary at all.Verification
./bin/claude-sync --version→claude-sync version 1.17.0node --test, includingevilgithubusercontent.com,githubusercontent.com.evil.com,github.com.evil.com, and http downgrade — all correctly rejected. Wired into CI, since the installer is the primary distribution path and had no test coverage.bash -n,node --check, YAML and JSON parse clean;make checkpasses.Action required that this PR cannot do
The underlying E404 is a credentials problem.
NPM_TOKENcan write the existing@tawandotorg/claude-syncbut cannot create new packages in the@tawandotorgscope — npm returns 404 rather than 403 to avoid leaking package existence.Rotate it to a granular token with read/write on the whole
@tawandotorgscope, not just selected packages. Until then, releases will now fail loudly instead of silently — which is the intended behaviour, but expect red release runs until the token is replaced.Reviewer note
Removing
continue-on-errormeans the later "Publish to GitHub Packages" step (if: success()) is now skipped when the npm publish fails. I left that as-is deliberately: a half-published release shouldn't propagate to a secondary registry. Easy to make the two channels independent if you'd rather.