S02-04 - Go on Three Operating Systems
Purpose: How the Go module is checked on macOS, Linux and Windows,
and how its tasks run under Windows cmd.exe.
Design
Section titled “Design”Go on three operating systems
Section titled “Go on three operating systems”Go runs on macOS, Linux, and Windows from the start. Most code is cross-platform Go (S12-platformsS12-platforms: PlatformsWhich host and guest operating systems Wraith Box targets, how platform-specific code is isolated, what each platform uses, and how wb works inside WSL.).
- CI lints, vets, tests, and builds it natively on all three, in a job
matrix. A pull request runs the macOS and Linux legs, and the Windows
leg waits for the push to
main(S02-02-ciS02-02-ci: CIHow the CI workflow runs the checks, which jobs a pull request or push skips, and the Go and Swift caches.). - Those jobs install only the Go tools and
buf(install_args), because some pinned tools have no Windows build. - Locally,
mise run go:crossvets, lints, and builds for all three GOOS values from one machine. It is part ofci. go:fuzzruns every fuzz target briefly, within a time budget (S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…).testdepends on it, and the task runs a Go program, which works on all three. CI runs it on Linux only, in thefuzzjob and not the Go job, and not on a pull request (S02-02-ciS02-02-ci: CIHow the CI workflow runs the checks, which jobs a pull request or push skips, and the Go and Swift caches.). That job runs the targets in parallel shards,go:fuzz -- -shard <i>/<n>, andci.ymlsets the shard count. Each shard runs one part of the sorted list of targets. The parts don’t overlap and together hold the whole list. Each shard has the whole budget, so a target in CI fuzzes for as long as locally or longer. Without-shard, as underci, the task runs every target.go:fuzz-longis the daily fuzz run (S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…). TheFuzzworkflow runs it on Linux once a day. It isn’t part ofci.go:vulncheckanalyzes each GOOS. For now its findings warn and don’t fail (I762I762 (closed): ci: govulncheck findings warn instead of failing the buildGO-2026-6859 (a crash in Go's net/http HTTP/1 server, found in go1.27.3 and fixed in go1.27.4) fails go:vulncheck since 2026-11-11.). govulncheck can’t ignore one advisory (golang/go#61211), so a Go standard library advisory would fail every pull request until the toolchain bump passes Renovate’s 7-day quiet period. On exit status 3, a finding, the task prints the report, aWARNINGline naming the advisories and, in GitHub Actions, a::warning::annotation per GOOS. Any other non-zero exit still fails, andvuln:osvstill fails on a finding. I763I763 (open): ci: find a way to ignore single govulncheck advisories, and fail on findings againFind a way to get back to "fail on a finding, except named advisories until a date", matching how osv-scanner.toml handles an ignoreUntil entry (AGENTS.md, "Supply chain"; scripts/osv-ignores.mjs). restores failing on a finding, with an ignore list per advisory.
Swift runs on macOS runners only. Docs, workflow linting, and the vulnerability scan run on Linux.
Go tasks under Windows cmd.exe
Section titled “Go tasks under Windows cmd.exe”mise runs a task’s run with cmd.exe on Windows. So the tasks CI
calls on Windows are single plain commands in the module directory
(dir).
run_windowscovers a flag that differs, such asgo testwithout-race, which needs a C compiler.- There is one Go module. Adding a second means extending the Go tasks deliberately.
- Tasks that only run on macOS or Linux may use shell scripts:
go:cross,go:vulncheck, theproto:tasks, Swift and docs.
Status: Active