Skip to content

fix(plugin): let each pinned framework tag install its own plugin - #232

Merged
sourcehawk merged 2 commits into
mainfrom
ci/plugin-version-guard
Oct 6, 2026
Merged

sourcehawk merged 2 commits into
mainfrom
ci/plugin-version-guard

Conversation

@sourcehawk

@sourcehawk sourcehawk commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Description

Consumers pin the marketplace ref to a framework tag, so that the plugin skills match the API they build against. Claude Code caches a plugin by the version in plugin.json. So a release that forgets to change the version keeps pinned users on old skills, as happened from v0.18.0 to v0.22.2. This PR removes the version. Without one, Claude Code caches the plugin by commit, so each pinned tag installs exactly the plugin that it shipped, with no release step.

Changes

  • plugin/.claude-plugin/plugin.json has no version. claude plugin validate passes with a warning that the version is missing.
  • .ai/base.md (and the generated .github/copilot-instructions.md): a rule to not add a version to the plugin or its marketplace entry, and why.

Challenges

A check at release time cannot keep the version right. GitHub runs no workflow for a draft release, so a check runs only when the tag exists, and a bump after the tag never reaches a user pinned to that tag.

Testing

claude plugin validate . passes, with the warning No version specified, and exits 0, so the "Validate Claude plugin" CI job stays green.

🤖 Generated with Claude Code

Claude Code caches a plugin by the version in plugin.json, so a release
that forgets to bump it leaves installed plugins on old content. The new
Release workflow checks the version when a draft is saved or a release is
published. On a mismatch it opens a PR that sets the version through the
contents API, so GitHub signs the commit, links that PR in the job
summary, and fails. When Actions may not create PRs, it links a compare
page that opens the PR in one click.

make plugin-version VERSION=<tag> sets the version for the PR made before
tagging, and the AI instructions add this step to the release rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Draft releases cannot trigger the workflow, and partial branch creation prevents reliable retries.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds release safeguards to keep the Claude Code plugin version synchronized with release tags.

Changes:

  • Adds a plugin-version Make target.
  • Adds automated release validation and corrective PR creation.
  • Documents the release-version requirement.
File Description
Makefile Adds plugin manifest version updates.
.github/​workflows/​release.yml Validates release tags and opens corrective PRs.
.github/​copilot-instructions.md Documents the generated release guidance.
.ai/​base.md Adds the source release guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Claude Code caches a plugin by the version in plugin.json, and consumers
pin the marketplace ref to a framework tag. A version that a release
forgets to change keeps pinned users on old skills, and a version bumped
after the tag never reaches the tag at all. Without a version, Claude
Code caches by commit, so each tag installs exactly the plugin it
shipped. This replaces the release workflow and make target, which
could only check the version after the tag existed, because GitHub
runs no workflow for a draft release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:01
@sourcehawk

Copy link
Copy Markdown
Owner Author

Review round 1 (review base 1f8d491, fixes in b2b60b8)

Both findings were correct, and both are resolved by the removal of the release workflow:

  • Draft releases do not trigger the workflow: confirmed in the GitHub docs for the release event. The check could only run after the tag existed, so the plugin now has no version, and each pinned tag installs the plugin at its own commit.
  • Reruns skip the manifest update on an existing branch: the code that had this fault is removed.

No suppressed findings. Comment check: no comment grew. The four removed comments were in the deleted workflow, with the code that they described.

@sourcehawk sourcehawk changed the title ci(release): fail a release whose plugin version does not match its tag fix(plugin): let each pinned framework tag install its own plugin Oct 6, 2026
@sourcehawk
sourcehawk merged commit bca1bba into main Oct 6, 2026
8 checks passed
@sourcehawk
sourcehawk deleted the ci/plugin-version-guard branch October 6, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused manifest change is valid, documented consistently, and covered by existing plugin validation.

Review effort: Balanced
Findings: None

Resolved since last review (2)

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.

2 participants