Skip to content

fix(release): floor release version at highest tag + reopen a spuriously-closed release PR (#278) - #280

Merged
Shinrai merged 3 commits into
nextfrom
fix/release-version-collision-and-pr-reopen
Sep 6, 2026
Merged

Shinrai merged 3 commits into
nextfrom
fix/release-version-collision-and-pr-reopen

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

📦 Dependencies

No dependency updates

🔧 Other Changes

👥 Contributors

…sly-closed release PR (#278)

Two follow-ups to the next-reset data-loss fix (#279):

Version collision (#278 fix #2): a concurrent hotfix and next release could both
resolve to the same X.Y.Z (both v0.2.5 in the gh-broker incident), and the
publish step cannot republish an already-shipped version. find-divergence and
create-release-pr's divergence now floor the bump base at the highest existing
release tag (read via git ls-remote --tags), so a base that lags a
just-published tag can no longer recompute a shipped version. Degrades to no
floor when tags cannot be read.

Release-PR auto-close (#278 fix #3): GitHub natively closes the persistent
next -> master release PR whenever next transiently equals master. The plan step
now reopens the most recent closed-but-unmerged next -> base PR (preserving its
number and history) before falling back to creating a fresh one.

Fixes #278
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code type: ci Changes to CI workflows, actions, or build pipelines labels Sep 6, 2026
@Shinrai
Shinrai requested a lite review from Copilot September 6, 2026 07:11

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.

🟢 Approval recommended

The changes directly mitigate the reported release-flow failure mode and the remaining feedback is limited to minor clarity/best-practice nits rather than correctness blockers.

Pull request overview

Addresses release-flow correctness issues in the org-wide “next release” automation by preventing version collisions with concurrently-published tags and by preserving the release PR when it was closed without merging (per #278).

Changes:

  • Reopen the most recent closed-but-unmerged next → base release PR when no open release PR exists, instead of always creating a new one.
  • Floor the computed base version at the highest released vX.Y.Z tag to avoid recomputing a version that already shipped when the default branch view lags tags.
  • Minor logging/message adjustments for clearer workflow output.
File summaries
File Description
.github/workflows/workflow-next-release.yml Adds logic to reuse/reopen the persistent release PR instead of orphaning it when it was closed without merging.
.github/actions/github/jobs/create-release-pr/divergence.mjs Floors base version at the highest released semver tag to avoid shipping-version collisions during concurrent releases.
.github/actions/git/steps/find-divergence/action.mjs Mirrors the same base-version flooring behavior for divergence/version discovery in the git helper action.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Lite

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

@Shinrai
Shinrai enabled auto-merge September 6, 2026 07:19
@Shinrai
Shinrai disabled auto-merge September 6, 2026 15:25
Shinrai
Shinrai previously approved these changes Sep 6, 2026
- find-divergence + create-release-pr divergence: use tryGitArgs (execFileSync,
  no shell) for the tag lookup, consistent with the file's other git calls
  (args are static; this is for consistency, not a fix).
- next-release resolve comment: correct the release-PR close attribution. The
  reset making next == base is what closes the PR — attributed to the identity
  that pushed the ref (the bot, per gh-broker #44 closed_by=cldmv-bot[bot]), not
  a GitHub-native empty-diff close.
@Shinrai
Shinrai merged commit a343189 into next Sep 6, 2026
14 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/release-version-collision-and-pr-reopen branch September 6, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants