ci(release): bump mcpb/manifest.json in lockstep + rebuild bundle - #107
Merged
Conversation
The auto-bump job (Step 5 of release.yml) only updates .claude-plugin/plugin.json. mcpb/manifest.json never gets bumped by CI — it only moves when someone runs `make sync-version` locally. So after every PR merge it drifts one version behind, and the next contributor who builds locally trips the mcpb-bundle-integrity CI check because the manifest bump invalidates devkit.mcpb.sources.json. PR #104 hit this; without a fix, every contributor will hit it. There's also a versioning lie: devkit.mcpb advertises the old version (currently 2.1.33) but ships a launcher that reads plugin.json and fetches a newer engine (2.1.34+). This change extends the auto-bump job to: - Set up Go (needed for the launcher cross-compile) - Bump mcpb/manifest.json alongside plugin.json - Run bin/mcpb-build to regenerate devkit.mcpb, the sidecar, and the Windows launcher binary - Stage all changed files in the same bump commit The launcher cross-compile is deterministic (-trimpath, -s -w, no embedded version) so mcpb/server/devkit.exe is usually byte-identical and git add skips it; only the bundle + sidecar actually change. Also converts the bump job's shell steps to env-var style for inputs, matching the pattern recommended by the workflow-edit security reminder (defense in depth — these inputs are repo-controlled, not event-controlled, but env: is cleaner). Manual-bump path (where the merge commit already carries a bumped plugin.json) is unchanged — Step 5 is skipped for those. A follow-up could add a CI check that manual bumps also touch manifest.json + the bundle, but that's out of scope here.
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
mcpb/manifest.jsondrifts behind.claude-plugin/plugin.jsonafter every auto-bump. Two concrete problems:manifest.jsonis hashed intodevkit.mcpb.sources.jsonand zipped intodevkit.mcpb. The next contributor who runsmake sync-versionlocally (e.g. as a side effect ofmake build) bumps the manifest, which invalidates the sidecar and the bundle. Themcpb-bundle-integrityjob inci.ymlthen fails until someone rebuilds the bundle. PR chore: gitignore .antigravitycli/ and sync mcpb manifest to v2.1.32 #104 hit this exact trap.devkit.mcpbadvertises e.g.2.1.33but ships a launcher that readsplugin.jsonand fetches the2.1.34engine. Runtime is fine (the launcher only uses plugin.json), but the bundle's advertised version is wrong.What this changes
In
release.ymlStep 5 (bumpjob — only runs for auto-bumps):actions/setup-go@v5(needed bybin/mcpb-buildto cross-compile the launcher).mcpb/manifest.jsonalongside.claude-plugin/plugin.jsonusingjq.bin/mcpb-buildto regeneratedevkit.mcpb,devkit.mcpb.sources.json, andmcpb/server/devkit.exe.bump to vX.Y.Zcommit.The launcher cross-compile is deterministic (
-trimpath,-s -w, no embedded version), somcpb/server/devkit.exeis usually byte-identical andgit addskips it; only the bundle + sidecar actually change.Also converts the bump job's shell steps to
env:interpolation for inputs (defense in depth — these are repo-controlled, not event-controlled, butenv:is cleaner and satisfies the workflow-edit security reminder).Out of scope
plugin.json(bumped == 'manual'), Step 5 is skipped entirely — this PR doesn't touch that branch. A follow-up could add a CI check that manual bumps also touchmanifest.json+ the bundle, but that's a separate concern.Test plan
Hard to dry-run a release workflow without an actual release. The verification is:
ruby -ryaml -e \"YAML.load_file('.github/workflows/release.yml')\"→ clean).needs.version.outputs.versionmoved toenv:blocks.bin/mcpb-build) already works on Linux (CI'smcpb-launcher-testjob already exercises it onubuntu-latest).mainincludes all five files (plugin.json,manifest.json,devkit.mcpb,devkit.mcpb.sources.json, and possiblydevkit.exe).mcpb-bundle-integritystays green on the next several PRs after this lands (the symptom this is meant to prevent).