CandyMerge: CI/CD as Oracle for Candidate-Driven Merge Conflict Resolution
Preprint 2026
Abstract
Automated merge conflict resolution approaches are typically evaluated against a single reference: the resolution a developer committed. In line with prior empirical findings, we argue that a merge resolution should be judged not by textual similarity to that reference, but by whether it builds and passes the project’s tests. We build our approach on this principle: rather than guess a single answer, use the project’s CI/CD pipeline as an oracle and let compilation and testing pick the best resolution from a set of likely candidates. We present CandyMerge, a candidate-driven merge conflict resolver that treats resolution as a guided search over whole-merge variants—candidate resolutions of the entire merge—built by combining conflict resolution patterns from recent empirical studies. Instead of resolving each chunk independently, it generates coherent variants that resolve all conflicts jointly, ranks them so the most promising are validated first, and returns the best one the oracle identifies.
We evaluate CandyMerge along three axes: search guidance, search efficiency, and resolution quality against the developers’ committed resolutions and competing approaches. We summarize our findings as follows: First, a learned predictor efficiently guides the search toward promising variants, locating the developer’s committed resolution within one or two attempts in the median. Second, contrary to our initial expectation, parallelization and caching do not help a good search order reach the best resolution sooner. Third, on 1,000 real-world merges from 268 Java/Maven projects, CandyMerge’s best validated variant is comparable to or better than the developer’s committed resolution on 90.6% of merges under our build-and-test oracle. CandyMerge trades time for quality: with a single build it matches the best merge tools, and with its full time budget it clearly outperforms every tool we could obtain and apply. Notably, the search sometimes identifies resolutions that build and test better than the developer’s committed resolution (5.6% of merges), highlighting CI/CD-validated, candidate-driven merge conflict resolution as a practical alternative to merely imitating human behavior in automated conflict resolution.