Skip to content

claim bot: a queued PR event that runs after the merge reports a false conflict on the merged PR #36

Done

Description

@vpacher

Problem

The PR claim check decides from the event payload whether the PR is open, but it reads the referenced issues live. When a pull_request event is still queued when the PR merges, the run sees the PR as open and the issue the merge just closed. It then reports a false conflict on the merged PR: it adds claim-conflict, posts the conflict comment and fails the check.

Seen on #35:

  1. 12:36:08 UTC: an edit of the PR description queued Claim bot run 45615324507 (pull_request: edited).
  2. 12:36:20: fix: explain a PR claim conflict on the failed check (Fixes #34) #35 was squash-merged and closed claim bot: on a fork PR the label and the explanation fail with HTTP 403, so the author never sees why the check failed #34.
  3. About 12:38: the run reported obs-rust/.github#34 is closed (including duplicates); reference the open issue instead, labelled the merged PR and posted the comment. (Cleaned up by hand: label removed, comment hidden as outdated.)

The same race can happen in every repo that calls the claim bot, for example on obs-studio PRs that merge through the queue while an edit or push event is still waiting for a runner.

Expected

The check reads the PR's live state before it decides. When the PR is no longer open (merged or closed), it writes nothing and passes.

Fix

on_pull_request (workflow/claim_bot.py) already reads the PR's issue object (current = gh.issue(repo, number)). Return before checking conflicts when current is closed.

Activity

  1. vpacher commented on Nov 25, 2026

    @vpacher
    MemberAuthor

    Claiming: #36

    Plan (one PR):

    1. RED: a test where the event payload says open but the live PR is closed, and the issue it references is closed; it expects no write and a passing check.
    2. GREEN: on_pull_request reads the live PR state first and returns when it is not open.

    PR expected today.

  2. added
    ready
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions