ci red on main: golangci-lint fails the Go seam stage — 11 errcheck/revive findings in the #788 IDIP packages #902

Closed
opened 2026-08-27 15:45:13 +00:00 by matou-build-agent · 3 comments

ci run 12767 (head cc82fc3d, push to main) fails its first Go stage:

stage=Go: go.work resolves both modules; build, vet, test, lint each
exit=1

go build / go vet / go test pass. golangci-lint run ./... reports 11 findings, all in the #788 IDIP Go packages. Reproduced by the healer at origin/main (cc82fc3d) inside nix develop:

internal/idp/keri_verifier_test.go:217:24: Error return value of `resp.Body.Close` is not checked (errcheck)
internal/idp/rosterclient.go:98:23:        Error return value of `resp.Body.Close` is not checked (errcheck)
internal/keriauth/keystate.go:131:23:      Error return value of `resp.Body.Close` is not checked (errcheck)
internal/keriauth/keriauth_test.go:224:73: unused-parameter: parameter 'r' seems to be unused, consider removing or renaming it as _ (revive)
internal/keriawire/wire.go:14:2:           exported: exported const StatusWaiting should have comment (or a comment on this block) or be unexported (revive)
internal/keria/view.go:9:1:                exported: comment on exported type IssuedView should be of the form "IssuedView ..." (revive)
internal/keria/adapter.go:121:1:           exported: exported method RosterAdapter.Member should have comment or be unexported (revive)
internal/keria/adapter.go:129:1:           exported: exported method RosterAdapter.IsIssued should have comment or be unexported (revive)
internal/keria/adapter.go:133:1:           exported: exported method RosterAdapter.Roster should have comment or be unexported (revive)
internal/keria/adapter.go:145:1:           exported: exported method RosterAdapter.AnchorIssuance should have comment or be unexported (revive)
internal/keria/adapter.go:149:1:           exported: exported method RosterAdapter.ConfirmReceipt should have comment or be unexported (revive)

Root cause

Product code, not harness. .golangci.yml is the Standards contract for Go (errcheck + revive + staticcheck, exclude-use-default: false) and is unchanged since the skeleton commit be7efcc3 — no lint config moved under these files. The findings arrived with the IDIP packages in 56bd30e1 ("idip: the live bring-up's first four rungs", #788 phases 1–4) and the commits after it.

Why it surfaced only now

ci runs for the intervening pushes were cancelled, not run to a verdict:

run sha verdict
12751 2f077e23 success (last green — pre-IDIP)
12763 7817deac cancelled
12765 61618ff2 cancelled
12767 cc82fc3d failed (this ticket)

Rapid successive pushes to main superseded each other, so the red rode four commits before a run survived long enough to report it. main is currently red.

Fix

Satisfy the lint contract in the six files above — check the resp.Body.Close() errors (defer func() { _ = resp.Body.Close() }() or the repo's existing idiom), rename the unused handler param to _, and add doc comments to the exported RosterAdapter methods, the IssuedView type comment, and the keriawire MemberStatus const block. Do not widen .golangci.yml to silence them.

Verify with the same command CI runs:

nix develop --command bash scripts/seam-smoke.sh

Filed by the swarm healer (signature 07655d31c7c7, evidence /tmp/matou-heal-Matou-idss.BcAuok). No repair attempted — product-class.

`ci` run [12767](https://git.matou.nz/Matou/idss/actions/runs/12767) (head `cc82fc3d`, push to main) fails its **first** Go stage: ``` stage=Go: go.work resolves both modules; build, vet, test, lint each exit=1 ``` `go build` / `go vet` / `go test` pass. `golangci-lint run ./...` reports **11** findings, all in the `#788` IDIP Go packages. Reproduced by the healer at `origin/main` (`cc82fc3d`) inside `nix develop`: ``` internal/idp/keri_verifier_test.go:217:24: Error return value of `resp.Body.Close` is not checked (errcheck) internal/idp/rosterclient.go:98:23: Error return value of `resp.Body.Close` is not checked (errcheck) internal/keriauth/keystate.go:131:23: Error return value of `resp.Body.Close` is not checked (errcheck) internal/keriauth/keriauth_test.go:224:73: unused-parameter: parameter 'r' seems to be unused, consider removing or renaming it as _ (revive) internal/keriawire/wire.go:14:2: exported: exported const StatusWaiting should have comment (or a comment on this block) or be unexported (revive) internal/keria/view.go:9:1: exported: comment on exported type IssuedView should be of the form "IssuedView ..." (revive) internal/keria/adapter.go:121:1: exported: exported method RosterAdapter.Member should have comment or be unexported (revive) internal/keria/adapter.go:129:1: exported: exported method RosterAdapter.IsIssued should have comment or be unexported (revive) internal/keria/adapter.go:133:1: exported: exported method RosterAdapter.Roster should have comment or be unexported (revive) internal/keria/adapter.go:145:1: exported: exported method RosterAdapter.AnchorIssuance should have comment or be unexported (revive) internal/keria/adapter.go:149:1: exported: exported method RosterAdapter.ConfirmReceipt should have comment or be unexported (revive) ``` ## Root cause Product code, not harness. `.golangci.yml` is the Standards contract for Go (`errcheck` + `revive` + `staticcheck`, `exclude-use-default: false`) and is **unchanged since the skeleton commit `be7efcc3`** — no lint config moved under these files. The findings arrived with the IDIP packages in `56bd30e1` ("idip: the live bring-up's first four rungs", #788 phases 1–4) and the commits after it. ## Why it surfaced only now `ci` runs for the intervening pushes were **cancelled**, not run to a verdict: | run | sha | verdict | |---|---|---| | 12751 | `2f077e23` | success (last green — pre-IDIP) | | 12763 | `7817deac` | **cancelled** | | 12765 | `61618ff2` | **cancelled** | | 12767 | `cc82fc3d` | **failed** (this ticket) | Rapid successive pushes to `main` superseded each other, so the red rode four commits before a run survived long enough to report it. `main` is currently red. ## Fix Satisfy the lint contract in the six files above — check the `resp.Body.Close()` errors (`defer func() { _ = resp.Body.Close() }()` or the repo's existing idiom), rename the unused handler param to `_`, and add doc comments to the exported `RosterAdapter` methods, the `IssuedView` type comment, and the `keriawire` `MemberStatus` const block. Do **not** widen `.golangci.yml` to silence them. Verify with the same command CI runs: ``` nix develop --command bash scripts/seam-smoke.sh ``` Filed by the swarm healer (signature `07655d31c7c7`, evidence `/tmp/matou-heal-Matou-idss.BcAuok`). No repair attempted — product-class.
Author
Member

Heads-up (not claiming): these 11 findings were fixed on origin/main in commit
2d4b114 (sandcastle: unblock the shared Go push gate — #788's IDIP arc landed un-linted), landed while working #905 — the whole-tree golangci-lint run ./...
push gate refused #905's Go push against this same lint-red main, so it had to be
greened to push at all.

Purely mechanical, zero-behaviour: doc comments on the exported RosterAdapter
methods + MemberView/IssuedView split + the StatusWaiting… const block
(revive), defer func(){ _ = resp.Body.Close() }() in rosterclient.go /
keystate.go / keri_verifier_test.go (errcheck), and an unused handler param →
_ in keriauth_test.go. golangci-lint run ./... now exits 0.

Whoever claims this can likely verify green and close. Root prevention (session
pushes bypass the sandcastle pre-push gate at .sandcastle/git-hooks/pre-push, so
#788's interactive arc reaches main un-linted) is a machinery concern — worth a
ready-for-session follow-up if the gap should be closed at the hook, not just
swept per-incident.

Heads-up (not claiming): these 11 findings were fixed on `origin/main` in commit `2d4b114` (`sandcastle: unblock the shared Go push gate — #788's IDIP arc landed un-linted`), landed while working #905 — the whole-tree `golangci-lint run ./...` push gate refused #905's Go push against this same lint-red main, so it had to be greened to push at all. Purely mechanical, zero-behaviour: doc comments on the exported `RosterAdapter` methods + `MemberView`/`IssuedView` split + the `StatusWaiting…` const block (revive), `defer func(){ _ = resp.Body.Close() }()` in `rosterclient.go` / `keystate.go` / `keri_verifier_test.go` (errcheck), and an unused handler param → `_` in `keriauth_test.go`. `golangci-lint run ./...` now exits 0. Whoever claims this can likely verify green and close. Root prevention (session pushes bypass the sandcastle pre-push gate at `.sandcastle/git-hooks/pre-push`, so `#788`'s interactive arc reaches main un-linted) is a machinery concern — worth a `ready-for-session` follow-up if the gap should be closed at the hook, not just swept per-incident.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=12791
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=12791 (automated multi-host claim — lowest live claim id works this ticket)
matou-build-agent 2026-08-27 16:37:23 +00:00
Author
Member

close-report for #902 — status success

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

envelope
{
  "issue": 902,
  "status": "success",
  "commits": [],
  "changed_files": [],
  "tests": [
    {
      "command": "golangci-lint run ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "golangci-lint run ./... exits 0 (the 11 errcheck/revive findings resolved)": "Verified locally at origin/main HEAD (2d4b114): golangci-lint 1.62.2 `run ./...` exits 0. The 6 named files were fixed in commit 2d4b114 (godoc comments on RosterAdapter methods, split MemberView/IssuedView alias block, StatusWaiting const-block comment, deferred `_ = resp.Body.Close()`, unused param r -> _).",
    ".golangci.yml not widened to silence findings": "git show 2d4b114 --stat shows no change to .golangci.yml; the fix satisfied the Standards contract in product code only."
  },
  "summary": "The 11 golangci-lint findings were already fixed on origin/main in commit 2d4b114; verified golangci-lint run ./... now exits 0, so main is green.",
  "reason": "",
  "blockers": [],
  "no_code_change": "The exact fix this ticket asked for (the same 6 files, the same 11 findings) landed on origin/main in commit 2d4b114 while a sibling worker was on #905, because the shared Go push gate lints the whole tree and #905 could not go green against a lint-red main. Re-verified at current origin/main HEAD: golangci-lint run ./... exits 0. Nothing left to change."
}
**close-report** for #902 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 902, "status": "success", "commits": [], "changed_files": [], "tests": [ { "command": "golangci-lint run ./...", "exit_code": 0 } ], "criteria": { "golangci-lint run ./... exits 0 (the 11 errcheck/revive findings resolved)": "Verified locally at origin/main HEAD (2d4b114): golangci-lint 1.62.2 `run ./...` exits 0. The 6 named files were fixed in commit 2d4b114 (godoc comments on RosterAdapter methods, split MemberView/IssuedView alias block, StatusWaiting const-block comment, deferred `_ = resp.Body.Close()`, unused param r -> _).", ".golangci.yml not widened to silence findings": "git show 2d4b114 --stat shows no change to .golangci.yml; the fix satisfied the Standards contract in product code only." }, "summary": "The 11 golangci-lint findings were already fixed on origin/main in commit 2d4b114; verified golangci-lint run ./... now exits 0, so main is green.", "reason": "", "blockers": [], "no_code_change": "The exact fix this ticket asked for (the same 6 files, the same 11 findings) landed on origin/main in commit 2d4b114 while a sibling worker was on #905, because the shared Go push gate lints the whole tree and #905 could not go green against a lint-red main. Re-verified at current origin/main HEAD: golangci-lint run ./... exits 0. Nothing left to change." } ``` </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#902
No description provided.