Skip to content

PRs with heads predating a required workflow are silently unmergeableΒ #3136

Description

@devantler

πŸ€– Generated by the Agentic Engineer

Evidence

A PR whose head commit predates the introduction of the org-required workflow βœ… Validate Go Project
can never be enqueued, because the requirement is evaluated against check runs that only exist if the
workflow fired for that head β€” and it cannot fire retroactively.

Measured today, as a controlled pair:

PR head pushed βœ… Validate Go Project runs
#2734 2026-07-19T02:36:26Z 0
#2738 2026-07-19T02:36:42Z 0
#2739 2026-07-19T02:36:55Z 0
#2742 2026-07-19T02:37:01Z 0
#2703 today 1
#2728 today 1
#2731 today (after refresh) 1

Why this is hard to see, which is the worst part

Every visible signal says the PR is fine. On #2731 before the refresh:

  • all 21 check runs success/skipped, including the required CI - Required Checks
  • ruleset requires 0 approving reviews
  • mergeStateStatus: BLOCKED with nothing on the head explaining it
  • gh pr merge exited 0 and printed nothing, and the PR was simply not queued

The only surface that names the cause is the GraphQL enqueue mutation:

enqueuePullRequest(...) β†’
  UNPROCESSABLE: Pull request Required workflow 'βœ… Validate Go Project' is not satisfied

The workflow has no repo-local file (it is injected org-side from
devantler-tech/actions/.github/workflows/validate-go-project.yaml) and does not appear in this
repository's actions/workflows list, so there is nothing in-repo to point at either.

Impact

This is the mechanical reason the mid-July codex/* cohort has sat unmerged for ~3.5 weeks. Those PRs
were read as blocked on review capacity; review is a real second problem, but even a fully reviewed one
among them could not have been enqueued. It also silently wastes review quota: a PR is reviewed, found
clean, and then refuses to merge for a reason no reviewer or check surfaces.

Smallest useful change

Refreshing the head (merge main in, or any new commit) makes the workflow fire and clears it β€” that
is what unblocked #2731. That is a workaround per PR, not a fix.

Worth deciding between:

  • treating a head-refresh as a standard step when adopting a new required workflow, and sweeping the
    existing backlog once; and/or
  • surfacing the real reason in the merge path, so a silent exit 0 non-enqueue cannot happen again β€”
    reading the enqueue error rather than gh pr merge's exit code.

Acceptance criteria

  • every open PR whose head predates the requirement is either refreshed or explicitly closed
  • the merge path reports the enqueue rejection reason instead of exiting 0 silently
  • a note in the repo's AGENTS.md ## Maintenance records that mergeStateStatus: BLOCKED with a
    fully green head means an unsatisfied required workflow, and names the mutation that reveals it

Rough size: small for the detection/documentation half; the backlog sweep is proportional to the
cohort (~27 PRs).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions