Repository navigation
ci: skip core test jobs that the changes cannot affect - #342729
Merged
Bryan Chen (bryanchen-d) merged 1 commit intoOct 20, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Migrating 15 merge-blocking checks warrants human confirmation of live mixed-skip, failure, and cancellation behavior.
No open issues 🎉
What changed in this PR
Extends change detection to skip unaffected core test jobs while preserving all 15 required check names.
Changes:
- Adds separate skip rules for unit, browser integration, and product tests.
- Splits browser jobs and consolidates required-check reporting.
- Adds detector and workflow-wiring tests and updates smoke-test documentation.
| File | Description |
|---|---|
build/lib/test/detectChanges.test.ts |
Tests skip rules, fail-open behavior, extension dependencies, and workflow wiring. |
.github/workflows/pr.yml |
Gates test jobs and reports stable required checks. |
.github/skills/smoke-tests/SKILL.md |
Documents the new reporter and intentional skips. |
.github/actions/detect-changes/detect.ts |
Defines core-test skip rules. |
.github/actions/detect-changes/action.yml |
Exposes three new detection outputs. |
Review effort: Balanced
Report the required "<OS> / <job>" checks from a required-checks gate job so the Electron-Unit, Electron, Electron-Smoke, Browser and Remote jobs can skip when every changed file is documentation, a Rust crate, or (for the unit and browser integration tests) a built-in extension the tests do not read. Co-authored-by: Copilot <[email protected]>
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/required-check-reporters
branch
from
October 20, 2026 01:06
73da393 to
8844770
Compare
Collaborator
Author
|
Copilot's review asks a maintainer to confirm how
The first real Copilot-only or docs-only PR after merge will be the first live skip on
|
Bryan Chen (bryanchen-d)
marked this pull request as ready for review
October 20, 2026 17:48
Raymond Zhao (rzhao271)
approved these changes
Oct 20, 2026
Bryan Chen (bryanchen-d)
deleted the
copilot/vscode/required-check-reporters
branch
October 20, 2026 22:14
Alexandru Dima (alexdima)
added a commit
that referenced
this pull request
Oct 20, 2026
…b-pr-checks-efficiency main now skips the core test jobs that a change cannot affect (#342729), and its tests require the Detect Changes job to expose exactly the detector's outputs. The macOS and Windows unit test jobs therefore opt into the plan with `unit_test_selection: true` instead of reading a job output: the unit-test-plan artifact only exists when the plan selects files, and without it those jobs run every unit test. Co-authored-by: Copilot <[email protected]>
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.
The core PR test jobs run for every pull request, even when the changes cannot affect them: a README edit, a Rust change in
cli/, or a change confined to the Copilot extension still runs about 270 runner-minutes of core tests. This PR lets those jobs skip, building on theDetect Changesjob from #342091, and keeps every required check name unchanged.Why a reporter job
The required checks are named
<OS> / Electron-Unit,Electron,Electron-Smoke,BrowserandRemote. The reusable test workflows name their single job${{ inputs.job_name }}, and GitHub does not evaluate the name of a skipped job (the cause of #342134), so these jobs cannot skip under their required names. Instead:<OS> (run) / <job>,<OS> (unit) / Browser,<OS> (integration & smoke) / Browserand<OS> (shard n/2) / Electron-Smoke, and skip with a job-levelif:in the calling job. The reusable workflows are unchanged.required-checksjob reports the 15 required checks. It replaceselectron-smoke-checksandbrowser-checks, which already used this pattern. A check passes when each of its jobs succeeded, or was skipped while change detection succeeded and said the changes cannot affect it. Any other result fails the check, including an unexpected skip, failed detection or a missing output.if:cannot depend on the matrix and the two parts skip under different rules.What skips
detect-changesgets three outputs. Each isfalseonly when every changed file is one those tests cannot read; any other path, including a new kind of file, runs the jobs.unit-testscli/,copilot_shim/, or a built-in extension the unit tests do not readbrowser-integrationcli/,copilot_shim/, orextensions/copilot/product-testscli/orcopilot_shim/src/,test/andextensions/, which use Markdown files as test inputs.theme-*extensions and thecss,html,javascript,jsonandtypescript-basicsgrammars, so changes there still run the unit tests. A test fails when a core test starts reading another extension.copilotsuite) and the Electron and remote smoke tests load the Copilot extension, so they keep running for Copilot changes.Expected impact
Based on the 744 PRs merged Oct 9–19 and average job times from 25 recent successful runs:
cli/orcopilot_shim/onlyAcross all PRs that is about 11 runner-minutes per run (~4%), about 4.4 of them on the Windows 1ES pool. It frees capacity rather than shortening runs, because
Windows / Electronstays the longest job. More importantly, this sets up the reporter that later rules need, such as skipping unit test jobs based on which tests the changes import.Trade-offs
Detect Changes, which finishes 10–15 seconds into the run.How to test
pr.yml, so every job runs and every required check should pass throughrequired-checks.node --test lib/test/detectChanges.test.tsinbuild/: rule table, renames, fail-open behavior, the extension scan and thepr.ymlwiring. I confirmed the tests fail when an extension the tests read is made skippable, and when a test job reports a required name itself.required-checksscript against 8 simulatedneedsresults: success, intended skips, an unexpected skip, failed detection, a missing output, a failure and a cancellation.Detect Changesreported all three outputs asfalse, every core test job was skipped, and all 15 required checks reported success under their exact names.actionlintonpr.yml: no new findings compared withmain.npm run eslintand a stricttsc --noEmiton the changed TypeScript passed.