Repository navigation
feat(runway): Classify failed merges and name conflicting files so a request can fail as a merge conflict - #1158
Open
roychying wants to merge 2 commits into
Conversation
roychying
force-pushed
the
chenghan.ying/sq-runway-conflict-kind
branch
from
December 1, 2026 17:56
507ff33 to
127d2b8
Compare
roychying
force-pushed
the
chenghan.ying/sq-runway-conflict-kind
branch
from
December 1, 2026 18:25
127d2b8 to
f04efde
Compare
roychying
marked this pull request as ready for review
December 1, 2026 18:29
roychying
force-pushed
the
chenghan.ying/sq-runway-conflict-kind
branch
from
December 2, 2026 17:25
f04efde to
c90264e
Compare
roychying
force-pushed
the
chenghan.ying/sq-runway-conflict-kind
branch
from
December 2, 2026 22:23
c90264e to
3a47ce3
Compare
…request can fail as a merge conflict
…erge failure as rejected merges, not conflicts
roychying
force-pushed
the
chenghan.ying/sq-runway-conflict-kind
branch
from
December 2, 2026 22:55
3a47ce3 to
b160d79
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
When Runway can't merge a request, the orchestrator only sees
Outcome_FAILEDand a reason string, so a merge conflict ends asland_failed, like any other merge failure. The author can't tell "rebase and resolve the conflict" from "something went wrong, resubmit", and nothing says which files conflict.What?
MergeResultgets two additive fields:failure_kind(field 6):FAILURE_KIND_UNSPECIFIED,FAILURE_KIND_CONFLICTorFAILURE_KIND_INVALID_REQUEST;conflicting_files(field 7): the conflicting paths, when the merger can tell.merger.ConflictError{Files, Err}wrapsErrConflictwith the paths.merger.FailureKind(err)andmerger.ConflictingFiles(err)read them back. The merge and merge-conflict-check controllers set both fields on a failed result. The OSS git merger reports its unmerged paths.merger.ErrRejectedis a new terminal error for a merge the backend refused without calling it a conflict, so it fails asland_failed, notmerge_conflict. It covers aPROMOTEtarget that is no longer a fast-forward because the branch moved, and a merge GitHub reports as failed, which it doesn't separate from a rule or a moved head. Both used to beErrConflict.merge_conflictcategory, both in the land-conflict check (including its repair resend) and at land time (corerequest.LandFailure). It records up to 10 paths under theconflicting_filesmetadata key. Any other failure staysland_failed.request.failedpayloads carryconflicting_files, one path per line.A Runway that doesn't set the new fields yields
FAILURE_KIND_UNSPECIFIED, so a conflict still ends asland_failed, as before. Mixed versions are safe in both directions.Test Plan
bazel test //runway/... //submitqueue/....make lint check-gazelle check-mocks.merge.pb.gowas regenerated; no other generated file changed.merge_conflict, with its conflicting file in the event, 3 seconds after it was received.Issue