You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add CI check to detect main → new-resolver-config merge conflicts #1295
The new-resolver-config branch is a long-lived feature branch where multiple contributors will land PRs. As main progresses (new features, refactors, dependency updates), the feature branch can silently diverge, leading to painful merge conflicts discovered late when we try to merge the completed feature back to main.
There is no automated way to detect when main and new-resolver-config have diverged to the point where merging would produce conflicts. Without early detection, conflicts accumulate and become harder to resolve.
Acceptance criteria
A GitHub Action runs automatically (on push to main, on a daily schedule, or both) and attempts a trial merge of main into new-resolver-config
If the merge has conflicts, the Action clearly reports which files conflict
If the merge is clean, no action is taken (or a previously opened alert is closed)
The check does NOT actually push any merge commits — it is a dry-run detection only
The team is notified when conflicts are detected (e.g., via an issue, PR comment, or workflow failure visible in the Actions tab)
Notes
Use git merge --no-commit --no-ff in a temporary checkout for the dry-run
Consider running on both schedule (daily) and push to main triggers
Merge direction should be main → new-resolver-config (not rebase, since the branch is shared)
This Action can be removed once new-resolver-config is merged back to main
We implemented a workflow that goes a step further than dry-run detection — it automatically merges main into the feature branch on every push to main.
Why merge instead of dry-run?
A dry-run detects conflicts but still requires someone to manually sync the branch. By actually merging, we keep the branch continuously up to date and only require human intervention when there are real conflicts. This prevents the "conflict debt" problem the issue describes — conflicts never accumulate because main is merged in as soon as it changes.
Conflict handling works the same way: if the merge fails, the workflow opens an issue with the sync-conflict label and instructions to resolve manually. It deduplicates so it won't spam if an open issue already exists.
Extracting feature commits: The merge commits won't make it harder to review or extract the feature work. git log --no-merges main..new-resolver-config cleanly filters out sync merges and shows only feature commits. When merging back to main, GitHub's squash-merge option can collapse everything into a single clean commit if desired.
The workflow also supports workflow_dispatch with a configurable branch name, so it can be reused for future long-lived branches.
PR #1302 has been updated with two additional improvements over the original implementation:
Conflict file listing — when a merge conflict occurs, the opened issue now lists the specific files that conflict, so the team knows exactly what needs manual resolution.
Auto-close resolved issues — when a subsequent sync succeeds (either after manual conflict resolution or because new main changes are compatible), any open sync-conflict issue for that branch is automatically closed. This prevents stale issues from accumulating.
Note: the implementation goes beyond dry-run detection (acceptance criteria #4) and actually merges main into the feature branch. The rationale is explained in the PR description — auto-merging prevents conflict debt from accumulating in the first place, only requiring human intervention for real conflicts.
Activity
LalatenduMohanty commentedon Aug 11, 2026
We implemented a workflow that goes a step further than dry-run detection — it automatically merges
maininto the feature branch on every push tomain.Why merge instead of dry-run?
A dry-run detects conflicts but still requires someone to manually sync the branch. By actually merging, we keep the branch continuously up to date and only require human intervention when there are real conflicts. This prevents the "conflict debt" problem the issue describes — conflicts never accumulate because
mainis merged in as soon as it changes.Conflict handling works the same way: if the merge fails, the workflow opens an issue with the
sync-conflictlabel and instructions to resolve manually. It deduplicates so it won't spam if an open issue already exists.Extracting feature commits: The merge commits won't make it harder to review or extract the feature work.
git log --no-merges main..new-resolver-configcleanly filters out sync merges and shows only feature commits. When merging back tomain, GitHub's squash-merge option can collapse everything into a single clean commit if desired.The workflow also supports
workflow_dispatchwith a configurable branch name, so it can be reused for future long-lived branches.ci: add workflow to auto-sync feature branch with main
ci: add workflow to auto-sync feature branch with main
LalatenduMohanty commentedon Aug 11, 2026
PR #1302 has been updated with two additional improvements over the original implementation:
sync-conflictissue for that branch is automatically closed. This prevents stale issues from accumulating.Note: the implementation goes beyond dry-run detection (acceptance criteria #4) and actually merges
maininto the feature branch. The rationale is explained in the PR description — auto-merging prevents conflict debt from accumulating in the first place, only requiring human intervention for real conflicts.