Skip to content

feat: concurrent Windows collection, platform tests, and CLI improvements#10

Merged
christiangda merged 7 commits intomainfrom
feat/sign-binaries
Mar 21, 2026
Merged

feat: concurrent Windows collection, platform tests, and CLI improvements#10
christiangda merged 7 commits intomainfrom
feat/sign-binaries

Conversation

@christiangda
Copy link
Copy Markdown
Contributor

Summary

  • Concurrent Windows collection: Rewrote collectIdentifiers on Windows to run all hardware queries (wmic/PowerShell) in parallel using goroutines, reducing ID generation time from ~8-12s to ~2-3s
  • Platform test coverage: Added windows_test.go (50+ tests) and linux_test.go (25+ tests) covering parsing functions, fallback paths, concurrent collection, mock executor integration, and diagnostics — previously only Darwin had dedicated platform tests
  • Platform-specific examples: Added example_windows_test.go and example_linux_test.go with testable examples for diagnostics, integrity verification, and platform-specific notes
  • CLI improvements: Grouped help output by category, documented default behavior (-cpu -motherboard -uuid) and exit codes, cleaner -version-long output with aligned key-value pairs, renamed -version.long to -version-long, added salt to JSON output
  • Lint fixes: Resolved all 22 golangci-lint issues across darwin/linux/windows (errcheck, staticcheck)
  • Doc updates: Updated doc.go and README.md with concurrent Windows details and revised CLI documentation

Test plan

  • All existing tests pass with race detector (go test -race ./...)
  • golangci-lint run ./... reports 0 issues on darwin, linux, and windows
  • go build ./... succeeds for all three platforms
  • go vet ./... passes for all three platforms
  • CLI help output (-h) displays grouped, professional format
  • CLI version outputs (-version, -version-long) display clean format
  • JSON output includes salt field when salt is provided

🤖 Generated with Claude Code

christiangda and others added 5 commits March 21, 2026 12:18
- Add installer resources (welcome.html, readme.html, license.html)
- Convert Apache 2.0 LICENSE to HTML for macOS Installer.app display
- Add Distribution XML for productbuild with Welcome, Read Me, and
  License Agreement screens
- Update Makefile build-dist-pkg to use pkgbuild + productbuild
- Users see install location, usage examples, uninstall instructions,
  and must agree to Apache 2.0 license before installing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Welcome, Read Me, License (Apache 2.0), and Distribution XML
- Fix .gitignore: scope 'machineid' rule to root only so installer/
  macos/machineid/ directory is not ignored

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ents

- Rewrite Windows collectIdentifiers to run all hardware queries
  concurrently using goroutines, reducing ID generation from ~8-12s
  to ~2-3s by parallelizing slow wmic/PowerShell calls.

- Add comprehensive platform-specific test files: windows_test.go
  (50+ tests covering parsing, fallback, concurrent collection,
  diagnostics) and linux_test.go (25+ tests covering parsing,
  validation, file reading, mock executor integration).

- Add platform-specific example files for Windows and Linux with
  testable examples for diagnostics, integrity, and platform notes.

- Improve CLI help: grouped flags by category, documented default
  behavior and exit codes, cleaner version output with aligned
  key-value pairs, rename -version.long to -version-long, include
  salt in JSON output.

- Fix all golangci-lint errors across darwin/linux/windows: add
  proper error checking in tests, nolint annotations for example
  functions, apply De Morgan's law fix.

- Update doc.go and README.md with concurrent Windows collection
  details and revised CLI documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@christiangda christiangda self-assigned this Mar 21, 2026
christiangda and others added 2 commits March 21, 2026 14:39
…RORS is true

Avoid double stdout redirection when the command already contains a
redirect (e.g. `> file`). Uses $(findstring) to detect existing
redirects and only adds `2>/dev/null` in that case.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@christiangda christiangda merged commit 9405bf4 into main Mar 21, 2026
5 checks passed
@christiangda christiangda deleted the feat/sign-binaries branch March 21, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant