chore(ci): clear lint findings, make golangci-lint a required gate
Summary
- Fix 46 errcheck/staticcheck findings across production and test files; golangci-lint now reports 0 issues with the CI-pinned image (golangci/golangci-lint:v2.11.4)
- Remove `allow_failure: true` from the `golangci-lint` CI job; lint is now a required gate
Details
All errcheck findings were mechanical unchecked error returns: HTTP response body closes, JSON encoder writes, fmt.Fprint calls in mock HTTP handlers, and json.Unmarshal in test assertions. Three json.Unmarshal sites in config_test.go that could silently mask real test failures are upgraded to t.Fatalf rather than suppressed.
Staticcheck fixes:
- SA4008 + SA4004 (server_test.go): dead retry loop simplified to a single time.Sleep
- QF1002 (roster_test.go): untagged switch converted to tagged form
Three production-file findings (adapter.go, client.go) were also present and fixed; the gate must reach 0.
Test plan
- golangci/golangci-lint:v2.11.4 reports 0 issues
- go vet ./... passes
- CGO_ENABLED=1 go test -race ./... passes all packages
Generated with Claude Code