Skip to content

Fix version/bump so plugin.json can't silently drift; sync to 0.9.1 - #126

Merged
tmck-code merged 1 commit into
mainfrom
chore/version-sync-0.9.1
Sep 2, 2026
Merged

Fix version/bump so plugin.json can't silently drift; sync to 0.9.1#126
tmck-code merged 1 commit into
mainfrom
chore/version-sync-0.9.1

Conversation

@tmck-code

Copy link
Copy Markdown
Owner

Context

make version/bump has been silently failing to update .claude-plugin/plugin.json since 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:

✔ yas is already at the latest version (0.8.0).

and were wired into a .../yas/0.8.0 cache path, while pyproject.toml and claude/yas/constants.py had long since moved on to 0.9.1.

Changes

Fix the version/bump sed so it can't drift

  • The target rewrote plugin.json by substituting the current pyproject version by value: sed -i 's/$(shell uv version --short)/$(VERSION)/g'.
  • Once plugin.json fell 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.
  • Now anchored on the "version" key instead, matching the approach already used for constants.py, so an already-drifted file is corrected rather than skipped.

Resync the version literals

  • .claude-plugin/plugin.json: 0.8.00.9.1, matching pyproject.toml and constants.py.
  • No new version bump: pyproject.toml and constants.py are already at 0.9.1, and the point of this PR is to make plugin.json agree with them.

Guard the invariant with a test

  • New test/test_version_sync.py asserts all three version literals agree.
  • plugin.json drift 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

  • Tests added or updated for new/changed behaviour
  • (bug fixes) a regression test now covers the situation so it can't come back

Screenshots / recording

  • N/A — no visible change

Benchmark

  • N/A — no performance-relevant change

System info

Key Value
OS Linux debian-work 6.12.105+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.105-1 (2026-08-24) x86_64 GNU/Linux
Claude Code 2.1.259 (Claude Code)
Terminal TERM=tmux-256color TERM_PROGRAM=tmux SHELL=/bin/bash COLORTERM=truecolor
Locale LANG=en_AU.UTF-8 LC_ALL=
Python Python 3.12.7
uv uv 0.9.17

🤖 Generated with Claude Code

`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>
@tmck-code
tmck-code marked this pull request as ready for review September 2, 2026 23:25
@tmck-code
tmck-code merged commit 9d111a1 into main Sep 2, 2026
6 checks passed
@tmck-code
tmck-code deleted the chore/version-sync-0.9.1 branch September 2, 2026 23:25
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