Skip to content

A Rollup of Only Unreadable Nodes Is Not Read as Empty by the Held Wait #3488

Closed

Description

@ptr727

Context

check_nodes in scripts/pr_review_checks.py turns a rollup node of an unrecognized GraphQL union member into a node with empty values and an unreadable key. held_checks_open and checks_never_ran read an empty rollup as not nodes.

What Happens

Take an attested held head whose rollup holds only nodes of a type the reader cannot parse. The list of nodes is not empty, so:

  • under BLOCKED, BEHIND, or DRAFT, the empty-rollup hold does not fire, and the poll can release.
  • under DIRTY, checks_never_ran passes its no-check-posted branch, and with no rules read it returns nothing, so wait exits 0.

The wait help and scripts/README.md say an empty rollup holds those merges and exits 45 under DIRTY, though no check was read in either case. GitHub's rollup union holds only CheckRun and StatusContext today, so this is reachable only after an API change.

Suggested Change

Treat a rollup whose every node is unreadable as carrying no readable check, in the empty-rollup hold and in checks_never_ran's no-check-posted branch, or have the help name the exception.

Done When

A rollup holding only unreadable nodes holds a BLOCKED, BEHIND, or DRAFT merge and exits 45 under DIRTY, as an empty one does, with a test for each, or the help and README name the exception.

Found by the local strict review of #3486.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions