Skip to content

ci: skip macOS and Windows Browser unit jobs without browser tests, and report a failed ripple plan - #344108

Merged
Alexandru Dima (alexdima) merged 3 commits into
mainfrom
ripple/skip-browser-jobs
Oct 25, 2026
Merged

Alexandru Dima (alexdima) merged 3 commits into
mainfrom
ripple/skip-browser-jobs

Conversation

@alexdima

Copy link
Copy Markdown
Member

Follow-up to #342907 and #344105. Two commits:

  1. Skip the macOS and Windows Browser unit jobs when no selected file is a browser test. The browser runner never loads **/{node,electron-browser,electron-main,electron-utility}/**/*.test.js, so when a working ripple plan selects only such files (11% of 236 sampled commits of main) those jobs spent 1.5 to 3 minutes of setup to run 0 tests. Check ripple now outputs selects-no-browser-tests, changes outputs selected-browser-unit-tests, used by the two Browser unit jobs and their required-checks parts. Electron-Unit jobs keep selected-unit-tests; Linux is unchanged; failed, missing or run-everything plans still run the jobs. A test reads excludeGlob from test/unit/browser/index.js and checks the workflow's BROWSER_EXCLUDED_FOLDERS against it.
  2. Plan line in the job summary when ripple fails. Check ripple appends ### Unit test plan and "running every unit test: ripple failed to build, pass its tests or plan the unit tests (see the Check ripple step)." when it sets failed=true (finding 2 of [DO NOT MERGE] ripple live test: failure modes and fallbacks #344101 (comment)).

Docs: build/ripple/README.md and the pr.yml comments are updated.

How to test

  • cd build && node --test lib/test/detectChanges.test.ts lib/test/agentHostTestSelection.test.ts lib/test/detectMissingCaches.test.ts: passed (24 tests).
  • npm run eslint -- build/lib/test/detectChanges.test.ts: passed.
  • node --experimental-strip-types build/hygiene.ts <changed files>: matched no hygiene-eligible files; the pre-commit hygiene hook ran on both commits and passed.
  • actionlint .github/workflows/pr.yml: only the existing self-hosted runner label warnings.
  • Local simulation of the Check ripple shell logic (extracted from pr.yml): plan with browser tests, selects-no-browser-tests=false; common-only, false; only node/electron-main tests, true (selects-nothing=false); empty selection, selects-nothing=true; run-everything plan, both false; failed plan, failed=true and the summary line is written.
  • This PR changes pr.yml, so it runs every unit test; the new skip paths are not exercised by its own CI.

…e is a browser test

The browser runner never loads the test files in node, electron-browser,
electron-main and electron-utility folders. When the plan selects only such
files, the macOS and Windows Browser unit jobs spent minutes on setup to run
no test. Check ripple now outputs selects-no-browser-tests for the plan of a
working ripple, and Detect Changes passes on selected-browser-unit-tests,
which those two jobs and their required checks use. A test keeps the folders
in sync with the excludeGlob of the browser runner.

Co-authored-by: Copilot <[email protected]>
…le fails

Ripple writes its plan line only after a successful plan, so when it failed
to build, pass its tests or plan, the job summary said nothing about the
unit tests. Check ripple now writes that every unit test runs.

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

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.

🟢 Approval recommended

The focused changes preserve full-suite fallbacks, keep required-check reporting aligned, and have no unresolved findings.

No open issues 🎉

What changed in this PR

This PR extends ripple-based test selection to avoid unnecessary macOS and Windows Browser unit jobs and makes planning failures visible in the job summary.

Changes:

  • Skip Browser unit jobs when a successful plan selects only tests excluded by the browser runner, with matching required-check reporting.
  • Add a full-suite fallback message when ripple fails, while leaving Linux behavior unchanged.
  • Update documentation and tests to keep workflow exclusions aligned with the browser runner.
File Description
build/​ripple/​README.md Documents browser-job skipping and failure summaries.
build/​lib/​test/​detectChanges.test.ts Checks browser-specific gates and runner exclusion alignment.
.github/​workflows/​pr.yml Adds browser-specific selection outputs, job gates, and failure summaries.

Review effort: Balanced

@alexdima
Alexandru Dima (alexdima) merged commit 3766382 into main Oct 25, 2026
46 checks passed
@alexdima
Alexandru Dima (alexdima) deleted the ripple/skip-browser-jobs branch October 25, 2026 15:10
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 25, 2026
Alexandru Dima (alexdima) added a commit that referenced this pull request Oct 25, 2026
…mization-flaky-tests

Resolves the conflicts with #344108: a pull request that only disables tests also forces the new selected-browser-unit-tests output to false.

Co-authored-by: Copilot <[email protected]>
Alexandru Dima (alexdima) added a commit that referenced this pull request Oct 25, 2026
- Changes to src/bootstrap-*.ts run every integration test (a new `runEveryIntegrationTest` group).
  Integration tests fork src/bootstrap-fork.ts through `FileAccess.asFileUri('bootstrap-fork')`,
  which ripple cannot resolve, so these changes selected no integration test, and macOS and
  Windows skipped them, including Agent Host E2E, which the affected-file check runs for any
  src/bootstrap* change. They touched 20 of 17,789 first-parent commits of main in 12 months.
- Restore the ripple README's description of the Browser unit test skip of #344108, which the
  rebase onto it dropped.
- Test that the Agent Host E2E runner runs only the suites that a `--runList` file lists, also with
  Windows line endings and separators, and that it prepares nothing when the list names none.
- The Ripple job says that ripple plans the tests, not the unit tests.

Co-authored-by: Copilot <[email protected]>
Alexandru Dima (alexdima) added a commit that referenced this pull request Oct 25, 2026
…indows (#344146)

* ci: rename the unit-test-plan artifact to test-plan

The plan is about to cover the integration tests too. Renames the artifact and its folder
(.build/unit-test-plan to .build/test-plan) and the input of the macOS and Windows test workflows
(unit_test_selection to test_selection). No behavior change.

Co-authored-by: Copilot <[email protected]>

* ripple: plan the integration tests

`ripple plan` now also selects the integration test files a change can affect: plan.json has an
`integration` object (`select`, `reason`, `files`), and `--out-dir` writes the selected files to
integration.txt, like unit.txt. The job summary gets an "Integration test plan" section.

A new configuration group, `runEveryIntegrationTest`, lists the files outside the module graph that
only the integration tests depend on: changing one runs every integration test, but no unit test.
As for `runEverything`, the scripts its scripts load through relative imports and the npm packages
they load count too (`runEverything` scripts first, so a script both groups load runs everything).
vscode.jsonc lists the integration test scripts and the Agent Host E2E runner. `runEverything` keeps
running every test, unit and integration.

`affected` and `blame` honor the new group, and `replay` reports `runAllIntegration` and
`declIntegrationTestFiles` per commit.

Co-authored-by: Copilot <[email protected]>

* test: run only listed integration tests with --runList

The Agent Host E2E runner takes `--runList <file>`, like the unit test runners: it runs only the
suites whose files the list names, one per line, and exits before preparing the test runtime when
it names none. It passes the list on to its storage passes and does not forward it to the suites,
which it runs with `--run`.

scripts/test-integration.sh and .bat document `--runList`, which they already forwarded to the
node.js test runner, and treat it as a filter like `--run` and `--runGlob`: the extension host
suites, which no list names, do not run.

Co-authored-by: Copilot <[email protected]>

* ci: run only the affected integration tests on macOS and Windows

The macOS and Windows Electron jobs, and the Windows Agent Host E2E job, now download the test plan
and pass its integration.txt with `--runList` to scripts/test-integration.sh (the node.js
integration tests) and to the Agent Host E2E runner. Linux keeps running every integration test.

`Check ripple` tells the Agent Host E2E suites (AGENT_HOST_E2E, kept in sync with the runner by
agentHostTestSelection.test.ts) from the other integration tests that the plan selects, and Detect
Changes outputs `selected-node-integration-tests` and `selected-agent-host-e2e`. The node.js
integration test step is skipped when the plan selects none of its files (new input
`node_integration_tests`), and Agent Host E2E (the macOS step, the Windows job) when it selects no
suite and as before when the affected-file check does not select it. A failed, missing or
run-everything plan runs every integration test, and so does a change to the integration test
scripts (`runEveryIntegrationTest`). When planning fails, the job summary also says that every
integration test runs.

On the last 300 first-parent commits of main (Oct 21 to 25), the plan selects no integration test
for 72% of them, some (29 of 68 files on average) for 20%, and every test for 8%. With the
path-based checks alone, the macOS and Windows node.js integration tests ran for 99.7% of them and
Agent Host E2E for 42%; with the plan, for 28% and 25%, and never where they did not run before.

Co-authored-by: Copilot <[email protected]>

* ci: address review of the integration test selection

- Changes to src/bootstrap-*.ts run every integration test (a new `runEveryIntegrationTest` group).
  Integration tests fork src/bootstrap-fork.ts through `FileAccess.asFileUri('bootstrap-fork')`,
  which ripple cannot resolve, so these changes selected no integration test, and macOS and
  Windows skipped them, including Agent Host E2E, which the affected-file check runs for any
  src/bootstrap* change. They touched 20 of 17,789 first-parent commits of main in 12 months.
- Restore the ripple README's description of the Browser unit test skip of #344108, which the
  rebase onto it dropped.
- Test that the Agent Host E2E runner runs only the suites that a `--runList` file lists, also with
  Windows line endings and separators, and that it prepares nothing when the list names none.
- The Ripple job says that ripple plans the tests, not the unit tests.

Co-authored-by: Copilot <[email protected]>

---------

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