Repository navigation
fix: preserve runner suites and route selected tests safely - #34
Merged
adityankale190895 merged 1 commit intoOct 22, 2026
Merged
Conversation
Member
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.
Summary
Preserve executable tests across runner declarations and route selected files to configurations that actually run them.
Reproduction
One fixture declares both
src/**/*.test.jsandregression.test.js; the literal file imports the changed source, while an unrelated wildcard test keeps discovery nonempty. Another declares a default suite excluding integration tests plus a named suite including them. Both previously report COMPLETE, SELECTIVE, no selected tests and command synthesis OK. Routing a selected integration test directly also chose the excluding default config.Final regression tests run against pristine sources produced 17 failures (including warm-cache invalidation) and 35 passes. All 52 targeted tests pass with the fix. Regressions cover these cases, per-config roots/ignores, overlapping invocations, literal exclusions, unsupported roots and implicit multi-config suites. Conservative refusal is used where static evidence cannot establish the full suite.
Validation
Validated on Node v24.19.0, Linux, from baseline
9d575cef7b1dd118300cd6298c9f85a8c1a44ad8:npm run typechecknpm run buildnpm run audit:boundarynode --import tsx --test --test-concurrency=1 $(find tests -name '*.test.ts' | sort)— 351/351 passedgit diff --checkThe original baseline passes 333/333 tests serially. Its default parallel run lost suite processes in this environment, so the complete suite was validated serially. Windows and Node 22 remain for CI. Tests analyze synthetic repositories and command plans; they do not install or execute Jest/Vitest.
Scope and cache coordination
This does not evaluate arbitrary configuration JavaScript. Known unsupported roots and ambiguous multi-config includes force full validation. Discovery can remain wider than the runner where narrowing cannot be proved, and command refusal is explicit.
Other independent safety PRs from this review also bump cache schema 2 to 3. If merged/released separately, advance the schema again (or otherwise invalidate intermediate-version graphs) for each subsequent analysis change. Do not reuse warmed graphs from an earlier subset of the fixes.