Skip to content

fix(next-reset): carry late merges onto the release instead of dropping them - #361

Merged
Shinrai merged 2 commits into
nextfrom
fix/next-reset-preserve-late-merges
Oct 4, 2026
Merged

Shinrai merged 2 commits into
nextfrom
fix/next-reset-preserve-late-merges

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Oct 4, 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

No other changes

👥 Contributors

…ng them

After a next → master release squash-merged, next-reset force-reset next
(and hotfixes) to the release commit unconditionally, so a PR that merged
into next between the release merge and the reset vanished: not in the
release, not on next, still shown as merged. Five Dependabot/bot
auto-merges were lost this way on 2026-10-04.

New action git/steps/reset-branch-after-release replaces force-reset-branch
for both branches:

- branch == release PR head → move it to the release commit (as before)
- release already an ancestor of the branch → no-op (re-runs are safe)
- commits merged after the release PR was cut → replay each late
  first-parent commit onto the release commit (merge-tree with the first
  parent as base, so merges are flattened and the shipped pre-squash
  history never becomes reachable again), publish through the Git Data
  API so GitHub signs each commit for the bot App, list them in the run
  summary and comment on each PR
- a replay conflict → leave the branch untouched, fail, open an issue
  and comment on every affected PR

Every ref update is a compare-and-swap against the tip the plan was built
from: GraphQL updateRefs with beforeOid, then git push
--force-with-lease=refs/heads/<branch>:<sha>. A refusal re-reads the
branch; if it moved, the plan is rebuilt from the new tip. Only if both
CAS paths are refused with the branch unmoved does a guarded REST force
update run, followed by an audit of PRs merged into the branch since the
release.

The wait-for-tags gate now runs only in CLDMV/.github. In consumer repos
it polled the repo's own vN tag, which is unrelated to the @v4 actions
they run (some have none, so it always waited the full 2 minutes); that
delay was the window in which the lost merges landed. sync-branches now
starts immediately when the gate is skipped.

The hotfix lane's merge of master into next (#278/#279, #334) is
unchanged. The App token now requests pull-requests and issues write
for the PR comments and the failure issue.

Fixes #360
@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 type: config Changes to repository or project configuration files type: documentation Relates to docs, README updates, guides, or inline code comments labels Oct 4, 2026
Shinrai
Shinrai previously approved these changes Oct 4, 2026
escapeCell escaped | but not \, so a commit subject containing a
backslash could swallow the escape added for a following pipe and break
the run-summary / PR-comment table (CodeQL js/incomplete-sanitization,
alert #111). Escape backslashes first, then pipes, and flatten line
breaks. Covered by new tests.
@Shinrai
Shinrai merged commit 0f854c7 into next Oct 4, 2026
15 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/next-reset-preserve-late-merges branch October 4, 2026 07:55
cldmv-bot Bot added a commit that referenced this pull request Oct 4, 2026
…ping…

## 🚀 What's Changed

### 💥 Breaking Changes
_No breaking changes_

### ✨ Features
_No new features_

### 🐛 Bug Fixes
- #363
  - fix(tag-health): run tag re-sign/re-point git commands without a shell (e57f7d1)
  - fix(sync-release-notes): escape backslashes in summary table cells (6fd4d8a)
  - fix(tag-health): re-sign and re-point tags in place instead of delete + recreate (3a42470)
  - fix(release): stop tag-health unpublishing releases; release notes from changelog files (4ee38d3)

- #361
  - fix(next-reset): escape backslashes in summary table cells (4f01a0c)
  - fix(next-reset): carry late merges onto the release instead of dropping them (259ad07)

### 📦 Dependencies
_No dependency updates_

### 🔧 Other Changes
- #363
  - chore(release-notes): run release-notes tests in npm test; lint and format fixes (d88d3cb)
  - chore(tag-health): drop unused gitCommand import in fix-non-bot-tags (649e9a7)



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

<!-- co-authors -->

Co-authored-by: Shinrai <[email protected]>
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 type: config Changes to repository or project configuration files type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants