Repository navigation
Retry release sync after concurrent branch updates - #1701
David Pine (IEvangelist) with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The retry implementation can become non-deterministic (re-pinning main on each attempt) and currently retries on any push failure rather than confirming a push race, which can mask real failures.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Improves the release-branch sync GitHub Actions workflow to better tolerate concurrent updates to the release branch by adding a refresh-and-retry loop around the merge/push, and adds lightweight regression assertions to ensure the workflow retains this behavior.
Changes:
- Add a 3-attempt loop that re-fetches and re-checks out the release branch before re-running the sync and pushing.
- Emit workflow warnings on transient push rejection and fail after exhausting retries.
- Add script assertions that the workflow includes retry/refresh/push-handling logic.
| File | Description |
|---|---|
| .github/workflows/update-release-branch.yml | Adds refresh-and-retry behavior around the merge helper + push to handle non-fast-forward races. |
| .github/scripts/test-merge-main-into-release.sh | Adds grep-based assertions to enforce the workflow’s retry/refresh contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Summary `Update Release Branch` currently fails on every push to `main` once a merge into `release/X.Y` has a real conflict that the helper can't auto-resolve (e.g. runs 38433783235 and 38436114463 on `component-props.contracts.ts`). It stays red until someone notices and repairs the branch by hand. - The merge helper now exits `3` for "conflicts need human review" (merge aborted, release untouched) instead of a generic failure. - A new `--commit-conflicts` mode commits the merge with conflict markers left in the unresolved files, keeping both parents, and writes the conflicted paths to `$RELEASE_SYNC_CONFLICTS_FILE`. - On exit `3` the workflow pushes a rolling `release-sync/X.Y` branch and opens a **draft** PR into `release/X.Y` that lists the conflicts and the "Create a merge commit, never squash" instructions. The run finishes green with a warning and summary link. - Before doing any work, the workflow checks for an open PR from `release-sync/X.Y`. If one exists it skips the sync, so pushes to `main` no longer repeat the same failure while a human resolves it. After the repair merges, the next push resumes syncing. - The app token now requests `pull-requests: write` (already granted for `update-integration-data.yml`). Non-conflict failures (push rejection, fatal git errors) still fail the job as before. This is independent of #1701 (push-race retry) and #1666 (version config conflicts) and composes with them. ## Third-party links and affiliations None ## Validation - `bash .github/scripts/test-merge-main-into-release.sh`: all cases pass, including new exit-code `3`, `--commit-conflicts` with conflicts, and `--commit-conflicts` on a clean merge. - `bash -n` on the three workflow `run` blocks (extracted from the YAML): passed. - `prettier --check` on the workflow: passed after `--write`. - Dry run against the real `origin/release/17.0` and `origin/main` in a temporary worktree: the default mode aborts with exit `3`, and `--commit-conflicts` produces a two-parent merge listing `src/frontend/tests/typecheck/component-props.contracts.ts` with a clean working tree. - Not run: the workflow end-to-end (PR creation and the skip check need Actions with the app token). --------- Co-authored-by: David Pine <7679720+IEvangelist@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

The release-sync job failed when
release/13.6advanced after checkout but before the automated merge push. The workflow now refreshes the release tip and retries the sync instead of failing on a transient non-fast-forward rejection.mainand the active release branch for each attempt.