Fix Windows integration test failure: Node.js shell compatibility#21
Closed
Copilot wants to merge 3 commits intocopilot/verify-cross-platform-supportfrom
Closed
Fix Windows integration test failure: Node.js shell compatibility#21Copilot wants to merge 3 commits intocopilot/verify-cross-platform-supportfrom
Copilot wants to merge 3 commits intocopilot/verify-cross-platform-supportfrom
Conversation
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow integration tests
Fix Windows integration test failure: Node.js shell compatibility
Feb 6, 2026
On Windows, gh codeql install-stub creates a bash script (codeql) which
is not discoverable by Node.js child_process.spawn(). This causes
'spawn codeql ENOENT' errors in integration tests.
Add a step that creates a codeql.cmd wrapper delegating to 'gh codeql'
so that spawn('codeql', ...) resolves correctly on Windows.
Aligns with github/gh-codeql#21 which adds native Windows support to
install-stub. This workaround can be removed once that PR is merged.
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.
Integration Testing Improvement PR: MCP Server Primitives
Related Issue: Job ID 62804875673
⚠ Scope Note: This PR fixes the client test harness to enable integration tests on Windows. Changes are in
client/src/ql-mcp-client.js, not test cases.Summary
Integration tests failed on
windows-latestwith "CodeQL CLI not found in PATH" despite CodeQL being installed. Root cause: Node.jsexecSyncdefaults tocmd.exeon Windows, which cannot execute the bash-based CodeQL stub fromgh codeql install-stub.Primitive Metadata
Test Additions / Modifications
No test files modified. Fix enables existing tests to run on Windows.
Before vs After File States
Assertions Added
Edge & Negative Cases
Windows-specific shell behavior when invoking bash scripts via Node.js
child_process.execSync.Non-Goals / Deferred Follow-ups
None. Single-line fix with no additional scope.
Local Verification
Cannot reproduce Windows-specific failure locally on Unix. Fix validated via:
CI will validate on
windows-latest.Checklist
beforehas matching file inafter(N/A)npm run lint:fixandnpm run build-and-testsuccessfullyScreenshots / Logs (Optional)
From failing workflow logs:
Expected after fix: CLI check succeeds, integration tests execute.
Additional Notes
Cross-platform
execSyncbehavior: Windows defaults tocmd.exe, Unix defaults to/bin/sh. CodeQL stub requires bash. Pattern stored in repo memory for future reference.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.