Repository navigation
fix(cli): infer go test or pytest when package.json has no test script - #293
Merged
adityankale190895 merged 1 commit intoNov 18, 2026
Conversation
A Go or Python project that keeps a package.json only for tooling (prettier, husky, commitlint) got no full command: inferFullCommand stopped at "package.json has no test script", so every full fallback of verify was blocked even though the selection ran pytest or go test. A package.json without a test script now falls through to the go.mod and Python checks, and its reason is kept only when neither matches. Signed-off-by: FredApps <[email protected]>
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 #292
inferFullCommandnow records "package.json has no test script" and goes on to thego.modand Python checks. It returns that reason only when neither applies. Apackage.jsonwith a test script is handled exactly as before.Validation:
packages/diffci-cli/tests/client/full-command-tooling-package-json.test.ts(listed inrelease-files.json): the Go and Python cases fail onmainand pass here; the two unchanged cases pass on both.verify --changedwas BLOCKED onmainand PASSED here, runningpython3 -m pytest.npm run typecheck,npm run build,npm run audit:boundary,npm run agent:checkandnpm test(1167 pass) at the root. Inpackages/diffci-cli:npm run typecheck,npm run package:check, andnpm test(521 of 523 pass; the 2 failures are the known CLI tests: cli-agent.test.ts expects the old verify usage line and fails on main #193 and CLI tests: the init --install test looks for npm-cli.js under npm's global prefix #196, as onmain).Unsupported: a
package.jsonwith no test script beside a Maven or Cargo project.inferFullCommandhas no full command for those either way.Merge order with #199: both edit the package-manager block of
inferFullCommand(#293 moves it under anelse), so whichever lands second needsmainmerged in; I will do that when the first lands. The resolution is #293'selsestructure with #199'sbun run testlines; I checked it in a local merge of all our open PRs.