Skip to content

ci: run only the integration tests a change can affect on macOS and Windows - #344146

Merged
Alexandru Dima (alexdima) merged 5 commits into
mainfrom
agents/ripple-testing-strategies-expansion
Oct 25, 2026
Merged

Alexandru Dima (alexdima) merged 5 commits into
mainfrom
agents/ripple-testing-strategies-expansion

Conversation

@alexdima

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

Copy link
Copy Markdown
Member

Follow-up to #342907 and #344108: ripple now also plans the integration tests, and the macOS and Windows Electron jobs run only the node.js integration tests and Agent Host E2E suites that a change can affect. Linux keeps running every integration test, as it does every unit test.

On the last 300 first-parent commits of main (Oct 21 to 25), with the change detection of .github/actions and this PR's ripple:

macOS and Windows Today With this PR
node.js integration tests run 99.7% 27.7%
Agent Host E2E runs 42.0% 24.7%

Neither runs where it does not run today. The plan selects no integration test for 72% of these commits, some for 20% (29 of 68 files on average), and every test for 8%. In a recent run, the node.js integration tests took 5.5 minutes on macOS and 8.5 on Windows, and Agent Host E2E 4.6 minutes on macOS and a 14-minute job on Windows: about 13 machine-minutes per push on average.

Changes

  1. Rename the unit-test-plan artifact to test-plan, and the unit_test_selection input of the macOS and Windows test workflows to test_selection. No behavior change.
  2. ripple plans the integration tests. plan.json gets an integration object (select, reason, files), --out-dir writes integration.txt next to unit.txt, and the job summary gets an "Integration test plan" section. A new configuration group, runEveryIntegrationTest, lists the files outside the module graph that only integration tests depend on (scripts/test-integration.*, scripts/test-agent-host-e2e.*, test/integration/agentHost/**): changing one runs every integration test but no unit test. It also lists src/bootstrap-*.ts: integration tests fork src/bootstrap-fork.ts through FileAccess.asFileUri('bootstrap-fork'), which ripple cannot resolve, so a change to these files would otherwise select none of them. runEverything still runs everything, also when one of its scripts loads a file of the new group. affected, blame and replay know the new group.
  3. --runList for the integration test scripts. The Agent Host E2E runner runs only the listed suites, and exits before preparing the test runtime when the list names none. scripts/test-integration.sh and .bat already forwarded --runList to the node.js runner; they now document it and treat it as a filter, so the extension host suites do not run with it. build/lib/testAgentHostE2EStartup.test.ts checks that the runner runs only the listed suites (also with Windows line endings and separators) and prepares nothing when the list names none.
  4. CI. Check ripple splits the planned integration test files into Agent Host E2E suites (AGENT_HOST_E2E, which a test keeps in sync with the runner's suite list) and the others, and Detect Changes outputs selected-node-integration-tests and selected-agent-host-e2e. When the plan selects none of their files, the macOS Electron job skips either step, the Windows Electron job its node.js integration tests, and the Windows Agent Host E2E job is skipped. Otherwise they pass integration.txt with --runList.

Unchanged: Linux; the extension host suites, which the Electron jobs still run; the browser, remote and smoke tests; and the Agent Host test profile. A failed or missing plan, or a change to a file that every test or every integration test depends on, runs every integration test. When planning fails, the job summary now says so for both plans.

Notes for reviewers

  • This PR changes pr.yml and ripple, so its own CI runs every test. The new skip paths are first exercised by later pull requests.
  • Changes to src/bootstrap-*.ts run every integration test, because ripple cannot resolve FileAccess.asFileUri('bootstrap-fork'), which two integration tests use to fork src/bootstrap-fork.ts. A bootstrap- path alias would select exactly the tests that reach it, but src/bootstrap-meta.ts reads package.json, so every package.json change would then select them too. These files changed in 20 of 17,789 first-parent commits of main in the last 12 months, and in none of the 300 behind the numbers above.
  • Commit 5 addresses a review: the bootstrap files above, the README's description of the Browser unit test skip of ci: skip macOS and Windows Browser unit jobs without browser tests, and report a failed ripple plan #344108 (which the rebase onto it dropped), the --runList test, and the wording of the Ripple job.

How to test

  • cd build/ripple && cargo test --release --locked: passed (75 tests). cargo fmt --check: clean. cargo clippy --release --locked: 25 warnings, the same as on main.
  • cd build && node --test lib/test/detectChanges.test.ts lib/test/agentHostTestSelection.test.ts lib/test/detectMissingCaches.test.ts lib/testAgentHostE2EStartup.test.ts: passed (27 tests). The new --runList test fails when the runner ignores the list, stops normalizing backslashes, or prepares the runtime before checking the list.
  • cd build && npm run typecheck: passed.
  • npm run eslint -- build/lib/test/detectChanges.test.ts build/lib/test/agentHostTestSelection.test.ts build/lib/testAgentHostE2EStartup.test.ts test/integration/agentHost/runner.ts: passed.
  • actionlint -shellcheck= .github/workflows/pr.yml .github/workflows/pr-darwin-test.yml .github/workflows/pr-win32-test.yml (1.7.12): the same 6 self-hosted runner label findings as on main.
  • The Check ripple script, extracted from pr.yml and run on ripple plan output for synthetic changes: a plan with both kinds of integration tests runs both steps; one with only node.js integration tests or only Agent Host E2E suites skips the other; one with none skips both. A runEveryIntegrationTest change (scripts/test-integration.sh) or a runEverything change (test/unit/electron/renderer.js) runs both, and so does a failed plan or build, whose job summary lists both plans. The browser unit test outputs of ci: skip macOS and Windows Browser unit jobs without browser tests, and report a failed ripple plan #344108 are unchanged in all of these. ripple plan for a change to src/bootstrap-fork.ts, src/bootstrap-esm.ts or src/bootstrap-cli.ts runs every integration test and selects the same unit tests as before (0, 3 and 0 files); a change to agentHostServerMain.ts still selects the 6 Agent Host E2E suites and 22 node.js integration tests, and with RIPPLE_DEBUG, the new group adds no npm package whose update would run every integration test.
  • VSCODE_SKIP_PRELAUNCH=1 ./scripts/test-agent-host-e2e.sh --runList=<file> --jobs 1 with a list naming 2 of the 6 suites (CRLF line endings, backslashes, and a unit test besides): starts only Conformance and Claude. With a list naming none: prints "None of the 6 Agent Host E2E suites is listed in …" and exits 0 without preparing the runtime. (Without a local build, the two suites then fail to load: this checks which suites start.)
  • The numbers above: ripple affected with this PR's binary on each of the last 300 first-parent commits of main, then the detect.ts functions of .github/actions on each commit's changed files. Unit test selection does not change: ripple replay on 303 commits selects the same unit test files for each commit as main's ripple.

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` 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]>
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]>
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]>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 15:54

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.

🔵 Needs a closer look

The coverage-reducing skip paths need representative macOS and Windows CI validation because this PR itself forces full test execution.

No open issues 🎉

What changed in this PR

Extends ripple’s existing unit-test selection to node.js integration tests and Agent Host E2E suites on macOS and Windows, reducing CI work while preserving Linux coverage and existing extension host runs.

Changes:

  • Adds integration plans, output lists, summaries, and integration-only fallback triggers to ripple.
  • Adds Agent Host suite filtering through --runList and updates integration launcher behavior.
  • Wires selection into CI, renames the artifact to test-plan, and updates configuration tests and documentation.

No actionable defects were identified. The new selective paths remain unexercised by this PR’s own CI because its changes trigger full test execution.

File Description
test/​unit/​README.md Documents integration use of test lists.
test/​integration/​agentHost/​runner.ts Filters suites and sizes workers to the selection.
src/​vs/​platform/​agentHost/​test/​node/​e2e/​README.md Explains platform-specific suite selection.
scripts/​test-integration.sh Treats --runList as a node.js test filter.
scripts/​test-integration.bat Adds equivalent Windows filter handling.
scripts/​test-agent-host-e2e.sh Documents suite-list filtering.
scripts/​test-agent-host-e2e.bat Documents Windows suite-list filtering.
build/​ripple/​vscode.jsonc Defines integration-only fallback triggers.
build/​ripple/​src/​main.rs Emits integration plans and updates reporting commands.
build/​ripple/​src/​engine.rs Tracks scoped launcher dependencies and selection reasons.
build/​ripple/​src/​deps.rs Handles integration-only package dependencies.
build/​ripple/​src/​config.rs Parses integration trigger groups and scope precedence.
build/​ripple/​README.md Documents planning behavior, fallbacks, and limitations.
build/​lib/​test/​detectChanges.test.ts Checks selection outputs and workflow wiring.
build/​lib/​test/​agentHostTestSelection.test.ts Checks runner arguments and suite classification.
.github/​workflows/​pr.yml Publishes plans and controls integration skips.
.github/​workflows/​pr-win32-test.yml Consumes test plans in Windows runners.
.github/​workflows/​pr-darwin-test.yml Consumes test plans in macOS runners.

Review effort: Balanced

- 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]>
@alexdima
Alexandru Dima (alexdima) merged commit 4d57ed6 into main Oct 25, 2026
46 checks passed
@alexdima
Alexandru Dima (alexdima) deleted the agents/ripple-testing-strategies-expansion branch October 25, 2026 17:55
@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 #344146 and #344148: a pull request that only disables tests also forces the new selected-node-integration-tests and selected-agent-host-e2e outputs to false, so that the Windows Agent Host E2E job skips too, and ripple's new COMMANDS list includes disables.

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