⭐ Add native Windows API for services enumeration#6474
Draft
chris-rock wants to merge 4 commits intomainfrom
Draft
⭐ Add native Windows API for services enumeration#6474chris-rock wants to merge 4 commits intomainfrom
chris-rock wants to merge 4 commits intomainfrom
Conversation
Contributor
Implement native Windows Service Control Manager (SCM) API calls for local Windows connections, bypassing PowerShell for better performance. - Add services_native_windows.go using golang.org/x/sys/windows/svc/mgr - Add services_native_unix.go stub for non-Windows builds - Detect local Windows connections and use native API (~1-10ms vs 200-500ms) - Automatic fallback to PowerShell for remote connections or on failure
014b4fd to
eec3301
Compare
2 tasks
czunker
added a commit
that referenced
this pull request
Feb 26, 2026
The previous version ran all tests in the services package on Windows, which included Linux/macOS tests that fail due to path separators and symlinks. Now dynamically discovers packages containing _windows_test.go files and only runs those. See: #6474 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
czunker
added a commit
that referenced
this pull request
Mar 3, 2026
* ✨ Add Windows test workflow for PR CI Extract the Windows test workflow from #6474 to enable running Windows-specific tests (e.g. registry-based detection) in CI. See: #6474 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 🐛 Fix Windows test workflow to only run Windows-specific tests The previous version ran all tests in the services package on Windows, which included Linux/macOS tests that fail due to path separators and symlinks. Now dynamically discovers packages containing _windows_test.go files and only runs those. See: #6474 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 🐛 Fix review comments on Windows test workflow - Use relative paths for package discovery (DirectoryName returns absolute) - Filter empty strings from package split to avoid ghost arguments - Propagate go test exit code through Tee-Object - Add -count=1 to disable test caching in CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 🐛 Fix script injection risk and remove push trigger in Windows workflow Pass test packages via environment variable instead of direct interpolation to prevent potential script injection. Remove push trigger to match the PR-only intent of the workflow filename. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
This PR optimizes the Windows services resource to use native Windows APIs instead of PowerShell when running locally on Windows systems. This should be around 20x faster than the powershell-based service enumeration.