Skip to content

pr_review.py wait Matches a Required Check by Name Alone, Ignoring the Rule's integration_id #2839

Closed

Description

@ptr727

What happened

#2837 made pr_review.py wait hold an attested head while a check the base branch's rules require has not registered. The hold matches a rule's context against the rollup by name alone. A ruleset entry can also carry an integration_id, which binds the requirement to one app.

Why it matters

A check from another app that happens to share the required name satisfies the name match. The wait then stops holding while the check the rule actually binds has not posted, and returns 0 on a merge that still reads BLOCKED. The same name from two apps is uncommon, so this is a narrow gap rather than a routine one.

On #2837 the decline reply to the review finding raising this said such a case would still end in CHECKS_PENDING. That is not guaranteed by the code, so the gap stands.

Done looks like

Where a required entry names an integration_id, a rollup node satisfies it only when its app matches. A CheckRun's app is readable from its check suite. A StatusContext carries no app, so it satisfies an entry with an integration_id only as GitHub's own matching would. Tests cover a same-name node from a different app not satisfying the rule.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions