fix(ci): require PR checks to pass#1461
Merged
Merged
Conversation
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
pimlock
commented
May 19, 2026
TaylorMutch
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore the guarantee that PRs cannot merge until the required CI checks have actually passed for the current PR head. This regressed when CI moved to nv-gha runners: the real checks now run from secure
pushevents on copy-pr-bot mirror branches, so GitHub no longer has a direct PR-triggered required check proving those workflows ran.Related Issue
N/A
Why This Is Needed
OpenShell uses copy-pr-bot mirror branches because workflows that check out and run contributor code must not run directly from arbitrary
pull_requestevents on NVIDIA/self-hosted runners. The secure path is: a trusted reviewer or trusted commit flow causes copy-pr-bot to mirror the PR head topull-request/<N>, and the real CI workflow runs from the trusted in-repo push event.That security model creates a GitHub status gap: the checks that do the real work are triggered by
push, so they are disconnected from the PR lifecycle. If copy-pr-bot does not mirror a PR, or the mirror branch is stale, the PR can appear to have green or non-blocking checks even though the required push workflow did not run for the current PR head.Required CI Gatesadds the missing link. It runs in PR context without checking out or executing PR code, inspects the trusted mirror branch and matching push workflow runs, then publishes required statuses on the PR head SHA.Changes
Required CI Gates, apull_request_target/workflow_runworkflow that publishes separateOpenShell / ...commit statuses for branch checks, E2E, GPU E2E, Kubernetes E2E, and Helm lint.pr-merge-base, a reusable composite action that resolves the merge-base needed to diff apull-request/<N>mirror push against the PR base branch.Helm Lintto always trigger on mirrored PR pushes, then usetj-actions/changed-filesto skip expensive Helm jobs unless Helm inputs changed.Gate Workflow
For each required workflow,
Required CI Gatesevaluates the PR head SHA and the copy-pr-bot mirror state:pull-request/<N>branch, publishpendingwith guidance to wait for or request copy-pr-bot mirroring via/ok to test <SHA>.pull-request/<N>exists but points at a different SHA, publish the samependingstatus because the mirror still needs to be refreshed via/ok to test <SHA>.pending.event=pushrun for that SHA and mirror branch is still running, publishpending.failure.success.successwhen the label is absent, and enforce the workflow only when the label is present.Rollout Follow-Up
After the new
OpenShell / E2E,OpenShell / GPU E2E, andOpenShell / Kubernetes E2Estatuses are required in the ruleset and verified on real PRs, remove the old E2E-only gate workflow in a follow-up PR.Follow-up cleanup:
.github/workflows/e2e-gate.yml..github/workflows/e2e-gate-check.yml.E2E Gatereferences fromCI.md.OpenShell / ...E2E statuses.Keep
.github/workflows/e2e-label-help.yml; it still helps maintainers re-run the underlying label-gated push workflows after applying E2E labels.Testing
actionlintpassed for modified workflows, ignoring the known customlinux-amd64-cpu8runner label warning..github/actions/pr-merge-base/action.ymlas YAML.git diff --checkpasses.mise run pre-commitpasses.mise run pre-commitwas attempted but is currently blocked by unrelated existing workspace issues: untrackedtest-policy.yamlis missing an SPDX header, and pre-existing ignored files underarchitecture/plans/fail markdownlint.Checklist