Skip to content

feat(ci): Sync master into release/stable/7.0 - #26024

Merged
MartinZikmund merged 3 commits into
masterfrom
dev/mazi/release-sync
Nov 4, 2026
Merged

MartinZikmund merged 3 commits into
masterfrom
dev/mazi/release-sync

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #26023

PR Type:

🤖 Project automation

What changed? 🚀

The nightly master-sync job now also syncs a temporary release stabilization target. It's set to release/stable/7.0 for now. The job opens or updates one chore(automation): Sync master → release/stable/7.0 PR with everything on master that the release branch is missing. It behaves exactly like the feature/* sync PRs: auto-merge when clean, a draft plus a ping on conflicts, and human resolutions are kept.

#25994 is excluded (version bump to 7.1-dev after branching). Before merging master, the job:

  1. merges the commit just before Version bump after 7.0 release branch #25994's merge commit (its first parent),
  2. records Version bump after 7.0 release branch #25994 as merged with git merge -s ours, so its changes are dropped but it stays in the ancestry,
  3. then merges master as usual.

Because #25994 stays in the ancestry, later nightly runs only bring in what's new. They never try to re-apply the bump, and nobody has to revert it in each sync PR.

Config: two values at the top of the workflow:

STABILIZATION_BRANCH: 'release/stable/7.0'   # '' between releases = disabled
STABILIZATION_EXCLUDED_PRS: '25994'          # comma-separated master PR numbers

When 7.0 ships, set STABILIZATION_BRANCH: ''. For 7.1, point it at release/stable/7.1 and list that release's version-bump PR. If the branch doesn't exist, the job shows a warning and skips it.

Excluding a PR after the sync has started:

  • Sync PR still open: the next run spots that the sync branch took the PR in through a normal merge rather than the bot's exclusion merge. It rebuilds the branch from the release tip with the exclusion applied, even if master hasn't moved. Any conflict fix pushed to that sync branch is dropped and has to be redone. The PR body and a run warning say so.
  • Sync PR already merged: the PR is in the release branch's history, so excluding it does nothing. Revert it manually on the release branch (git revert -m 1 <merge sha>). Later syncs won't bring it back.

Conflict quarantine (also applies to feature/* syncs): every bot commit that contains conflict markers carries a Master-Sync-Conflict: unresolved trailer. Normally a sync branch with human work on it is reused as the base. If the newest bot conflict commit has no human commit on top, the run instead keeps the PR as draft, turns auto-merge off and stops. Before this, a later clean merge could un-draft a PR that still had committed markers in it.

Validation

  • Local simulation against the real refs (origin/release/stable/7.0 + the 3 merge steps above):
    • result vs master: the only difference is version.json (release keeps its 7.0 version) ✅
    • master is an ancestor of the result, so the next run is a no-op ✅
    • 8 files / +499 −44 brought into the release branch (the 8 non-excluded commits)
  • Late-exclusion detection, simulated on the real refs: a sync branch that merged master normally is flagged and rebuilt ✅; one built with the -s ours exclusion is left alone ✅
  • Review fixes, simulated in a scratch repo: exclusions follow ancestry when commit dates disagree with it (the old --no-walk=sorted order was wrong) ✅. Bot markers on top of human work stay quarantined ✅. A later human resolution, or a branch with no conflict commits, lets the run continue ✅. Feature-sync PR bodies are unchanged when there are no stabilization lines ✅
  • actionlint clean.
  • Not yet run on Actions. After merge, trigger workflow_dispatch with dry_run: true first.

Notes

  • release/stable/7.0 allows merge commits. It also has a ruleset "restrict updates" rule, which may block the bot's auto-merge unless the actor can bypass it. Check the first real sync PR; if it can't land, a maintainer merges it or the bot gets bypass.

  • The release branch's existing protection (review + CI) still gates the auto-merge.

  • If master and the release branch have both changed a workflow file, the push needs SYNC_BOT_TOKEN. The workflow header already covers this, and the summary names the cause if it happens.

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_01TXMNtxsNdxekRBBuN5UKmF

Adds a temporary stabilization target to the nightly master-sync job.
PR #25994 (7.1-dev version bump) is recorded as merged with -s ours
so it never reaches the release branch. Clear STABILIZATION_BRANCH
once 7.0 ships.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtxsNdxekRBBuN5UKmF
Copilot AI balanced review requested due to automatic review settings November 4, 2026 10:00
@MartinZikmund MartinZikmund self-assigned this Nov 4, 2026
@github-actions github-actions Bot added the area/build Categorizes an issue or PR as relevant to build infrastructure label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 36s —— View job


Review of #26024: sync master into release/stable/7.0

Verdict: ship, with minor follow-ups. This was a review by inspection only. Nothing was run on Actions or locally, and no files were changed.

Issues: 0 high, 0 medium, 1 low, 1 nit. Both are posted inline.

Cross-cutting notes

  • The exclusion approach (merge sha^1, then merge -s ours sha, then merge master) looks correct. It keeps the excluded PR in the ancestry, and it resumes cleanly after a conflict because the "already an ancestor of HEAD" check skips finished steps.
  • gh pr view needs GH_TOKEN and a repo context in the sync step. Please confirm both are set there. The dry_run: true trigger you plan after merge should catch this.
  • The "Incoming commits" count and range in the PR body still include the excluded PR. That's cosmetic.
  • The release branch needs to allow merge commits, since -s ours merges are created. Please check this against its protection rules.
  • Workflow-only change, so the runtime test, docs and screenshot checklist items don't apply.

Comment thread .github/workflows/master-sync.yml Resolved
Comment thread .github/workflows/master-sync.yml Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Release-branch auto-merge needs maintainer validation in Actions because dry-run skips merge, push, and PR-state handling, leaving token/workflow permissions and partial-conflict recovery unverified.

No open issues 🎉

What changed in this PR

Extends the nightly master-sync automation to temporarily sync master into release/stable/7.0, addressing #26023 while excluding the post-branch version bump in #25994.

Changes:

  • Adds configurable stabilization targets, with a warning and skip when the branch is missing.
  • Records excluded PRs as merged without applying their changes, preserving ancestry for later syncs.
  • Handles conflicts before excluded commits and reports partial progress so subsequent runs can continue from human resolutions.
File Description
.github/​workflows/​master-sync.yml Adds stabilization branch selection, PR exclusions, staged merges, and progress reporting.

Review effort: Balanced

An exclusion added after the sync branch already took the PR in was
ignored, as were the no-op guard and human-work base. Detect it and
rebuild from the target tip. Excluded PRs are now comma-separated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtxsNdxekRBBuN5UKmF
Copilot AI balanced review requested due to automatic review settings November 4, 2026 10:07
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 30s —— View job


Review of #26024: sync master into release/stable/7.0

Verdict: ship, with one low follow-up. This was a review by inspection only. I did not run the workflow, and I changed no files.

Issues: 0 high, 0 medium, 1 low (posted inline).

Cross-cutting notes

  • The exclusion approach (merge sha^1, then merge -s ours sha, then merge master) looks correct. It keeps the excluded PR in the ancestry, and it resumes after a conflict because already-merged steps are skipped.
  • The latest commit adds a rebuild path for a sync branch that already contains a newly excluded commit. It reads sensibly. It discards human resolutions on that branch, and the PR body says so.
  • GH_TOKEN is set on the sync step, so gh pr view has what it needs.
  • STABILIZATION_EXCLUDED_PRS is parsed as comma-separated, but the PR description says space-separated. The workflow comment says comma-separated, so only the description is out of date.
  • dry_run skips the merge, push and PR handling, so those paths are untested until a real run. Run it once on Actions after merge, as the PR plans.
  • The release branch must allow merge commits, because the -s ours merges create them.
  • Workflow-only change, so the runtime test, docs and screenshot checklist items don't apply.

Comment thread .github/workflows/master-sync.yml Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A critical conflict-handling flaw can preserve committed conflict markers after an earlier human resolution, allowing a later clean merge to mark the PR ready and enable auto-merge without resolving the latest conflict.

1 open issue

Review effort: Balanced

Comment thread .github/workflows/master-sync.yml Resolved
- Order excluded merges by ancestry, not commit date
- Keep a sync PR quarantined while bot-committed conflict markers
  sit on top of earlier human work (also affected feature syncs)
- Skip empty stabilization lines in the sync PR body

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtxsNdxekRBBuN5UKmF
Copilot AI balanced review requested due to automatic review settings November 4, 2026 10:26
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 27s —— View job


Review of #26024: sync master into release/stable/7.0

Verdict: ship. This was a review by inspection only. I did not run the workflow, and I changed no files.

Issues: 0 high, 0 medium, 0 low.

Earlier findings, checked against the latest commit (3c55095c)

  • Ordering of excluded PRs: fixed. EXCLUDED_SHAS is now filtered from git rev-list --topo-order --reverse origin/master --not origin/${FEATURE}. That gives ancestry order, so each ^1 merge can't pull in a later exclusion.
  • Copilot's conflict-marker finding: addressed.
    • The bot commits conflicts with a Master-Sync-Conflict: unresolved trailer.
    • When human work exists, the run finds the newest bot conflict commit. If no non-bot commit follows it, the run exits early with the PR still draft and auto-merge disabled.
    • A clean later merge can no longer un-draft a branch that still holds committed markers.
    • A human commit after the latest conflict releases the quarantine, and the earlier human work no longer counts as proof.
  • Empty extra in the PR body: now built as an array, so feature-sync bodies are unchanged.
  • Comma-separated PR list: the workflow parses commas, and only the PR description still says space-separated.

Remaining notes (not blocking)

  • A human who resolves a conflict must push a commit with a non-bot committer name. A resolution that is amended into the bot's commit, or pushed under the bot identity, would keep the PR quarantined.
  • dry_run exits before the merge, push and PR handling. The --trailer commit, the quarantine path and the rebuild path are therefore untested until a real run. Do one real run on a throwaway target before relying on it.
  • The release branch must allow merge commits, because the -s ours merges create them.
  • This is a workflow-only change, so the runtime test, docs and screenshot checklist items don't apply.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

A maintainer should verify the initial Actions run because local simulations do not validate GitHub permissions or the release-sync path’s force-push, draft, and auto-merge transitions.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@MartinZikmund
MartinZikmund merged commit 121aa55 into master Nov 4, 2026
19 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/release-sync branch November 4, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nightly sync of master into release/stable/7.0 while 7.0 stabilizes

2 participants