'Run only the related tests' is safe only when there is a rule that falls back to everything when you can't trust the graph
A record of switching the push hook and PR CI, which kept repeating the full unit test suite for every parallel job, to change-based selective runs, covering how to avoid guessing the base point and the rule that sends deletions and global config changes to a full run
- Change-based test selection is an optimization that relies on the accuracy of the import graph, so it needs a rule that sends changes the graph can't be trusted for (deletions, renames, global config) to a full run
- Don't guess the base point. CI uses the PR's base commit, the push hook uses the previous remote SHA that Git passes in, and for a new branch a person states it explicitly