See which files a command read
Run a command with traceFiles: true and its answer lists every file and folder it, and anything it started, opened, and every file it wrote; other programs on the sandbox never show up. Key a test cache by those files and rerun only the tests whose files changed. Background processes, every SDK and runtime sandboxes exec --trace-files have it too. See commands and processes.