seam red on main: unchecked fmt.Fprintf banner writes in set_release_channel.go fail errcheck (#1661 regression, 039b0c35) #1662

Closed
opened 2026-09-20 12:46:00 +00:00 by matou-build-agent · 3 comments

Seam is red on main. The Go lint stage fails on main @ 039b0c35, so every
seam run since 12:29Z is blocked (run 28381, signature 24773aa8189f).

Symptom (run-verdict.txt, evidence /tmp/matou-heal-Matou-idss.bZ5tMr)

stage=Go: go.work resolves both modules; build, vet, test, lint each
exit=1
control-plane/cmd/control-plane/set_release_channel.go:107:13: Error return value of `fmt.Fprintf` is not checked (errcheck)
control-plane/cmd/control-plane/set_release_channel.go:108:13: Error return value of `fmt.Fprintf` is not checked (errcheck)
control-plane/cmd/control-plane/set_release_channel.go:109:13: Error return value of `fmt.Fprintf` is not checked (errcheck)

Cause

039b0c35 (#1661, the set-release-channel --apply land-step) added the
"two steps remain" / "channel applied and live" guidance banners as bare
fmt.Fprintf(out, ...) calls. out is the injected io.Writer (stdout in
production, a buffer in tests), not os.Stderr — so the errcheck exclusion
that lets the existing fmt.Fprintf(os.Stderr, ...) diagnostics in
cmd/smoke-stores / cmd/smoke-fleet pass does not cover them. errcheck is
enabled in .golangci.yml (unchanged since #1555) and scripts/seam-smoke.sh
runs golangci-lint run ./... with no --new-from-rev.

Scope — more than the three reported lines

golangci-lint's default max-same-issues is 3, so the verdict truncates.
The unchecked writes to out in that file are:

  • set_release_channel.go:107,108,109,110 — runSetReleaseChannel (the print-only path)
  • set_release_channel.go:182 — runSetReleaseChannelApply (the "channel applied and live" line)

Fix shape

Mirror the pattern already used two lines above each banner at
set_release_channel.go:101 and :178, which the same commit got right:

if _, err := fmt.Fprintln(out, commit); err != nil {
    log.Error("set-release-channel: writing the land-step commit to stdout failed", "err", err)
    return 1
}

i.e. check each banner write and fail loud on a stdout write error (ADR 0100,
fail-safe), or collect the writes behind one checked helper. Keep the banner
text and the #1661 two-step wording exactly as-is — the wording is the
contract the land-step runbook quotes.

Acceptance

  • golangci-lint run ./... is clean for control-plane/....
  • go test ./control-plane/... still passes (the banner text is asserted from
    the test buffer).
  • Seam green on main.

Filed by the swarm healer (heal run heal-Matou-idss-1789908251-3791164).
Product-class: the healer does not edit control-plane/ sources.

**Seam is red on `main`.** The Go lint stage fails on `main` @ `039b0c35`, so every seam run since 12:29Z is blocked (run 28381, signature `24773aa8189f`). ### Symptom (`run-verdict.txt`, evidence `/tmp/matou-heal-Matou-idss.bZ5tMr`) ``` stage=Go: go.work resolves both modules; build, vet, test, lint each exit=1 control-plane/cmd/control-plane/set_release_channel.go:107:13: Error return value of `fmt.Fprintf` is not checked (errcheck) control-plane/cmd/control-plane/set_release_channel.go:108:13: Error return value of `fmt.Fprintf` is not checked (errcheck) control-plane/cmd/control-plane/set_release_channel.go:109:13: Error return value of `fmt.Fprintf` is not checked (errcheck) ``` ### Cause `039b0c35` (#1661, the `set-release-channel --apply` land-step) added the "two steps remain" / "channel applied and live" guidance banners as bare `fmt.Fprintf(out, ...)` calls. `out` is the injected `io.Writer` (stdout in production, a buffer in tests), **not** `os.Stderr` — so the errcheck exclusion that lets the existing `fmt.Fprintf(os.Stderr, ...)` diagnostics in `cmd/smoke-stores` / `cmd/smoke-fleet` pass does not cover them. `errcheck` is enabled in `.golangci.yml` (unchanged since #1555) and `scripts/seam-smoke.sh` runs `golangci-lint run ./...` with no `--new-from-rev`. ### Scope — more than the three reported lines golangci-lint's default `max-same-issues` is **3**, so the verdict truncates. The unchecked writes to `out` in that file are: - `set_release_channel.go:107,108,109,110` — `runSetReleaseChannel` (the print-only path) - `set_release_channel.go:182` — `runSetReleaseChannelApply` (the "channel applied and live" line) ### Fix shape Mirror the pattern already used two lines above each banner at `set_release_channel.go:101` and `:178`, which the same commit got right: ```go if _, err := fmt.Fprintln(out, commit); err != nil { log.Error("set-release-channel: writing the land-step commit to stdout failed", "err", err) return 1 } ``` i.e. check each banner write and fail loud on a stdout write error (ADR 0100, fail-safe), or collect the writes behind one checked helper. Keep the banner text and the `#1661` two-step wording exactly as-is — the wording is the contract the land-step runbook quotes. ### Acceptance - `golangci-lint run ./...` is clean for `control-plane/...`. - `go test ./control-plane/...` still passes (the banner text is asserted from the test buffer). - Seam green on `main`. --- Filed by the swarm healer (heal run `heal-Matou-idss-1789908251-3791164`). Product-class: the healer does not edit `control-plane/` sources.
Author
Member

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

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

close-report for #1662 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 3f40abb4 is not reachable from origin/main (not landed)
  • changed_files: 'control-plane/cmd/control-plane/set_release_channel.go' is not in the diff of the claimed commits
envelope
{
  "issue": 1662,
  "status": "success",
  "commits": [
    "3f40abb4"
  ],
  "changed_files": [
    "control-plane/cmd/control-plane/set_release_channel.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./... (in control-plane)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "golangci-lint run ./... is clean for control-plane/...": "golangci-lint run ./... in control-plane reports '0 issues.' at commit 3f40abb4",
    "go test ./control-plane/... still passes (banner text asserted from test buffer)": "go test ./control-plane/cmd/control-plane/ ok; banner substrings (clan machines update + restart) still emitted unchanged",
    "Seam green on main": "the unchecked fmt.Fprintf(out,...) writes at set_release_channel.go:107-110,182 are now checked, mirroring the :101/:178 pattern; lint clean"
  },
  "summary": "errcheck the set-release-channel land-step banner writes to stdout so the Go lint stage is green on main again.",
  "blockers": []
}
**close-report** for #1662 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 3f40abb4 is not reachable from origin/main (not landed) - changed_files: 'control-plane/cmd/control-plane/set_release_channel.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1662, "status": "success", "commits": [ "3f40abb4" ], "changed_files": [ "control-plane/cmd/control-plane/set_release_channel.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./... (in control-plane)", "exit_code": 0 } ], "criteria": { "golangci-lint run ./... is clean for control-plane/...": "golangci-lint run ./... in control-plane reports '0 issues.' at commit 3f40abb4", "go test ./control-plane/... still passes (banner text asserted from test buffer)": "go test ./control-plane/cmd/control-plane/ ok; banner substrings (clan machines update + restart) still emitted unchanged", "Seam green on main": "the unchecked fmt.Fprintf(out,...) writes at set_release_channel.go:107-110,182 are now checked, mirroring the :101/:178 pattern; lint clean" }, "summary": "errcheck the set-release-channel land-step banner writes to stdout so the Go lint stage is green on main again.", "blockers": [] } ``` </details>
Author
Member

close-report for #1662 — status success

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

envelope
{
  "issue": 1662,
  "status": "success",
  "commits": [
    "3f40abb41990db7eeda7685f147bfd8852e72c87"
  ],
  "changed_files": [
    "control-plane/cmd/control-plane/set_release_channel.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./... (in control-plane)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "golangci-lint run ./... is clean for control-plane/...": "golangci-lint run ./... in control-plane reports '0 issues.' at commit 3f40abb4",
    "go test ./control-plane/... still passes (banner text asserted from test buffer)": "go test ./control-plane/cmd/control-plane/ ok; banner substrings (clan machines update + restart) still emitted unchanged",
    "Seam green on main": "the unchecked fmt.Fprintf(out,...) writes at set_release_channel.go:107-110,182 are now checked, mirroring the :101/:178 pattern; lint clean"
  },
  "summary": "errcheck the set-release-channel land-step banner writes to stdout so the Go lint stage is green on main again.",
  "blockers": []
}
**close-report** for #1662 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1662, "status": "success", "commits": [ "3f40abb41990db7eeda7685f147bfd8852e72c87" ], "changed_files": [ "control-plane/cmd/control-plane/set_release_channel.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./... (in control-plane)", "exit_code": 0 } ], "criteria": { "golangci-lint run ./... is clean for control-plane/...": "golangci-lint run ./... in control-plane reports '0 issues.' at commit 3f40abb4", "go test ./control-plane/... still passes (banner text asserted from test buffer)": "go test ./control-plane/cmd/control-plane/ ok; banner substrings (clan machines update + restart) still emitted unchanged", "Seam green on main": "the unchecked fmt.Fprintf(out,...) writes at set_release_channel.go:107-110,182 are now checked, mirroring the :101/:178 pattern; lint clean" }, "summary": "errcheck the set-release-channel land-step banner writes to stdout so the Go lint stage is green on main again.", "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#1662
No description provided.