Skip to content

bug(ci): Maintainer Approval stays failed on earlier runs after approval and blocks merge #6163

Done

Description

@elezar

User Story

As an OpenShell maintainer merging pull requests, I need the OpenShell / Maintainer Approval status to clear on its own once an approval arrives, so that approved PRs do not need a manual workflow re-run before they can merge.

Problem Statement

Maintainer Approval runs on pull_request and again on pull_request_review. A PR that has no approval yet fails the pull_request run, which is expected. When a maintainer approves later, the pull_request_review run passes, but the earlier failed pull_request runs for the same head commit stay failed.

Observed on #6124 (head 522fefd56, approved 2026-12-02 15:00:02Z):

  • Three check runs named OpenShell / Maintainer Approval on the head commit: failure (12:31:13Z), failure (12:42:00Z), success (15:00:19Z, pull_request_review).
  • reviewDecision was APPROVED and the other four required contexts were green, but mergeStateStatus stayed BLOCKED.
  • Re-running the two failed runs (gh run rerun) produced a passing run, and mergeStateStatus became CLEAN.

I could not confirm that the stale failed runs were the cause of BLOCKED; it is the only difference I found before and after the re-run.

Impact / Why This Matters

An approved PR that failed the check before approval cannot merge without someone knowing to re-run the old workflow run. The state does not refresh by itself, and the failed run is not the latest, so it is easy to miss.

Proposed Design

Once a PR has a qualifying approval on its current head, no failed Maintainer Approval run for that head should remain. Options to evaluate:

  • On pull_request_review, re-run the failed pull_request run(s) for the head commit.
  • Have the check report a non-failing pending state when no approval exists yet, and only fail when it can no longer be satisfied.
  • Confirm with GitHub's documented behavior how required checks are evaluated when several runs share a name across check suites, and design around it.

Acceptance Criteria

  • A PR that fails Maintainer Approval before approval reaches mergeStateStatus CLEAN after a qualifying approval, with no manual re-run.
  • The behavior also holds for the Gator approval path.
  • The required status context name OpenShell / Maintainer Approval is unchanged.

Alternatives Considered

Re-running the failed run by hand is the current workaround. It works but depends on the person merging knowing to do it.

Activity

  1. self-assigned this
    on Dec 2, 2026
  2. added
    state:validated
    on Dec 2, 2026
  3. purp commented on Dec 2, 2026

    @purp
    Contributor

    📋 triage-agent

    Validated the reported regression from the workflow history and #6124's recorded runs. PR #6113 added pull_request triggers to the existing review-triggered required job. On head 522fefd56, two pull_request attempts failed before approval (12:31 and 12:42 UTC); a pull_request_review run succeeded at 15:00. The reporter observed the PR remain blocked until the earlier runs were manually rerun. GitHub's records confirm the run sequence, but do not independently establish why its mergeability calculation remained blocked; #6124 has since merged, so that state cannot be rechecked.

    The added triggers are a strong regression candidate: the workflow now creates failing checks before approval and a review creates a separate run. A fix should verify both human and Gator approvals, new commits and dismissed reviews, fork PRs, and merge-queue behavior without allowing an unapproved PR to pass. In particular, a skipped required job can count as successful. The unmerged #4580 and related #4559 contain prior work on a commit-status design and its tradeoffs; they do not establish a fix for this issue.

    Next: the assigned maintainer can decide how to address the regression and verify GitHub's required-check behavior with a live PR. No additional reporter evidence is needed for the observed incident.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

state:validated

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions