publish: retry post-publish install for registry propagation lag#6
Merged
Conversation
…coped GitHub Packages requires an auth token to install even public packages — a platform limitation, not a visibility choice. Publishing to npmjs.org as unscoped `constitution-cli` lets anyone `npm install` with no token. Also updates install docs to recommend a local devDependency + npx over a global install, so the engine version stays pinned per-repo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
First install of a freshly published package can 404 for a short window before npm's CDN catches up (seen on the constitution-cli@0.17.5 publish run). Retry with backoff instead of failing the smoke test on the race. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removes the long-lived npm automation token in favor of GitHub OIDC — npmjs.org now trusts this exact repo + workflow file to mint a short-lived publish token per run. Adds id-token: write permission, bumps npm CLI (trusted publishing needs >= 11.5.1), and publishes with --provenance for the attestation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
constitution-cli@0.17.5succeeded, but the post-publish smoke test's immediatenpm install404'd — npm's registry had a short propagation window before the freshly published version became installable.npm installin a retry loop (6 attempts, linear backoff up to 60s) so the workflow survives that race instead of failing a successful publish.publish.ymlstill referencing the old@chinmaygitscope.Test plan
constitution audit/constitution firewallclean (pre-commit hook)main(no version bump, so publish step no-ops) exercises the retry-wrapped verify step against the already-published0.17.5— should pass on first attempt🤖 Generated with Claude Code