Skip to content

Cross-file plugin-version-consistency test (4-file dance enforcement) #657

Description

@michael-wojcik

Problem

The plugin version is tracked in 4 separate files:

  • pact-plugin/.claude-plugin/plugin.json (authoritative)
  • .claude-plugin/marketplace.json
  • README.md (documentation example, plugin-cache subdirectory illustration)
  • pact-plugin/README.md (header)

Plus, as discovered during PR #653 review (B-A1):

  • pact-plugin/commands/bootstrap.md L30 banner illustration

Every version bump requires editing all 5 sites. This is brittle — mistakes have already occurred (PR #653 backend-coder review B-A1 caught the bootstrap.md miss) and will continue to occur as more places quote the version inline.

Proposed solution

Add a CI-runnable test that enforces version consistency:

def test_plugin_version_is_consistent_across_all_sites():
    canonical = read_json(".claude-plugin/plugin.json")["version"]
    assert read_json(".claude-plugin/marketplace.json")["plugins"][0]["version"] == canonical
    assert canonical in Path("README.md").read_text()
    assert f"**Version**: {canonical}" in Path("pact-plugin/README.md").read_text()
    assert canonical in Path("pact-plugin/commands/bootstrap.md").read_text()
    # ... extend as new sites accrete

Or alternatively, a tests/scripts/check-version-consistency.sh invoked from CI.

Acceptance criteria

  • Test (or script) enumerates every site that quotes the plugin version inline.
  • Fails CI when any site drifts from pact-plugin/.claude-plugin/plugin.json (the canonical source).
  • Documents the convention "if you bump the version, run this test locally first" in CONTRIBUTING.md or the version-bump prep memory.

Why deferred from PR #637 / PR #653

Architect's Future-1 design Q3 (PR #653 design doc §5) explicitly carved this out as a separate follow-up to keep #637 focused on the wake_lifecycle race fix.

Cross-references

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions