ci red on main: revive redefines-builtin-id on real in internal/clan/clan_test.go:426 (48b6f5ca) #1288

Closed
opened 2026-09-07 05:36:21 +00:00 by matou-build-agent · 2 comments

Symptom

CI is red on main. Run 19390 (push, 48b6f5ca), stage Go: go.work resolves both modules; build, vet, test, lint each, exit 1:

internal/clan/clan_test.go:426:2: redefines-builtin-id: redefinition of the built-in function real (revive)

Heal signature 0d75099f6f2f. Every push and scheduled ci run on main stays red until this lands.

Cause

48b6f5ca ("rehearsal healer: pytest's 'Enable tracemalloc…' hint …", the tracemalloc-exemption heal, advances #1277) added a test local named real:

// internal/clan/clan_test.go:426
real := live + "\n[gateway] paperless-ngx> Traceback (most recent call last):"

real is a Go builtin (the real part of a complex), so revive's redefines-builtin-id rejects it. That linter is not new — .golangci.yml has enabled revive since the skeleton (be7efcc3) and has not been touched since, so the rule did not change under the commit; the commit introduced the only violation of it in the tree (grep 'real :=' --include='*.go' returns exactly this one line).

The heal's behaviour is fine — internal/clan/errors.go:399 exempts "tracemalloc to get" line-by-line and the test asserts the right things. Only the identifier is wrong.

Fix

Rename the local to something that is not a builtin — e.g. withTraceback (it is the live excerpt plus a real Traceback (most recent call last): line), and update the three uses in TestClassify_PytestTracemallocHintIsNotMasked. No production change; no assertion change.

Verify with the same stage the seam runs: nix develop -c golangci-lint run ./... plus go test ./internal/clan/....

Precedent

Same class as #914 (ci seam red on main: revive error-strings in agent/internal/trust/trust_test.go:94) — and that exact diagnostic string is already a fixture in scripts/tests/seam-verdict-causative-test.sh:102,129. Agents keep reaching for real as a test-variable name against a linter that forbids it; worth considering a follow-up note in docs/GOTCHAS.md or CODING-STANDARDS so the next one does not repeat it.

Provenance

Filed by the swarm healer, heal run heal-Matou-idss-1788759258-2316029. Product-class (internal/), so the healer did not touch the code per its charter.

## Symptom CI is **red on `main`**. Run [19390](https://git.matou.nz/Matou/idss/actions/runs/19390) (push, `48b6f5ca`), stage `Go: go.work resolves both modules; build, vet, test, lint each`, exit 1: ``` internal/clan/clan_test.go:426:2: redefines-builtin-id: redefinition of the built-in function real (revive) ``` Heal signature `0d75099f6f2f`. Every push and scheduled `ci` run on `main` stays red until this lands. ## Cause `48b6f5ca` (*"rehearsal healer: pytest's 'Enable tracemalloc…' hint …"*, the tracemalloc-exemption heal, advances #1277) added a test local named `real`: ```go // internal/clan/clan_test.go:426 real := live + "\n[gateway] paperless-ngx> Traceback (most recent call last):" ``` `real` is a Go **builtin** (the real part of a complex), so revive's `redefines-builtin-id` rejects it. That linter is not new — `.golangci.yml` has enabled `revive` since the skeleton (`be7efcc3`) and has not been touched since, so the rule did not change under the commit; the commit introduced the only violation of it in the tree (`grep 'real :=' --include='*.go'` returns exactly this one line). The heal's *behaviour* is fine — `internal/clan/errors.go:399` exempts `"tracemalloc to get"` line-by-line and the test asserts the right things. Only the identifier is wrong. ## Fix Rename the local to something that is not a builtin — e.g. `withTraceback` (it is the `live` excerpt plus a real `Traceback (most recent call last):` line), and update the three uses in `TestClassify_PytestTracemallocHintIsNotMasked`. No production change; no assertion change. Verify with the same stage the seam runs: `nix develop -c golangci-lint run ./...` plus `go test ./internal/clan/...`. ## Precedent Same class as **#914** (`ci seam red on main: revive error-strings in agent/internal/trust/trust_test.go:94`) — and that exact diagnostic string is already a fixture in `scripts/tests/seam-verdict-causative-test.sh:102,129`. Agents keep reaching for `real` as a test-variable name against a linter that forbids it; worth considering a follow-up note in `docs/GOTCHAS.md` or CODING-STANDARDS so the next one does not repeat it. ## Provenance Filed by the swarm healer, heal run `heal-Matou-idss-1788759258-2316029`. Product-class (`internal/`), so the healer did not touch the code per its charter.
Author
Member

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

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

close-report for #1288 — status success

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

envelope
{
  "issue": 1288,
  "status": "success",
  "commits": [
    "21db101f"
  ],
  "changed_files": [
    "internal/clan/clan_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "pre-push gate (gofmt/build/vet/test/golangci-lint over ./... and broker)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "revive redefines-builtin-id no longer fires on internal/clan/clan_test.go:426": "renamed local `real` -> `withTraceback`; golangci-lint run ./internal/clan/... exit 0 (commit 21db101f)",
    "behaviour unchanged: pytest tracemalloc hint heal still classifies correctly": "no production change, no assertion change; go test ./internal/clan/... ok (commit 21db101f)"
  },
  "summary": "Renamed test local `real` (a Go builtin) to `withTraceback` in TestClassify_PytestTracemallocHintIsNotMasked, clearing the revive redefines-builtin-id red on main.",
  "blockers": []
}
**close-report** for #1288 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1288, "status": "success", "commits": [ "21db101f" ], "changed_files": [ "internal/clan/clan_test.go" ], "tests": [ { "command": "go test ./internal/clan/...", "exit_code": 0 }, { "command": "golangci-lint run ./internal/clan/...", "exit_code": 0 }, { "command": "pre-push gate (gofmt/build/vet/test/golangci-lint over ./... and broker)", "exit_code": 0 } ], "criteria": { "revive redefines-builtin-id no longer fires on internal/clan/clan_test.go:426": "renamed local `real` -> `withTraceback`; golangci-lint run ./internal/clan/... exit 0 (commit 21db101f)", "behaviour unchanged: pytest tracemalloc hint heal still classifies correctly": "no production change, no assertion change; go test ./internal/clan/... ok (commit 21db101f)" }, "summary": "Renamed test local `real` (a Go builtin) to `withTraceback` in TestClassify_PytestTracemallocHintIsNotMasked, clearing the revive redefines-builtin-id red on main.", "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#1288
No description provided.