feat(pr-management-code-review): always report the branch's conflict state - #1125
Merged
Merged
Conversation
…state The skill read `mergeable` but never `mergeStateStatus`, and GitHub computes `mergeable` lazily — a PR not tested against its base since the last push answers `UNKNOWN`, and keeps answering `UNKNOWN` unless something asks again. In practice every PR in a review session came back `UNKNOWN`, so the headline's "mergeable state" carried no information and conflicts never reached the author. The failure that produces is an approving review on a branch that cannot merge. The author reads the approval as "done" and finds out weeks later, at the merge button, when the reviewer has long moved on. Conflicts stay out of the disposition rules deliberately: a correct PR that merely trails its base should not be gated behind a mechanical rebase. Stating it is enough. Generated-by: Claude Code (Claude Opus 5)
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.
Summary
mergeStateStatusalongsidemergeable, and treatUNKNOWNas "not yet computed" rather than "clean" — re-read once, and say so if it stays unknown.Merge:field to the per-PR headline.posting.md: a conflicting branch is always stated in the review body, whatever the disposition.Motivation
The skill already asked for
mergeable, but GitHub computes it lazily — a PR that has not been tested against its base since the last push answersUNKNOWN, and keeps answeringUNKNOWNunless something asks again. Across a full review session every PR came backUNKNOWN, so the headline's "mergeable state" carried no information and a conflicting branch never reached the author.The failure that produces is an approving review on a branch that cannot merge. The author reads the approval as "done"; the conflict surfaces weeks later at the merge button, when the reviewer has moved on.
Found while reviewing apache/airflow#68359, which was
DIRTYagainstmainthroughout a review that would otherwise have approved it without mentioning the conflict.Design note
Conflicts deliberately do not feed the disposition rules. A PR can be entirely correct and merely trail its base; gating a finished review behind a mechanical rebase wastes a round trip. Stating it is enough. Rebasing stays a triage action per Golden rule 9.
Migration path for existing adopters
No config knob and no opt-out — a doc-contract change to an existing step. Adopters get the extra headline field and the body sentence on their next
/magpie-setup upgrade.Test plan
prek run --filesover all three changed files — all hooks pass (markdownlint, lychee, check-placeholders, skill-and-tool-validate, vendor-neutrality).Drafted-by: Claude Code (Claude Opus 5); reviewed by @potiuk before posting