Skip to content

ci: add a single PR Gate job for the Code OSS workflow - #344110

Merged
Alexandru Dima (alexdima) merged 3 commits into
mainfrom
agents/gatekeeper-job-optimization
Oct 25, 2026
Merged

Alexandru Dima (alexdima) merged 3 commits into
mainfrom
agents/gatekeeper-job-optimization

Conversation

@alexdima

@alexdima Alexandru Dima (alexdima) commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

The Code OSS workflow reports 23 required checks. Fifteen of them (<OS> / <job>) come from the required-checks matrix, which burns 15 VMs only to report results, and every new job needs a ruleset change.

This adds a PR Gate job so that the workflow becomes:

Detect Changes (plan, 1 VM) -> the jobs that run what the plan selects (N VMs) -> PR Gate (1 VM)

PR Gate needs every job of the workflow and passes when each one succeeded or was skipped because the plan says the changes cannot affect it. It fails when any job failed or was cancelled. It runs with if: always(), because a skipped required check would pass.

Detect Changes fails open, as today: when it fails, every job runs, and the gate only warns. To make the plan required later, fail the gate on changes: failure too. That is a one-line change, with no ruleset change.

Rollout

  1. This PR: add PR Gate and leave required-checks and the existing required checks untouched.
  2. Require Code OSS / PR Gate in the ruleset and remove the 23 Code OSS required checks: Compile & Hygiene, Linux / CLI, Copilot - * (4), chat-lib tests (*) (3) and <OS> / <job> (15). Release branches run their own pr.yml, so backport this to the active release branch first, or switch them when the next one is cut.
  3. Follow-up PR: delete required-checks. Other cleanups become possible then, because skipped jobs no longer need to report check names. For example, the affected input of pr-linux-cli-test.yml can become a caller if:, and the chat-lib jobs can become a matrix.

Reviewer notes

  • Ripple and Linux Copilot Shim / CLI are not required today, but the gate covers them.
  • A new job of the workflow must be in the gate's needs, or it is not required once step 2 is done. A test in build/lib/test/detectChanges.test.ts fails when one is missing.

How to test

  • PR Gate should be reported on this PR's run and pass.
  • node --test lib/test/detectChanges.test.ts in build/: passed (10 tests). The new test fails when a job is removed from the gate's needs.
  • I ran the gate script locally against simulated needs data. All jobs succeeded, docs-only (most jobs skipped), and the planner failing with every job run all pass. A test failure, a compile failure, the planner failing with a test failure, and the run being cancelled during planning or during tests all fail.

Adds a pr-gate job that passes when every test job succeeded or was skipped because the changes cannot affect it. It replaces the 15 matrix jobs of required-checks, which each burn a VM, as the check to require. The required-checks job stays until branch protection requires PR Gate.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 09:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The gate can pass when change detection fails and all fallback tests succeed, contrary to the stated requirement.

1 open issue
What changed in this PR

Adds a single PR Gate check to consolidate Code OSS test results, while retaining the legacy required checks during the branch-protection migration.

Changes:

  • Adds an always-running gate that evaluates change detection and 19 test jobs.
  • Leaves the existing required-check matrix unchanged for staged rollout.
  • Updates workflow comments and smoke-test documentation to describe the new gate.
File Description
.github/​workflows/​pr.yml Adds PR Gate and updates comments about required checks.
.github/​skills/​smoke-tests/​SKILL.md Documents the gate and legacy-check migration.

Review effort: Balanced

Comment thread .github/workflows/pr.yml Resolved
PR Gate now needs every job of the workflow (plan -> jobs -> gate) and passes when each succeeded or was skipped by the plan, so that it can replace all the required checks of Code OSS. Detect Changes fails open, so its failure does not fail the gate.

Co-authored-by: Copilot <[email protected]>
@alexdima Alexandru Dima (alexdima) changed the title ci: add a single PR Gate job to report the required checks ci: add a single PR Gate job for the Code OSS workflow Oct 25, 2026
A job missing from the gate's needs would silently stop being required once branch protection requires only PR Gate.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants