gofmt debt on main: internal/kanidm/fakekanidm_test.go reds ci (seam) — #636 left fakeKanidm's field block un-aligned #637

Closed
opened 2026-08-21 07:37:22 +00:00 by matou-build-agent · 2 comments

Symptom

ci (seam) is red at the Go: gofmt (tabs) — no formatting debt (#344) stage.
Run: https://git.matou.nz/Matou/idss/actions/runs/8368 (push of ddbc3d13, #636).

The healer's incident verdict mis-attributed the error lines to a dashboard test
<SurfaceErrorBoundary> / connect ECONNRESET — those are just error-boundary
stderr noise from an earlier vitest that passed; write_verdict's grep scraped
them because the real gofmt failure prints no error/fail keyword. The seam only
prints the gofmt banner after the TypeScript test stage passes, so the failing
stage is genuinely gofmt.

Root cause

internal/kanidm/fakekanidm_test.go is committed un-gofmt'd. Commit ddbc3d13
(#636) added two struct fields (locked, credSubmits) to fakeKanidm but did not
re-align the whole field block, so the pre-existing fields are now mis-tabbed.
Confirmed with the pinned go-1.23.8 gofmt (what CI runs) — gofmt -l flags the file.

gofmt -d excerpt:

 type fakeKanidm struct {
-	mu        sync.Mutex
-	persons   map[string]*fakePerson
+	mu          sync.Mutex
+	persons     map[string]*fakePerson
 	...
-	mux       *http.ServeMux
+	mux         *http.ServeMux
 }

Fix

gofmt -w internal/kanidm/fakekanidm_test.go

Then the seam's Go section is clean (no other tracked Go file is flagged; the
.sandcastle/nix-store/** hits are an untracked local nix cache CI never sees).

Secondary (for a session, not this task)

The Sandcastle pre-push gate (.sandcastle/gate-lib.sh) runs the same
gofmt -l . | grep -v '^node_modules/' over any Go-touching change and should have
blocked #636's push. It didn't. Worth a look at why the gate passed on the
worker branch yet the file landed unformatted — but that is a .sandcastle/
(protected) investigation for an interactive session, out of scope for this
one-file agent fix.

## Symptom `ci` (seam) is red at the **Go: gofmt (tabs) — no formatting debt (#344)** stage. Run: https://git.matou.nz/Matou/idss/actions/runs/8368 (push of `ddbc3d13`, #636). The healer's incident verdict mis-attributed the error lines to a `dashboard test` `<SurfaceErrorBoundary>` / `connect ECONNRESET` — those are just error-boundary stderr noise from an earlier vitest that **passed**; `write_verdict`'s grep scraped them because the real gofmt failure prints no `error`/`fail` keyword. The seam only prints the gofmt banner *after* the TypeScript test stage passes, so the failing stage is genuinely gofmt. ## Root cause `internal/kanidm/fakekanidm_test.go` is committed **un-gofmt'd**. Commit `ddbc3d13` (#636) added two struct fields (`locked`, `credSubmits`) to `fakeKanidm` but did not re-align the whole field block, so the pre-existing fields are now mis-tabbed. Confirmed with the pinned go-1.23.8 gofmt (what CI runs) — `gofmt -l` flags the file. `gofmt -d` excerpt: ``` type fakeKanidm struct { - mu sync.Mutex - persons map[string]*fakePerson + mu sync.Mutex + persons map[string]*fakePerson ... - mux *http.ServeMux + mux *http.ServeMux } ``` ## Fix ``` gofmt -w internal/kanidm/fakekanidm_test.go ``` Then the seam's Go section is clean (no other tracked Go file is flagged; the `.sandcastle/nix-store/**` hits are an untracked local nix cache CI never sees). ## Secondary (for a session, not this task) The Sandcastle pre-push gate (`.sandcastle/gate-lib.sh`) runs the same `gofmt -l . | grep -v '^node_modules/'` over any Go-touching change and should have blocked #636's push. It didn't. Worth a look at why the gate passed on the worker branch yet the file landed unformatted — but that is a `.sandcastle/` (protected) investigation for an interactive session, out of scope for this one-file agent fix.
Author
Member

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

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

close-report for #637 — status success

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

envelope
{
  "issue": 637,
  "status": "success",
  "commits": [
    "01ce3c55"
  ],
  "changed_files": [
    "internal/kanidm/fakekanidm_test.go"
  ],
  "tests": [
    {
      "command": "gofmt -l internal/kanidm/fakekanidm_test.go (pinned go-1.23.8)",
      "exit_code": 0
    },
    {
      "command": "git ls-files '*.go' | xargs gofmt -l (pinned go-1.23.8)",
      "exit_code": 0
    },
    {
      "command": "pre-push gate: nix develop .#go-ci Go seam (gofmt + go test)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "internal/kanidm/fakekanidm_test.go is gofmt-clean": "gofmt -w applied in 01ce3c55; gofmt -l now returns empty for the file and for all tracked *.go",
    "ci (seam) Go: gofmt (tabs) stage is no longer red": "pre-push gate ran the pinned go-1.23.8 Go seam (gofmt + go test) and passed before push landed 01ce3c55 on origin/main"
  },
  "summary": "Re-aligned the fakeKanidm field block that #636 left un-gofmt'd, clearing the ci (seam) gofmt debt.",
  "reason": "",
  "blockers": []
}
**close-report** for #637 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 637, "status": "success", "commits": [ "01ce3c55" ], "changed_files": [ "internal/kanidm/fakekanidm_test.go" ], "tests": [ { "command": "gofmt -l internal/kanidm/fakekanidm_test.go (pinned go-1.23.8)", "exit_code": 0 }, { "command": "git ls-files '*.go' | xargs gofmt -l (pinned go-1.23.8)", "exit_code": 0 }, { "command": "pre-push gate: nix develop .#go-ci Go seam (gofmt + go test)", "exit_code": 0 } ], "criteria": { "internal/kanidm/fakekanidm_test.go is gofmt-clean": "gofmt -w applied in 01ce3c55; gofmt -l now returns empty for the file and for all tracked *.go", "ci (seam) Go: gofmt (tabs) stage is no longer red": "pre-push gate ran the pinned go-1.23.8 Go seam (gofmt + go test) and passed before push landed 01ce3c55 on origin/main" }, "summary": "Re-aligned the fakeKanidm field block that #636 left un-gofmt'd, clearing the ci (seam) gofmt debt.", "reason": "", "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#637
No description provided.