feat(ci): changed-based test selection gates every behavior lane - #14
Merged
Conversation
Each behavior lane now intersects the PR diff with its own composition through bin/fm-test-run.sh's conservative path->family map instead of always running its full inventory. A lane whose merge-base diff maps to none of its tests prints 'skipped: no affected tests' and reports success in seconds; docs-only PRs keep the existing fast path, pushes to main still run complete lanes, and the flake retry plus shard-partition proof contracts are unchanged. fm-test-run.sh gains --changed combined with --lane/--family intersection filters (either flag order), an explicit empty-selection stdout marker, and colocated contract tests for both.
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
Every behavior lane now runs only what a PR actually changed. Each lane first intersects the PR's merge-base diff with its own composition through
bin/fm-test-run.sh's conservative path->family map (single owner, extended in place - no mapping duplicated into the workflow). A lane whose diff maps to none of its tests printsskipped: no affected testsand reports success in seconds instead of silently cancelling, so the check still reports.fm-test-run.sh
--changednow composes with--lane <name>/--family <name>as intersection filters (either flag order); standalone modes keep refusing combinations.--changedselection printsskipped: no affected testson stdout, emits the emptyFM_TEST_SUMMARY, and exits 0.ci.yml
git merge-baseof the PR base SHA and runsfm-test-run.sh --list --changed --base <merge-base> --lane/--family <lane>. On pushes to main it selects everything (approved merges run full lanes).snapshot-bearingsfamily OR any changedbin/**/*.sh, since the stock-Bash parse sweep covers every tracked shell script).Verification
bin/fm-lint.shgreen (pinned ShellCheck 0.11.0 + actionlint 1.7.12).bash tests/fm-test-run.test.sh19/19 ok.bin/fm-test-run.sh --check-coverageok (total=165, partition proof intact).