fix: Select the tests of a package script whose command changed in turbo trace
A script whose text changes can run its tests another way: other flags, build
tags, another working directory, another runner. `turbo trace affected`
selected none of them. With a base revision a changed `scripts` entry only
marked the script's own task; without one, a changed `package.json` selected
what reads the file, which for `go test` is the test next to it.
The tests a changed script starts are now selected, with the reason
`TaskChanged`: its own test launches and those of the scripts its command
runs. A script counts as changed when its text differs from the base
revision's, and every script of a changed manifest counts when there is no
base revision to read. Another field of the manifest selects nothing this way.
A launch the trace cannot map to files adds nothing: such a task is in
`uncoveredTasks` and runs whole. `go test` stays in the module of the
directory it starts in, so a module of its own below is not selected.
A changed file that defines a script's command (the shell script it runs, the
runner's config) selected the script's tests only in a repository with CI
workflows. It now does so in every repository.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>