feat(orbit): add Windows support for orbit local
Summary
Adds Windows support to glab orbit local. The Orbit local CLI started publishing Windows binaries with v0.59.1; this MR lifts the previous "not supported on Windows" restriction in glab so Windows users can install and run the command end-to-end.
Closes #8315 (closed).
What this enables
| Platform | Before | After |
|---|---|---|
| Windows x64 | rejected up front | downloads orbit-local-windows-x86_64.zip, extracts orbit.exe, runs it |
| Windows ARM64 | rejected up front | uses the same x64 asset (Windows 11 runs it under transparent x64 emulation) |
| macOS / Linux | unchanged | unchanged |
Only x86_64 Windows is published upstream. ARM64 Windows transparently emulates x64, so we route both Windows GOARCH values to the same asset. If a host lacks x64 emulation (older Windows builds), the exec error is wrapped with a hint pointing at emulation as the likely cause.
Notes for reviewers
- New
ZipExtractorininternal/binarymgrmirrors the existingTarGzExtractor(same zip-slip guards, same shape). - The orbit local extractor picks between zip and tar.gz by file extension, so existing macOS/Linux flows keep using the tarball path.
- The Windows executor follows the existing Duo CLI Windows pattern: subprocess, propagate exit code, no
syscall.Exec(Windows lacks it). - Marked experimental on all platforms; Windows is no different.
Test plan
- Unit tests added/updated:
ZipExtractorhappy path + zip-slip + missing-binary,orbitNormalizeArchfor Windows,orbitAssetName/orbitInstalledNamefor Windows,wrapExecErrorpaths (Windows-gated). -
go test ./internal/binarymgr/... ./internal/commands/orbit/...passes locally. -
golangci-lintpasses for the touched packages. -
GOOS=windows GOARCH=amd64 go build ./...succeeds. - Smoke test on a real Windows x64 host (CI cross-compiles but does not exercise the binary).
- Smoke test on Windows 11 ARM64 to confirm emulation path.
Edited by Bohdan Parkhomchuk