fix golangci-lint findings failing the mirror test workflow #233

Closed
opened 2026-06-23 08:07:14 +00:00 by coilyco-ops · 1 comment
Member

fix golangci-lint findings failing the mirror test workflow

The .github/workflows/test.yml golangci-lint job (golangci-lint v2.12.2) is red on main. It runs only on the GitHub mirror, so it does not gate canonical pushes, and these findings have accumulated unfixed since 2026-06-18.

Fresh-clone main, run golangci-lint run to get the live set (it may have drifted from the list below), and fix every finding. Keep each fix minimal and local. Do not disable linters or add //nolint to paper over them unless a finding is genuinely a false positive, in which case justify it in the PR.

Known findings as of run 27754160348 (all under cmd/ward/):

  • errcheck - agent_upgrade.go:42:12 - return value of fmt.Fprint not checked.
  • exhaustive - agent.go:461:2 - switch on preflightVerdict missing verdictUnknown, verdictGo.
  • exhaustive - container.go:151:2 - switch on containerMode missing modeQwen.
  • exhaustive - container_compute.go:121:2 - switch on containerMode missing modeClaude, modeCodex.
  • exhaustive - container_compute.go:148:2 - switch on containerMode missing modeCodex, modeQwen.
  • gocyclo - agent.go:488 - (*Runner).handlePreflightWrongRepo complexity 13 (> 12).
  • gocyclo - agent_reply.go:108 - (*Runner).runAgentReply complexity 14 (> 12).
  • gocyclo - agent_route.go:64 - (*Runner).runAgentTaskRoute complexity 17 (> 12).
  • staticcheck QF1001 - container_test.go:424:5 and :455:5 - apply De Morgan's law.
  • unused - agent_signature.go:34:24 - containerMode.agentDisplayName is unused (remove it, or wire it in if it was meant to be used).

Acceptance: golangci-lint run exits clean and go test ./... passes.


Filed by ward agent claude task.

— Claude (she/her), via ward agent

fix golangci-lint findings failing the mirror test workflow The `.github/workflows/test.yml` golangci-lint job (golangci-lint v2.12.2) is red on main. It runs only on the GitHub mirror, so it does not gate canonical pushes, and these findings have accumulated unfixed since 2026-06-18. Fresh-clone main, run `golangci-lint run` to get the live set (it may have drifted from the list below), and fix every finding. Keep each fix minimal and local. Do not disable linters or add `//nolint` to paper over them unless a finding is genuinely a false positive, in which case justify it in the PR. Known findings as of run 27754160348 (all under `cmd/ward/`): - errcheck - agent_upgrade.go:42:12 - return value of `fmt.Fprint` not checked. - exhaustive - agent.go:461:2 - switch on `preflightVerdict` missing `verdictUnknown`, `verdictGo`. - exhaustive - container.go:151:2 - switch on `containerMode` missing `modeQwen`. - exhaustive - container_compute.go:121:2 - switch on `containerMode` missing `modeClaude`, `modeCodex`. - exhaustive - container_compute.go:148:2 - switch on `containerMode` missing `modeCodex`, `modeQwen`. - gocyclo - agent.go:488 - `(*Runner).handlePreflightWrongRepo` complexity 13 (> 12). - gocyclo - agent_reply.go:108 - `(*Runner).runAgentReply` complexity 14 (> 12). - gocyclo - agent_route.go:64 - `(*Runner).runAgentTaskRoute` complexity 17 (> 12). - staticcheck QF1001 - container_test.go:424:5 and :455:5 - apply De Morgan's law. - unused - agent_signature.go:34:24 - `containerMode.agentDisplayName` is unused (remove it, or wire it in if it was meant to be used). Acceptance: `golangci-lint run` exits clean and `go test ./...` passes. --- Filed by `ward agent claude task`. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Member

🔒 Reserved by ward agent claude — container ward-ward-issue-233-claude-41fbce4e on host kais-macbook-pro-2.local is carrying this issue (reserved 2026-06-23T08:07:14Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent claude` — container `ward-ward-issue-233-claude-41fbce4e` on host `kais-macbook-pro-2.local` is carrying this issue (reserved 2026-06-23T08:07:14Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#233
No description provided.