Skip to content

Label resolver: one of its three head comparisons does not fold case, and edited PRs never reconcile #2655

Open

Description

@easonLiangWorldedtech

What happens

  1. The resolver that decides whether a workflow_run belongs to a PR compares head branch, head SHA and base repository; two fold case and pr.head?.ref === run.head_branch does not. A run whose branch differs only in case resolves to "no PR", and that PR never learns its checks finished.

  2. Reconcile never runs when a PR's title or body is edited. The pull_request_target types are opened, reopened, ready_for_review, converted_to_draft, synchronize, review_requested, review_request_removed, labeled, unlabeled (label-pr-review-state.yml:21-33) - no edited. A description fix does not refresh the labels a maintainer reads.

Evidence

Where the fix is

#2489 carries the resolver fix (4 files, +433/-17; 23/23 checks success at 18:30Z) and waits on a human approval. Adding edited to that same trigger block is a one-line change and is not part of that PR.

Limits

  • Not a claim that the label service fails generally: it reconciles on push, review and comment events plus the hourly sweep. The gaps are case-sensitive branch matching and the missing edited type.
  • A fork account cannot label, merge or edit a workflow file; this states only what the files say.

Activity

  1. easonLiangWorldedtech commented on Nov 22, 2026

    @easonLiangWorldedtech
    ContributorAuthor

    Third defect in the same resolver, measured on #2489 at c3038127b7. codeRabbitReviewComplete is
    freshCodeRabbitReview?.state === 'APPROVED' (label-pr-review-state.yml:1162) and freshCodeRabbitReview
    is null unless the review's commit_id equals pr.head.sha (:1107). A CodeRabbit run that ends skipped
    creates no review object at all
    - Result: Skipped - No files to review - so the resolver reads it
    exactly as never-reviewed: :1189 re-arms awaiting-coderabbit, and the awaiting-maintainer branches
    (:1202, :1205) sit after codeRabbitReviewComplete, so not even a human maintainer approval can move
    such a PR out of awaiting-coderabbit
    . The retry is self-defeating too: :689 writes
    <!-- coderabbit-review-label:<head_sha> --> into the review-guide comment and :1195 re-adds the label
    only when that marker differs from the current head, so once a skipped run has been recorded at a head, that
    head is exhausted - #2489's guide comment 6968021298 (updated 19:29:36Z) already carries c3038127b7 with
    no :pending, and no future trigger will fire there.
    Consequence for contributors: a refresh push whose merge carries no author content (tree byte-identical to
    git's own auto-merge tree) can leave the PR permanently stuck - CI green, review decision unchanged, label
    cycling, and no machine left that will act. Suggested fix shape: treat a completed skipped review at the
    current head as terminal for that head and route it to awaiting-maintainer with a note that a maintainer
    must restart automated review (the workflow already says so at :695).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions