Skip to content

Add CI check to detect main → new-resolver-config merge conflicts #1295

Closed

Description

@smoparth

Context

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.

Parent epic: #1254

Problem

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

Activity

  1. LalatenduMohanty commented on Aug 11, 2026

    @LalatenduMohanty
    Member

    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.

  2. added 2 commits that reference this issue on Aug 11, 2026
    7780192
    c994f1b
  3. LalatenduMohanty commented on Aug 11, 2026

    @LalatenduMohanty
    Member

    PR #1302 has been updated with two additional improvements over the original implementation:

    1. 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.
    2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions