Skip to content

[Misc] Compare a branch's plugin version against its merge base, not master's tip - #100

Merged
vmassol merged 1 commit into
masterfrom
fix-version-check-merge-base
Sep 1, 2026
Merged

[Misc] Compare a branch's plugin version against its merge base, not master's tip#100
vmassol merged 1 commit into
masterfrom
fix-version-check-merge-base

Conversation

@vmassol

@vmassol vmassol commented Sep 1, 2026

Copy link
Copy Markdown
Member

Jira URL

None — [Misc], follow-up to #99.

Changes

Description

Invariant 6 (added in #99) compared the branch's five version fields against origin/master's
tip
. That answers the wrong question, now that master keeps releasing while a branch is open: a
branch that forked when the version was 1.1.7 and never touched a version field still differs
from a master that has since reached 1.5.1, so it would be told to revert a bump it never made.

Compare against the merge base instead — the point where the branch forked — which is what "did
this branch change the version?" actually means. The failure message now also names the merge base
and the version it expects, since on a stale branch that value is not obvious.

Clarifications

Found while stripping the version bumps out of the five open PRs (#18, #77, #81, #94, #98), whose
fork points range from 1.1.7 to 1.5.0 against a master now at 1.5.1. Without this fix, every
one of them would have gone red the moment its bump was removed — the exact opposite of the intent.

scripts/release.mjs is unaffected: it measures from the last release tag, not from a branch.

Screenshots & Video

Verified against the real PR #18 branch (fork point 986ed9f, version 1.1.7) with master at
1.5.1. As the PR stands today, having bumped the version:

validate.mjs: 1 consistency violation(s):
  - This branch changes the plugin version (... : 1.1.7 -> 1.1.8), but a pull request must not - it
    makes every concurrent PR conflict. Restore the version fields to the 1.1.7 they have at the
    merge base with master (986ed9fd); the release is cut on master by scripts/release.mjs. ...

And with the bump removed, i.e. the version left at its fork-point value of 1.1.7 while master says
1.5.1 — this is the case that was previously a false failure:

validate.mjs: OK (22 skills, Claude + Kimi + opencode versions in sync at 1.1.7, OKF map complete)

Executed Tests

node scripts/validate.mjs        # OK on this branch
claude plugin validate ./xwiki   # Validation passed

Plus the two cases above, run against the real pull/18/head in a throwaway clone with origin/master
pointed at the current master, so nothing was pushed anywhere.

Nothing under xwiki/ changes here, so this correctly triggers no release.

Expected merging strategy

Prefers squash: Yes. No backport branches.

🤖 Generated with Claude Code

…master's tip

* Invariant 6 asked whether the branch's version differed from origin/master's tip, which answers the
  wrong question now that master keeps releasing while a branch is open: a branch that forked at
  1.1.7 and never touched a version field still differs from a master that has reached 1.5.1, so
  every long-lived PR was told to revert a bump it never made. Compare against the merge base
  instead, which is what "did this branch change the version?" actually means.
* Name the merge base and its version in the failure message, so the fix is unambiguous on a branch
  whose fork point is far behind.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vmassol vmassol self-assigned this Sep 1, 2026
@vmassol
vmassol merged commit 8b7f693 into master Sep 1, 2026
4 checks passed
@vmassol
vmassol deleted the fix-version-check-merge-base branch September 1, 2026 14:27
@vmassol
vmassol restored the fix-version-check-merge-base branch September 1, 2026 14:28
@vmassol
vmassol deleted the fix-version-check-merge-base branch September 1, 2026 14:29
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