feat(cli): --changed to run only the tests touched since a git ref - #1038
Merged
Chemaclass merged 1 commit intoAug 10, 2026
Merged
Conversation
Selects test files from git instead of from a previous red run, so the fast loop works on the first run of a fresh branch. The selection merges three sources, because none of them sees the others: the commit range <ref>...HEAD, the staged and unstaged edits on top of HEAD, and untracked new files. Deletions are dropped so a removed test file never reaches discovery, and rename detection selects the new path alone. Narrowing happens in exec_tests next to the shard split, after the "at least one path" guard: reaching zero files there is a real answer, so the run reports "No tests found" and exits 1 rather than dumping the help text. Outside a work tree, or with a ref that does not resolve, validate_config_or_exit fails the run instead of silently selecting nothing. Closes #1010
Chemaclass
deleted the
feat/1010-changed-run-only-tests-touched-since-git-ref
branch
August 10, 2026 13:02
10 tasks
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.
🤔 Background
Related #1010
The fastest feedback loop on a large suite is "run only what my branch touched", and bashunit could not express it.
--rerun-failedneeds a previous red run, and a hand-rolledgit diff | xargs ./bashunitbreaks on renames, deletions and quoting.💡 Changes
--changed [<ref>]selects only the test files git reports as touched since the ref, defaulting toorigin/HEADand falling back toHEAD.No tests foundand exits 1, matching an empty shard, instead of the "path is required" help dump.