fix(registry): skip publish when git tag not pushed yet#96
Merged
Conversation
The publish-all job discovers versions from registry APIs (npm/pip) but builds by cloning the matching git tag. When a registry publishes a version before its git tag lands (e.g. vitest 4.1.9 on npm with no v4.1.9 tag yet), the clone fails and the whole job exits 1. Detect missing-ref git errors via a new isMissingRefError helper and treat them as a skip in publish-all — the next run picks the version up once the tag is pushed. https://claude.ai/code/session_01N5iVzHsBqYBZ5oA78kGNsW
🦋 Changeset detectedLatest commit: e7d4b9b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Problem
The scheduled
publish-alljob failed with:publish-alldiscovers versions from registry APIs (npm/pip/maven) but builds each one by cloning the matching git tag. When a registry publishes a version before its git tag is pushed, the clone fails. In this run,vitest@4.1.9was published to npm at 07:23 UTC, but thev4.1.9GitHub tag didn't exist yet when CI ran at 11:52 (latest tag wasv4.1.8). One missing tag failed the entire job (36 succeeded, 1 failed → exit 1).Fix
Treat a not-yet-pushed tag as a skip, not a hard failure — it self-heals on the next run once the tag lands.
isMissingRefError(message)togit.ts(sibling to the existingisTransientGitError), matching git "remote branch/ref not found" / "pathspec did not match" errors. Exported from@neuledge/context.publish-all, catch these specific errors and count them as skipped rather than pushing them intofailures.Genuine build errors (missing docs, real network failures, repo not found) still fail the job as before.
Validation
pnpm lint,pnpm build,pnpm testall passisMissingRefError@neuledge/contextminor — new exported helper)https://claude.ai/code/session_01N5iVzHsBqYBZ5oA78kGNsW
Generated by Claude Code