Skip to content

A Held Wait Exits 0 Under a DIRTY or BEHIND Merge Whose Required Checks Never Ran #3471

Closed

Description

@ptr727

Context

The wait help says a held head exits 0 once its required checks have settled. held_checks_open in scripts/pr_review_checks.py holds for a required context that has not registered only under a BLOCKED merge, and it holds an empty rollup only under BLOCKED, BEHIND, or DRAFT.

What Happens

Take a held pull request whose merge reads DIRTY. GitHub runs no pull_request workflow on a conflicted pull request, so its required checks never register, and no workflow run is open. Nothing settles and nothing is unmet under a merge held_checks_open reads, so the held poll releases and wait exits 0. The help then states that the required checks settled, though none ran. A BEHIND merge with some checks present and a required context missing reaches the same exit.

Suggested Change

Decide which exit a conflicted or behind held head should get. Its checks cannot settle until it is updated, so a code naming that state may fit better than 0. Then make the help and the README's held-wait paragraph say it.

Done When

A held head under DIRTY, or under BEHIND with a required context unregistered, no longer exits 0 while the help claims its required checks settled, and a test covers each.

Activity

  1. added
    bug
    script
    on Oct 25, 2026
  2. ptr727 commented on Oct 25, 2026

    @ptr727
    OwnerAuthor

    A second path with the same shape, found reviewing #3470: when the payload's rollup commit is not the head, head_commit returns nothing, held_checks_open releases on checks_unreadable, and wait exits 0 with only the digest's CHECKS UNREADABLE line saying no check was read. test_an_unreadable_rollup_is_not_held_as_one_not_yet_registered pins that exit deliberately. Once #3470 lands, its help says a covered open head's workflow runs have all completed on exit 0, which this path does not check. The fix for this issue should decide both paths together: an unreadable or never-run set of required checks exits something other than 0, or the help names each exception.

  3. ptr727 commented on Oct 25, 2026

    @ptr727
    OwnerAuthor

    #3473, merged to develop and promoted in #3472, took the help half of this issue's done-when without deciding the exit. The wait help and scripts/README.md now name each path that releases a held head with a required check unregistered:

    • a payload with no commit matching the head, CHECKS UNREADABLE
    • the unregistered-required-check hold, which applies only to a BLOCKED merge whose base branch rules were read and whose rollup is not CHECKS TRUNCATED
    • the empty-rollup hold, which applies only under BLOCKED, BEHIND, or DRAFT, so a merge with some check posted, or a DIRTY one with none, releases short of either hold
    • the completed-run read, which reaches only the head's last 50 check suites and those of its first CHECKS_WINDOW rollup contexts

    What remains here is the exit itself: whether those paths keep exit 0 now that the help says what it does not prove, or move to a code naming the state. The help sentences above are the list a fix would change.

  4. ptr727 commented on Oct 25, 2026

    @ptr727
    OwnerAuthor

    Decided by the maintainer on 2026-10-25: the held-wait paths that release a head whose required checks never ran get a new exit code naming that state, rather than keeping exit 0. This covers a DIRTY merge, a BEHIND merge with a required context unregistered, and the unreadable rollup the earlier comment names. The reason: AGENTS.md "Context and Delegation Discipline" requires a wait to separate a condition met from one it cannot reach, and a conflicted head's checks cannot settle until it is updated.

    The fix rewrites the exit-0 sentences in the wait help and in scripts/README.md's exit table and held-wait paragraph together, since they state the same list.

  5. added a commit that references this issue on Oct 26, 2026
    1b5b677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions