Skip to content

ci: report required checks correctly for stacked pull requests #1201

Closed

Description

Problem

Stacked pull requests do not reliably receive the CI checks needed to merge.
There are two gaps: CI only starts for pull requests targeting dev, and
retargeting a pull request to dev does not start CI. Manually dispatching CI
does not supply the missing pull-request checks.

Evidence

Observed on November 2, 2026:

The CI trigger at the merged revision
filters pull requests to base dev and listens only for opened,
synchronize, reopened, and ready_for_review, not edited.

Separately, GitHub documents that workflow_dispatch job checks are not
evaluated for pull requests
.
Even a successful run on the exact head neither appears in the PR's checks
section nor satisfies its required status check. This is not a failing test
or a superseded/cancelled CI run.

Proposed scope

  • Start genuine pull_request CI for stacked layers before their parent
    merges, rather than restricting PR CI to base dev.
  • Handle base-changing edited events, including automatic retargeting after
    a parent merges, so CI validates the new base/head combination.
  • Ignore title/body-only edits without cancelling active CI or replacing a
    genuine required-check result with a skipped or successful placeholder.
    Account for both concurrency and the required-check aggregator; adding an
    edited trigger and skipping individual jobs is not sufficient.
  • Preserve draft and fork protections, the existing restrictions on
    self-hosted execution, dev push and merge-queue behavior, and release and
    performance-history publication restrictions. Do not execute PR code in a
    privileged pull_request_target workflow as a workaround.
  • Document stacked-PR behavior and the distinction between manual full-run
    validation and PR-eligible checks.

Acceptance criteria

  • A ready stacked PR targeting another topic branch automatically receives
    genuine CI checks that GitHub evaluates for that PR.
  • Retargeting it to dev, manually or automatically after its parent
    merges, starts qualifying CI without requiring a new commit or close/reopen.
  • Required status check accurately reflects the selected jobs for the
    relevant revision; failed jobs cannot be hidden by an irrelevant edit.
  • Title/body-only edits neither cancel valid runs nor supersede their
    required-check result with a skipped/successful no-op.
  • Regression coverage exercises stacked bases, base-changing edits,
    metadata-only edits, ordinary PR events, and the affected concurrency and
    required-check behavior.
  • Existing draft/fork safeguards and non-PR CI behavior remain intact,
    and the CI documentation describes the new behavior.
  • Validate the reporting end to end on a real stacked PR and its retarget,
    including GitHub's PR check rollup and required-check view, not only the
    workflow run's overall conclusion.

Temporary workaround

After a stacked PR targets dev, closing and reopening it triggers a
qualifying pull_request run under the current configuration. Rerunning or
dispatching manual CI does not repair the missing PR status. No workaround
was applied to #1195 during this investigation.

Activity

  1. added
    confirmedIssue affects multiple people.
    and removed
    bugSomething isn't working
    on Nov 2, 2026
  2. ppenna commented on Nov 3, 2026

    @ppenna
    ContributorAuthor

    Closing as resolved by #1208. We intentionally excluded the edited trigger: stacked pull requests now receive genuine CI checks for their topic branch, and when GitHub retargets a PR to dev without changing its head, the existing Required status check remains attached to that commit. This was verified end to end on scratch PR #1227, including the required-check view after retargeting. Starting a fresh run on retarget and adding edited-handling regression coverage remain intentionally out of scope.

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

Metadata

Metadata

Labels

confirmedIssue affects multiple people.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions