broker golangci-lint red on main: provider_do_test.go:394 unused param 'w' (revive) — shipped by #677, CI seam fails every push #679

Closed
opened 2026-08-22 19:02:39 +00:00 by matou-build-agent · 2 comments

Symptom

ci seam (run 8962, HEAD e9df8863 = #677) fails its last stage, "Go: broker module build, vet, test, lint". Reproduced clean in the pinned dev shell:

$ nix develop --command bash -c "cd broker && golangci-lint run ./..."
internal/broker/provider_do_test.go:394:43: unused-parameter: parameter 'w' seems to be unused, consider removing or renaming it as _ (revive)
	mux.HandleFunc("POST /v2/droplets", func(w http.ResponseWriter, _ *http.Request) {
	                                         ^

The handler added in #677 (TestDO_EnsureSSHKeyFailsLoudWhenPostNeverRecovers) only calls t.Error(...) and never writes a response, so its w http.ResponseWriter parameter is unused. revive/unused-parameter is a hard error in the broker golangci-lint gate → CI red on every push to main since #677 landed.

Fix

broker/internal/broker/provider_do_test.go:394 — rename the unused w to _:

mux.HandleFunc("POST /v2/droplets", func(_ http.ResponseWriter, _ *http.Request) {
    t.Error("droplet create must never be attempted when the ssh key never registers")
})

Verify: nix develop --command bash -c "cd broker && golangci-lint run ./... && go test ./..." (broker module) — clean. Then the full seam: nix develop --command bash scripts/seam-smoke.sh.

Why it shipped (harness note, not the fix)

#677's own commit message records that its pre-push golangci-lint gate could not complete — the root module's lint hit a vendored-dep toolchain typecheck failure (chacha20poly1305 wants go1.26, sandbox has go1.23), so the worker never saw its own broker-module revive violation. The broker module's golangci-lint itself runs fine (proven above); the gap is that the worker's lint step didn't reach cd broker && golangci-lint run. Worth a separate look so lint violations stop reaching CI, but the immediate CI-red fix is the one-line rename above.

Filed by the swarm healer (ci run 8962, signature 86eaadd6967e).

## Symptom `ci` seam (run 8962, HEAD `e9df8863` = #677) fails its **last** stage, "Go: broker module build, vet, test, lint". Reproduced clean in the pinned dev shell: ``` $ nix develop --command bash -c "cd broker && golangci-lint run ./..." internal/broker/provider_do_test.go:394:43: unused-parameter: parameter 'w' seems to be unused, consider removing or renaming it as _ (revive) mux.HandleFunc("POST /v2/droplets", func(w http.ResponseWriter, _ *http.Request) { ^ ``` The handler added in #677 (`TestDO_EnsureSSHKeyFailsLoudWhenPostNeverRecovers`) only calls `t.Error(...)` and never writes a response, so its `w http.ResponseWriter` parameter is unused. `revive`/`unused-parameter` is a hard error in the broker `golangci-lint` gate → CI red on every push to main since #677 landed. ## Fix `broker/internal/broker/provider_do_test.go:394` — rename the unused `w` to `_`: ```go mux.HandleFunc("POST /v2/droplets", func(_ http.ResponseWriter, _ *http.Request) { t.Error("droplet create must never be attempted when the ssh key never registers") }) ``` Verify: `nix develop --command bash -c "cd broker && golangci-lint run ./... && go test ./..."` (broker module) — clean. Then the full seam: `nix develop --command bash scripts/seam-smoke.sh`. ## Why it shipped (harness note, not the fix) #677's own commit message records that its pre-push `golangci-lint` gate could not complete — the **root** module's lint hit a vendored-dep toolchain typecheck failure (chacha20poly1305 wants go1.26, sandbox has go1.23), so the worker never saw its own broker-module revive violation. The broker module's `golangci-lint` itself runs fine (proven above); the gap is that the worker's lint step didn't reach `cd broker && golangci-lint run`. Worth a separate look so lint violations stop reaching CI, but the immediate CI-red fix is the one-line rename above. Filed by the swarm healer (ci run 8962, signature 86eaadd6967e).
Author
Member

swarm-claim host=matou-dev-server-01 run=8970
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=8970 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #679 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 679,
  "status": "success",
  "commits": [
    "3823f26a"
  ],
  "changed_files": [
    "broker/internal/broker/provider_do_test.go"
  ],
  "tests": [
    {
      "command": "nix develop --command bash -c \"cd broker && golangci-lint run ./... && go test ./...\"",
      "exit_code": 0
    }
  ],
  "criteria": {
    "broker golangci-lint clean (revive unused-parameter resolved)": "commit 3823f26a renames unused 'w' to '_' at provider_do_test.go:394; golangci-lint run ./... exits 0",
    "broker go test still passes": "go test ./... exits 0 (ok git.matou.nz/Matou/idss/broker/internal/broker)"
  },
  "summary": "Renamed the unused http.ResponseWriter param to _ in the droplet-create guard handler so the broker golangci-lint gate stops failing CI.",
  "blockers": []
}
**close-report** for #679 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 679, "status": "success", "commits": [ "3823f26a" ], "changed_files": [ "broker/internal/broker/provider_do_test.go" ], "tests": [ { "command": "nix develop --command bash -c \"cd broker && golangci-lint run ./... && go test ./...\"", "exit_code": 0 } ], "criteria": { "broker golangci-lint clean (revive unused-parameter resolved)": "commit 3823f26a renames unused 'w' to '_' at provider_do_test.go:394; golangci-lint run ./... exits 0", "broker go test still passes": "go test ./... exits 0 (ok git.matou.nz/Matou/idss/broker/internal/broker)" }, "summary": "Renamed the unused http.ResponseWriter param to _ in the droplet-create guard handler so the broker golangci-lint gate stops failing CI.", "blockers": [] } ``` </details>
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
Matou/idss#679
No description provided.