ci red: revive unused-parameter 'tree' in renderGrampsWebAdmin blocks the seam Go stage (causative in 3a2645a2) #1312

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

ci run 19794 (seam, push of 3a2645a2 to main) is red at stage "Go: go.work resolves both modules; build, vet, test, lint each", exit 1. golangci-lint run ./... reports one revive error:

internal/clan/whakapapa.go:424:73: unused-parameter: parameter 'tree' seems to be unused, consider removing or renaming it as _ (revive)

Unlike #1309 (where the pushed commit was the messenger), this fault is causative: it shipped in the head commit of the failing run.

Root cause

3a2645a2 ("Gramps Web owner bootstrap uses the real CLI shape…") rewrote the grampsweb-admin oneshot. The old shape consumed the parameter:

fmt.Fprintf(b, "      tree=%q\n", tree)
b.WriteString("        gramps-web user add \"$user\" ... --tree \"$tree\" || true\n")

Both lines were deleted by the fix — correctly, because --tree takes a tree ID that single-tree mode (GRAMPSWEB_TREE) does not need, and the tree name moved to renderGrampsWebContainers, which now emits GRAMPSWEB_TREE = %q for the celery worker. The commit dropped every use of tree inside renderGrampsWebAdmin but left the parameter in the signature:

  • internal/clan/whakapapa.go:424 — func renderGrampsWebAdmin(b *strings.Builder, _ WhakapapaConfig, admin, tree string)
  • internal/clan/whakapapa.go:266 — the sole caller, renderGrampsWebAdmin(&b, cfg, admin, tree)

Across the function's full extent (424–474) tree appears only inside b.WriteString string literals — comment text in the generated Nix, not a Go reference. Column 73 in the verdict lands exactly on the tree token in the signature.

This is a repeat of the class #1309 cleared, in the same function: #1309 renamed this signature's dead cfg to _; 3a2645a2 then killed tree the same way.

Fix

Drop the parameter and its argument (preferred — renderGrampsWebAdmin genuinely no longer needs a tree), or rename it _ to match the cfg treatment #1309 applied one position to the left. Then re-rule the Go stage:

go build ./... && go vet ./... && go test ./... && golangci-lint run ./...

Check whether the same commit left any sibling parameter dead in renderGrampsWebContainers / renderWhakapapaBrand before closing — the seam stops at the first error, so one green run is the only proof the set is clear.

Evidence

  • run-verdict.txt (heal evidence /tmp/matou-heal-Matou-idss.PGUyKx) — stage, exit=1, the verbatim error line.
  • runs.json — the seam run for 3a2645a2; workdir-git.txt — workdir at 3a2645a2, no rebase in progress.
  • scripts/seam-smoke.sh:185-189 — the stage that runs golangci-lint run ./....
  • git show 3a2645a2 -- internal/clan/whakapapa.go — the removed tree=%q / --tree "$tree" lines.

Confirmed statically, not by re-running the linter: golangci-lint is not on the healer's PATH (it lives in the flake devshell, flake.nix:210) and the swarm lock was held, so the workdir was read-only.


Filed by the swarm healer — heal run heal-Matou-idss-1788833133-3585532, signature 90d3280a8d76.

`ci` run **19794** (seam, push of `3a2645a2` to `main`) is red at stage **"Go: go.work resolves both modules; build, vet, test, lint each"**, exit 1. `golangci-lint run ./...` reports one `revive` error: ``` internal/clan/whakapapa.go:424:73: unused-parameter: parameter 'tree' seems to be unused, consider removing or renaming it as _ (revive) ``` Unlike #1309 (where the pushed commit was the messenger), this fault **is causative**: it shipped in the head commit of the failing run. ## Root cause `3a2645a2` ("Gramps Web owner bootstrap uses the real CLI shape…") rewrote the `grampsweb-admin` oneshot. The old shape consumed the parameter: ```go fmt.Fprintf(b, " tree=%q\n", tree) b.WriteString(" gramps-web user add \"$user\" ... --tree \"$tree\" || true\n") ``` Both lines were **deleted** by the fix — correctly, because `--tree` takes a tree ID that single-tree mode (`GRAMPSWEB_TREE`) does not need, and the tree name moved to `renderGrampsWebContainers`, which now emits `GRAMPSWEB_TREE = %q` for the celery worker. The commit dropped every use of `tree` inside `renderGrampsWebAdmin` but left the parameter in the signature: - `internal/clan/whakapapa.go:424` — `func renderGrampsWebAdmin(b *strings.Builder, _ WhakapapaConfig, admin, tree string)` - `internal/clan/whakapapa.go:266` — the sole caller, `renderGrampsWebAdmin(&b, cfg, admin, tree)` Across the function's full extent (424–474) `tree` appears **only inside `b.WriteString` string literals** — comment text in the generated Nix, not a Go reference. Column 73 in the verdict lands exactly on the `tree` token in the signature. This is a repeat of the class #1309 cleared, in the **same function**: #1309 renamed this signature's dead `cfg` to `_`; `3a2645a2` then killed `tree` the same way. ## Fix Drop the parameter and its argument (preferred — `renderGrampsWebAdmin` genuinely no longer needs a tree), or rename it `_` to match the `cfg` treatment #1309 applied one position to the left. Then re-rule the Go stage: ``` go build ./... && go vet ./... && go test ./... && golangci-lint run ./... ``` Check whether the same commit left any sibling parameter dead in `renderGrampsWebContainers` / `renderWhakapapaBrand` before closing — the seam stops at the first error, so one green run is the only proof the set is clear. ## Evidence - `run-verdict.txt` (heal evidence `/tmp/matou-heal-Matou-idss.PGUyKx`) — stage, `exit=1`, the verbatim error line. - `runs.json` — the seam run for `3a2645a2`; `workdir-git.txt` — workdir at `3a2645a2`, no rebase in progress. - `scripts/seam-smoke.sh:185-189` — the stage that runs `golangci-lint run ./...`. - `git show 3a2645a2 -- internal/clan/whakapapa.go` — the removed `tree=%q` / `--tree "$tree"` lines. Confirmed statically, not by re-running the linter: `golangci-lint` is not on the healer's PATH (it lives in the flake devshell, `flake.nix:210`) and the swarm lock was `held`, so the workdir was read-only. --- Filed by the swarm healer — heal run `heal-Matou-idss-1788833133-3585532`, signature `90d3280a8d76`.
Author
Member

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

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

close-report for #1312 — status success

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

envelope
{
  "issue": 1312,
  "status": "success",
  "commits": [
    "a0a1e58c"
  ],
  "changed_files": [
    "internal/clan/whakapapa.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "revive unused-parameter 'tree' at whakapapa.go:424 cleared": "dropped the dead parameter from renderGrampsWebAdmin's signature and its argument at the sole caller (:266) in commit a0a1e58c",
    "Go stage green (go build && go vet && go test && golangci-lint run ./...)": "all four ran exit 0 via nix develop .#go-ci; golangci-lint run ./... reported no errors",
    "no sibling parameter left dead by 3a2645a2": "checked renderGrampsWebContainers (still uses tree) and renderWhakapapaBrand (still uses brand/admin); one green golangci-lint run over ./... proves the set is clear"
  },
  "summary": "Dropped the unused 'tree' parameter from renderGrampsWebAdmin, clearing the causative revive red at the seam Go stage.",
  "blockers": []
}
**close-report** for #1312 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1312, "status": "success", "commits": [ "a0a1e58c" ], "changed_files": [ "internal/clan/whakapapa.go" ], "tests": [ { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go test ./internal/clan/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./...", "exit_code": 0 } ], "criteria": { "revive unused-parameter 'tree' at whakapapa.go:424 cleared": "dropped the dead parameter from renderGrampsWebAdmin's signature and its argument at the sole caller (:266) in commit a0a1e58c", "Go stage green (go build && go vet && go test && golangci-lint run ./...)": "all four ran exit 0 via nix develop .#go-ci; golangci-lint run ./... reported no errors", "no sibling parameter left dead by 3a2645a2": "checked renderGrampsWebContainers (still uses tree) and renderWhakapapaBrand (still uses brand/admin); one green golangci-lint run over ./... proves the set is clear" }, "summary": "Dropped the unused 'tree' parameter from renderGrampsWebAdmin, clearing the causative revive red at the seam Go stage.", "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#1312
No description provided.