Repository navigation
[DO NOT MERGE] ripple live test: failure modes and fallbacks - #344101
Alexandru Dima (alexdima) wants to merge 5 commits into
Conversation
Removes the head-side `dependent_tests` traversal from `select()` in build/ripple/src/engine.rs, which 3 of ripple's 68 regression tests catch. Live CI experiment, not to be merged. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The experiment intentionally breaks test selection, is explicitly marked not to merge, and requires human confirmation of live CI fallback behavior.
No open issues 🎉
What changed in this PR
This do-not-merge experiment exercises the failure handling for ripple, the tool that selects affected macOS and Windows unit tests.
Changes:
- Removes head-commit dependency traversal from test selection to intentionally trigger ripple regression-test failures.
- Supports push 1’s validation of CI warnings and full-suite fallback; live CI results are not verified here.
| File | Description |
|---|---|
build/ripple/src/engine.rs |
Removes the head-side dependent_tests call while retaining base-side traversal. |
Review effort: Balanced
This reverts commit 5777549. Co-authored-by: Copilot <[email protected]>
Adds an unknown field to build/ripple/vscode.jsonc, which ripple rejects. Live CI experiment, not to be merged. Co-authored-by: Copilot <[email protected]>
This reverts commit 9554c83, so that this pull request no longer changes build/ripple. Co-authored-by: Copilot <[email protected]>
Adds a comment to scripts/test.sh, a test launcher in ripple's runEverything rules. Live CI experiment, not to be merged. Co-authored-by: Copilot <[email protected]>
Results: failure modes and fallbacksAll three pushes behaved as expected. A broken ripple or configuration turned Push 1: ripple fails its own tests (run 40173132325, 5777549)
Push 2: invalid configuration (run 40173767525, 53ff94b reverts push 1, 9554c83)
Push 3: a run-everything rule (run 40174313894, 0c681c8 reverts push 2, 94c08fb)
Unit test jobsIn every push, the The durations are the time until the cancellation took effect, not full runs:
Findings
What this cannot show liveThat a ripple broken on This pull request stays open as a draft. |
|
Experiment done: the results are in the comment above. Closing, as this pull request was never meant to be merged. |
No test covered the base-side traversal of `select()`, which finds the tests that depended on removed code: every test passed without it. Removing an export, or a method, that an unchanged module still uses breaks the tests that load that module without changing them. Both new tests select nothing (`left: []`) without that traversal. From finding 1 of #344101 (comment) Co-authored-by: Copilot <[email protected]>
* ripple: count writes to pure globals as load-time effects Changing a pure global or one of its members at load time, such as `Error.stackTraceLimit = 0`, `console.log = f` or `Object.defineProperty(Array.prototype, ...)`, changes what every module that uses it does. ripple took it as having no effect outside the module, because `escapes()` treats pure globals as local so that calling their methods stays pure. A module that started loading such a module selected none of the tests that load it. Assignments, updates and `Object` mutators now escape when their target is a global or a member of one, pure or not. Calls of their methods stay pure, and changing what their methods return (`Object.create(proto)`) stays local. Co-authored-by: Copilot <[email protected]> * ripple: test that removing code selects the tests that used it No test covered the base-side traversal of `select()`, which finds the tests that depended on removed code: every test passed without it. Removing an export, or a method, that an unchanged module still uses breaks the tests that load that module without changing them. Both new tests select nothing (`left: []`) without that traversal. From finding 1 of #344101 (comment) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
Do not merge. Live CI experiment for #342907 (run only the unit tests a change can affect on macOS and Windows), experiment 2: failure modes and fallbacks.
What this shows
A broken ripple or configuration never fails silently, and never narrows testing:
Ripplecheck goes red for pull requests that changebuild/ripple;Detect Changesstays green: the planning steps continue on error, and itsCheck ripplestep only warns;unit-test-planartifact, so their unit test steps run without--runList, and their logs have no "Running the N ... test files of the M files listed in ..." line.Each push changes one thing. Only
Detect Changes,Rippleand the first minutes of the four macOS/Windows unit test jobs matter, so the rest of each run is cancelled once they have been observed.Pushes and expected outcomes
dependent_tests(head, hg, &head_seeds, &mut sel.decl)call fromselect()inbuild/ripple/src/engine.rs. Locally,cargo test --release --lockedfails 3 of 68 tests.Restore ripplemisses the cache (its key hashes the Rust sources).Build ripplefails atcargo test, which leaves notarget/release/ripple, soPlan unit testsfails.Check ripplewarns. Detect Changes is green,Rippleis red, macOS and Windows run every unit test.build/ripple/vscode.jsonc(the configuration rejects unknown fields).Restore ripplerestores the binary built onmain(the configuration is not part of the cache key),Build rippleis skipped.Plan unit testsfails withinvalid configuration build/ripple/vscode.jsonc, caused byunknown field `unknownFieldForLiveTest`.Check ripplewarns. Detect Changes is green,Rippleis red, macOS and Windows run every unit test.build/ripple, and add a comment toscripts/test.sh.Rippleis skipped: the pull request no longer changesbuild/ripple. The cached binary plans "running every unit test: test launcher (scripts/test.sh)" and uploads no plan.Check rippledoes not warn. macOS and Windows run every unit test.The results of each push will be posted as a comment.
What this cannot show live
That a ripple broken on
mainonly warns on unrelated pull requests: theirRipplejob is skipped, and nothing in Detect Changes fails. Showing that would need a broken ripple onmain.build/lib/test/detectChanges.test.tscovers it ("the Ripple check runs for the pull requests that change ripple, and the planning never fails Detect Changes"): theRipplejob only runs when the pull request changesbuild/ripple, and every ripple and planning step of Detect Changes continues on error.A finding from preparing push 1
The suggested way to break ripple, removing the base-side
dependent_tests(base, bg, &base_seeds, &mut sel.decl)call, still passes all 68 of ripple's regression tests: none of them covers the traversal of the base commit's graph. Push 1 removes the head-side call instead.How to test
For each push, look at the summary of
Detect Changesand the annotation of itsCheck ripplestep, theRipplecheck, and theDownload unit test planstep and first unit test step ofmacOS (run) / Electron-Unit,macOS (unit) / Browser,Windows (run) / Electron-UnitandWindows (unit) / Browser. To predict a plan locally:build/ripple/target/release/ripple plan --config build/ripple/vscode.jsonc --base origin/main --head HEAD.