chore(release): gate version drift and autobump server.json - #55
Merged
Conversation
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>
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.
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.ymlverified the tag againstpackage.jsononly, soserver.jsoncould ship stale.What
scripts/check-versions.mjs— CI gate assertingpackage.jsonand everyserver.jsonversion field (top-level + eachpackages[]) share one pinnedX.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, beforenpm ci.publish.yml— runs the gate on tag pushes (fail-fast, before build/test), replacing the oldpackage.json-only bash tag check soserver.jsoncan no longer ship stale.scripts/sync-server-version.mjs+ npmversionhook —npm version X.Y.Zauto-syncsserver.json(surgical string replace, formatting preserved) and stages it, so the bump can't be forgotten.server.jsonis bumped 0.7.0 → 0.7.1 to match currentpackage.json.Verification
npm run check:versionspasses; mismatch and tag-mismatch paths exit 1 as intended.npm version patchend-to-end: theversionhook fired, synced bothserver.jsonfields, and staged it into the version commit alongsidepackage.json/package-lock.json(test bump reverted).🤖 Generated with Claude Code