Skip to content

tests/tools: resolve npm and gradle through shutil.which (Windows .cmd shims) (#4969) - #5009

Merged
squid-protocol merged 1 commit into
mainfrom
churn/4969-20261012T1819Z
Oct 12, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/4969-20261012T1819Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #4969 (sibling of #4939).

Class: Windows-unportable subprocess argv in tests/tools: a bare launcher name (no shell=True) gets no PATHEXT, so .cmd shims are not found.

Member Status
mvn fixed in #4967; maven_exe now delegates to launcher_exe
npm (callgraph_refs.node_env) fixed here via launcher_exe.npm_executable
gradle (java_target_matrix.build) fixed here (same mechanism)
npx/yarn/pnpm/tsc no call sites; rejected by the guard if added
node/java/javac/git real .exe, not shims; out of class

New leaf module tests/tools/launcher_exe.py (shutil.which-based). The AST guard in test_maven_exe_4939.py now rejects a literal argv starting with any shim name (.cmd/.bat too). Tests: monkeypatched Windows npm.cmd resolution, bare-name fallback, node_env runs the resolved npm, guard self-test.

Gates: pr_gates --fast 5/5, --ratchets 7/7 (0 skipped). Test-only change; no golden masters affected.

Cross-repo: none.

🤖 Generated with Claude Code

…d shims); guard rejects bare launcher argv (Part of #4969)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 12, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 12, 2026 21:53
@squid-protocol
squid-protocol enabled auto-merge (squash) October 12, 2026 21:53
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 667042e into main Oct 12, 2026
39 checks passed
@squid-protocol
squid-protocol deleted the churn/4969-20261012T1819Z branch October 12, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests/tools: bare "npm" argv is not found on Windows (npm.cmd) -- sibling of #4939

1 participant