Fix version/bump so plugin.json can't silently drift; sync to 0.9.1 - #126
Merged
Conversation
`make version/bump` rewrote .claude-plugin/plugin.json by substituting the current pyproject version *by value*. Once plugin.json drifted by a single release the pattern stopped matching, the sed silently no-opped, and every subsequent bump left it behind -- it had been stuck at 0.8.0 since the 0.8.1 release while pyproject and constants.py moved on to 0.9.1. That file is what the plugin installer resolves, so users were told "already at the latest version (0.8.0)" and installed into a 0.8.0 cache path. Anchor the substitution on the "version" key instead, so a plugin.json that has already drifted is corrected rather than skipped, and add a test asserting all three version literals agree. Co-Authored-By: Claude Opus 5 <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.
Context
make version/bumphas been silently failing to update.claude-plugin/plugin.jsonsince the 0.8.1 release. That file is what Claude Code's plugin installer resolves the version from, so users running the install script were told:and were wired into a
.../yas/0.8.0cache path, whilepyproject.tomlandclaude/yas/constants.pyhad long since moved on to 0.9.1.Changes
Fix the
version/bumpsed so it can't driftplugin.jsonby substituting the current pyproject version by value:sed -i 's/$(shell uv version --short)/$(VERSION)/g'.plugin.jsonfell even one release behind, that pattern no longer matched anything, the substitution silently no-opped, and every subsequent bump left it further behind — a one-time drift became permanent."version"key instead, matching the approach already used forconstants.py, so an already-drifted file is corrected rather than skipped.Resync the version literals
.claude-plugin/plugin.json:0.8.0→0.9.1, matchingpyproject.tomlandconstants.py.pyproject.tomlandconstants.pyare already at 0.9.1, and the point of this PR is to makeplugin.jsonagree with them.Guard the invariant with a test
test/test_version_sync.pyasserts all three version literals agree.plugin.jsondrift is invisible at runtime — nothing imports it, no test touched it, and it only surfaces as the installer reporting a stale "latest version" — so it needs a test rather than a convention.Checklist
Screenshots / recording
Benchmark
System info
🤖 Generated with Claude Code