Skip to content

Skip a Null GraphQL Node in pr_review.py reviewer_nodes Instead of Crashing wait #3392

Closed

Description

@ptr727

Problem

scripts/pr_review.py wait can crash with a traceback when the pull request's comments connection returns a null entry in nodes. reviewer_nodes() calls n.get("author") on every node, so a None node raises:

File "scripts/pr_review.py", in answered_outside_review
    comments = reviewer_nodes(pr, "comments")
File "scripts/pr_review.py", in reviewer_nodes
    if (n.get("author") or {}).get("login") == login
AttributeError: 'NoneType' object has no attribute 'get'

The wait exits 1 with that traceback rather than with one of its documented outcomes, so a driver reads it as neither "met", "pending", nor a named failure.

When it was seen

It came from the first wait run against a freshly opened pull request, seconds after attest posted its comment and a third-party review bot posted its own. A read of the same connection a minute later returned only non-null nodes, and the identical wait run then completed normally. So the null entry looks transient, consistent with GraphQL returning null for a list item it could not resolve at read time (with a matching entry in errors).

Reproduce

Feed reviewer_nodes() a payload whose comments.nodes holds a None, for example {"comments": {"nodes": [None, {"author": {"login": "copilot-pull-request-reviewer"}}]}}. It raises the same AttributeError.

Done when

  • reviewer_nodes(), and any sibling that iterates a GraphQL nodes list the same way, skips or reports a null entry rather than raising.
  • Whether a null node should make the read count as blind, the way window_blind treats an untrustworthy window, is decided rather than left to the crash.
  • A unit test covers a nodes list holding None.

Activity

  1. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown, round 1 file claim.

    Group issues: #3392, #3677
    Branch: feature/burndown-3392-3677
    Predicted file set:

    • scripts/pr_review.py
    • scripts/pr_review_rounds.py
    • scripts/pr_review_digest.py
    • scripts/tests/test_pr_review.py
    • .agents/skills/merge-and-release/SKILL.md and its generated copies under .github/skills/ and .claude-plugin/

    Another group must not edit these files until this branch merges or the claim is released here.

  2. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Claim correction for this group: the test file is tests/test_pr_review.py (repo-root tests/), not the scripts/tests/ path the claim above names. Branch and other files unchanged.

  3. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Claim released: group branch feature/burndown-3392-3677 merged into develop as #3689 and is cleaned up. The scripts/README.md follow-up is #3688.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions