Skip to content

fix(registry): skip publish when git tag not pushed yet#96

Merged
moshest merged 1 commit into
mainfrom
claude/registry-vitest-publish-fail-se6la3
Jun 15, 2026
Merged

fix(registry): skip publish when git tag not pushed yet#96
moshest merged 1 commit into
mainfrom
claude/registry-vitest-publish-fail-se6la3

Conversation

@moshest

@moshest moshest commented Jun 15, 2026

Copy link
Copy Markdown
Member

Problem

The scheduled publish-all job failed with:

Building npm/vitest@4.1.9...
  FAILED npm/vitest@4.1.9: Git clone failed: ...
fatal: Remote branch v4.1.9 not found in upstream origin
...
Failed: 1
Exit status 1

publish-all discovers 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.9 was published to npm at 07:23 UTC, but the v4.1.9 GitHub tag didn't exist yet when CI ran at 11:52 (latest tag was v4.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.

  • Add isMissingRefError(message) to git.ts (sibling to the existing isTransientGitError), matching git "remote branch/ref not found" / "pathspec did not match" errors. Exported from @neuledge/context.
  • In publish-all, catch these specific errors and count them as skipped rather than pushing them into failures.

Genuine build errors (missing docs, real network failures, repo not found) still fail the job as before.

Validation

  • pnpm lint, pnpm build, pnpm test all pass
  • Added unit tests for isMissingRefError
  • Changeset added (@neuledge/context minor — new exported helper)

https://claude.ai/code/session_01N5iVzHsBqYBZ5oA78kGNsW


Generated by Claude Code

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-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e7d4b9b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@neuledge/context Minor
@neuledge/registry Patch

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

@moshest moshest marked this pull request as ready for review June 15, 2026 15:49
@moshest moshest merged commit 45319fc into main Jun 15, 2026
3 checks passed
@moshest moshest deleted the claude/registry-vitest-publish-fail-se6la3 branch June 15, 2026 15:49
@github-actions github-actions Bot mentioned this pull request Jun 15, 2026
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