Skip to content

chore(release): gate version drift and autobump server.json - #55

Merged
basicScandal merged 1 commit into
mainfrom
chore/version-gate-and-autobump
Jul 13, 2026
Merged

chore(release): gate version drift and autobump server.json#55
basicScandal merged 1 commit into
mainfrom
chore/version-gate-and-autobump

Conversation

@basicScandal

Copy link
Copy Markdown
Member

Why

A Starlog release is two publishes — npm (package.json) and the MCP registry (server.json) — with the version hand-bumped in both. They drifted silently once (registry stuck at 0.1.9 while npm was 0.6.0) because nothing cross-checked the manifests. publish.yml verified the tag against package.json only, so server.json could ship stale.

What

  • scripts/check-versions.mjs — CI gate asserting package.json and every server.json version field (top-level + each packages[]) share one pinned X.Y.Z. On a tag push it also asserts that shared version equals the tag. No deps (node builtins).
  • ci.yml — runs the gate on every PR, before npm ci.
  • publish.yml — runs the gate on tag pushes (fail-fast, before build/test), replacing the old package.json-only bash tag check so server.json can no longer ship stale.
  • scripts/sync-server-version.mjs + npm version hooknpm version X.Y.Z auto-syncs server.json (surgical string replace, formatting preserved) and stages it, so the bump can't be forgotten. server.json is bumped 0.7.0 → 0.7.1 to match current package.json.

Verification

  • npm run check:versions passes; mismatch and tag-mismatch paths exit 1 as intended.
  • npm version patch end-to-end: the version hook fired, synced both server.json fields, and staged it into the version commit alongside package.json/package-lock.json (test bump reverted).

🤖 Generated with Claude Code

A Starlog release is two publishes — npm (package.json) and the MCP
registry (server.json) — with the version hand-bumped in both. They
drifted silently once (registry stuck at 0.1.9 while npm was 0.6.0)
because nothing cross-checked the manifests.

- scripts/check-versions.mjs: CI gate asserting package.json and every
  server.json version field share one pinned semver; on a tag push it
  also asserts that shared version equals the tag.
- ci.yml: run the gate on every PR (before npm ci; no deps).
- publish.yml: run the gate on tag pushes, replacing the old
  package.json-only tag check so server.json can't ship stale.
- sync-server-version.mjs + npm `version` hook: `npm version X.Y.Z`
  auto-syncs server.json and stages it, so the bump can't be forgotten.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@basicScandal
basicScandal merged commit 86de1f6 into main Jul 13, 2026
4 checks passed
@basicScandal
basicScandal deleted the chore/version-gate-and-autobump branch July 13, 2026 07:51
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.

1 participant