Fix CODEQL_PATH Tests (windows-latest) CI failure#115
Merged
data-douser merged 3 commits intomainfrom Mar 9, 2026
Merged
Conversation
… MSYS2 FIFOs Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix the failing GitHub Actions workflow CODEQL_PATH Tests
Fix CODEQL_PATH Tests (windows-latest) CI failure
Mar 9, 2026
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Windows-only failures in the CODEQL_PATH Tests (windows-latest) CI job by adjusting the server startup test script to avoid MSYS2 FIFO incompatibilities and by making the workflow’s CodeQL binary discovery robust to gh-codeql’s Windows directory layout.
Changes:
- Update
test-codeql-path-valid.shto skipmkfifoon MSYS2/MINGW/Cygwin and rely on process substitution for a Node-compatible stdin handle on Windows. - Update the workflow’s Windows “Locate CodeQL binary” logic to search known gh-codeql install locations first, then fall back to a bounded
LOCALAPPDATAsearch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
server/scripts/test-codeql-path-valid.sh |
Avoids MSYS2 FIFO stdin issues by skipping mkfifo on Windows-like shells and using process substitution. |
.github/workflows/client-integration-tests.yml |
Makes Windows CodeQL binary discovery resilient by searching well-known gh-codeql directories without a fragile *release* path constraint. |
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.
Two Windows-specific bugs caused the
CODEQL_PATH Tests (windows-latest)CI job to fail on its first run. Both were introduced alongside the new test infrastructure in the v2.24.3 upgrade.📝 Update Information
Primitive Details
CODEQL_PATH Testsworkflow job +test-codeql-path-valid.sh✅ ALLOWED FILES:
.github/workflows/client-integration-tests.yml— workflow step fixserver/scripts/test-codeql-path-valid.sh— test script fix🛑 MANDATORY PR VALIDATION CHECKLIST
Update Metadata
🎯 Changes Description
Current Behavior
test-codeql-path-valid.sh:mkfifois available in MSYS2/Git Bash and succeeds, but the resulting named pipe uses MSYS2's internal protocol. Native Windowsnode.execannot read from it, causing the server's stdin to be broken (immediate EOF or failure), which prevented the server from registering a successful startup before exiting."Locate CodeQL binary" step:
find "$LOCALAPPDATA" -path "*gh-codeql*release*" -name "codeql.exe"assumes the binary lives under a path containingrelease. The gh-codeql extension stores downloads at%LOCALAPPDATA%\GitHub\gh-codeql\on Windows, and the subdirectory layout may not containreleaseat all — find returns nothing, the step errors with "Could not locate CodeQL binary".Updated Behavior
uname -sdetects MSYS2/MINGW/CYGWIN and skipsmkfifoentirely, falling through to the process substitution fallback (< <(sleep 30)). Git Bash's process substitution creates a Windows-compatible pipe handle that nativenode.exereads correctly.The Windows binary search now checks well-known gh-codeql data directories in order —
GitHub\gh-codeql,GitHub CLI\extensions\gh-codeql, then all ofLOCALAPPDATA(with-maxdepth 10) — without any path-pattern constraint.Motivation
Both bugs are Windows-only and were introduced together with the new CODEQL_PATH test infrastructure. macOS and Linux are unaffected.
🔄 Before vs. After Comparison
Functionality Changes
API Changes
N/A — no API changes.
Output Format Changes
N/A — no output format changes.
🧪 Testing & Validation
Test Coverage Updates
CODEQL_PATH Testsmatrix job itself is the regression testValidation Scenarios
mkfifostill used on non-Windows.-maxdepth 10prevents slow recursive scans of large LOCALAPPDATA trees.Test Results
📋 Implementation Details
Files Modified
.github/workflows/client-integration-tests.ymlserver/scripts/test-codeql-path-valid.shCode Changes Summary
Dependencies
🔍 Quality Improvements
Bug Fixes
CODEQL_PATH Tests (windows-latest)fails on every runmkfifocreates pipes incompatible with nativenode.exe; (2) binary search pattern*release*doesn't match the actual Windows storage pathmkfifoon Windows; search well-known gh-codeql directories without a path-pattern constraintuname -s-based OS detection; directory-first search order avoids reliance on internal layout assumptionsPerformance Improvements
N/A
Code Quality Enhancements
🔗 References
Related Issues/PRs
Upgrade CodeQL to v2.24.3PR (Upgrade CodeQL tov2.24.3and upgrade NodeJS dependencies to latest #114) which introduced the new CODEQL_PATH test infrastructureExternal References
%LOCALAPPDATA%\GitHub\gh-codeql\(documented inaction.ymlcache config)Validation Materials
CODEQL_PATH Testsmatrix job (all three OS targets)🚀 Compatibility & Migration
Backward Compatibility
API Evolution
👥 Review Guidelines
For Reviewers
Please verify:
Testing Instructions
Validation Checklist
📊 Impact Assessment
Server Impact
AI Assistant Impact
🔄 Deployment Strategy
Rollout Considerations
Update Methodology: This update follows best practices:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.