Commit 521f99f
feat(pm): H16 — report an open non-draft PR stuck in a merge conflict (#9985)
A merge conflict starts no CI run, raises no event and turns no check red, so
every proxy signal a patrol reads keeps reporting health — and with auto-merge
armed the PR additionally reads as "the queue is handling it". None of H1-H15
could express the state; the measured specimen hung ~4h with nobody aware.
H16 flags an open, non-draft PR whose `mergeable_state` is `dirty` past
MERGE_CONFLICT_STALE_HOURS (2h), naming the PR and the card(s) it holds.
Report-only, an ordinary row in both renderers.
- `mergeable_state` is absent from the /pulls LIST payload, so this is the
first item needing a per-PR GET. `h16NeedsDetail` bounds it to candidates
the list row already settles as stuck-shaped; the gathering policy is
exported and pinned, and can never be narrower than the predicate.
- `unknown`/null readings are SKIPPED, never vouched for: GitHub computes
mergeability asynchronously, so that reading is "ask again later".
- `auto_merge` is deliberately NOT read in H12's finding-reducing direction —
auto-merge does not resolve conflicts, so an armed dirty PR is the disease.
- A failed detail GET never fails the sweep; NO candidate readable at all is a
transport classification (#4690), not a clean board.
Self-test 292 -> 352 cases.
Claude-Session: https://claude.ai/code/session_01AeA3nU1B5Q2pgxqxgUrexd
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 240ad14 commit 521f99f
1 file changed
Lines changed: 425 additions & 5 deletions
0 commit comments