Repository navigation
fix(impact): cover a program the test script runs directly - #306
Merged
adityankale190895 merged 2 commits intoNov 18, 2026
Merged
Conversation
A changed file that the root test script runs with an interpreter
("node scripts/check.mjs && node --test"), or code it imports, was only
an affected entry point: no test imports it, so the selection skipped it
and verify passed while npm test failed. It now runs that test-script
phase for callers that run phases, and the full suite otherwise.
Signed-off-by: FredApps <[email protected]>
…ffCI#246 The manifest is an unordered set, and the PRs listed above add their entries at the same line. Moving this entry one line away lets them merge in either order without a conflict. Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 18, 2026 01:07
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.
Fixes #305
A changed JavaScript or TypeScript file that the root test closure runs with an interpreter is now covered:
testScriptProgramsinfile-references.tslists the programs the closure runs, with the phases that run them:node,tsx,ts-nodeandbun, after flags such as--import x, and throughnpx.node --test,node -eand similar run no program file.impact.ts,coverTestScriptProgramschecks the changed file, and every file that imports it, against that list.selectTestPhases, asverifyand the agent tools do) runs the phase when it can run alone, like the existing data-file phases.The test script runs …; full validation requiredorThe test script runs …, which imports …; full validation required. Both are added to the fallback table indocs/using-diffci.md.Scripts the test script does not run, and ordinary source changes, select exactly as before.
Validation:
tests/repo/test-script-programs.test.ts(listed inrelease-files.json):mainand pass here: before or after the runner, through another script, an imported module, without a tsconfig, and as a phase.testScriptPrograms.SELECTIVEonmain, with no reason. Here it isFULLwithThe test script runs scripts/check.mjs; full validation required.npm run typecheck,npm run build,npm run audit:boundary,npm run agent:checkandnpm test(1175 pass).Unsupported:
package.jsonclosure is read, as for the data-file phases. A workspace package's own test script is not.cd, or with arguments after the program, falls back rather than running as a phase.