Parent: #15357
Problem
mergeStateStatus: BLOCKED and reviewDecision: REVIEW_REQUIRED are false signals on this
repository, and they cost real diagnosis time.
The Dev_new_gui ruleset requires 1 approving review but grants
RepositoryRole 5 (admin) bypass_mode: always. GitHub computes mergeStateStatus without
accounting for bypass actors, so a PR that the owner can merge right now still reports BLOCKED.
Proof: #15351, #15349 and #15342 all merged with zero approving reviews.
Consequence: every consumer of mergeStateStatus — the drain script, review-queue tooling,
any agent running the "sweep PRs → review → merge" loop — reads a queue of 5 mergeable PRs as a
jammed queue and goes looking for a blocker that does not exist. This happened during the triage
of #15357 itself.
Fix
Establish one repo-local helper that answers "can this PR actually land?" and have every consumer
use it instead of reading mergeStateStatus directly. It must account for:
- bypass actors on the applicable rulesets vs. the acting account's role,
- required status check conclusions (the part that is trustworthy),
- genuine
DIRTY / conflict states.
Audit and convert existing call sites — the drain/readiness script and any workflow or skill that
branches on mergeStateStatus or reviewDecision.
Acceptance Criteria
Implementation Order
Wave: 1
Depends on: none
Unblocks: #15357
Parent: #15357
Problem
mergeStateStatus: BLOCKEDandreviewDecision: REVIEW_REQUIREDare false signals on thisrepository, and they cost real diagnosis time.
The
Dev_new_guiruleset requires 1 approving review but grantsRepositoryRole 5(admin)bypass_mode: always. GitHub computesmergeStateStatuswithoutaccounting for bypass actors, so a PR that the owner can merge right now still reports
BLOCKED.Proof: #15351, #15349 and #15342 all merged with zero approving reviews.
Consequence: every consumer of
mergeStateStatus— the drain script, review-queue tooling,any agent running the "sweep PRs → review → merge" loop — reads a queue of 5 mergeable PRs as a
jammed queue and goes looking for a blocker that does not exist. This happened during the triage
of #15357 itself.
Fix
Establish one repo-local helper that answers "can this PR actually land?" and have every consumer
use it instead of reading
mergeStateStatusdirectly. It must account for:DIRTY/ conflict states.Audit and convert existing call sites — the drain/readiness script and any workflow or skill that
branches on
mergeStateStatusorreviewDecision.Acceptance Criteria
mergeStateStatus/reviewDecisionfor a landability decision convertedImplementation Order
Wave: 1
Depends on: none
Unblocks: #15357