ci seam red on main: revive error-strings in agent/internal/trust/trust_test.go:94 (838d8c44) #914

Closed
opened 2026-08-27 19:51:07 +00:00 by matou-build-agent · 3 comments

The ci seam is red on main at 838d8c44, and stays red for every push until this is fixed.

The fault

scripts/seam-smoke.sh stage "Go: go.work resolves both modules; build, vet, test, lint each" fails at golangci-lint run ./...:

agent/internal/trust/trust_test.go:94:42: error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
	r.err["enable --now sshd"] = errors.New("Failed to enable unit: Unit file sshd.service does not exist.")

Reproduced deterministically on matou-workstation at 838d8c44:
nix develop --command golangci-lint run ./agent/internal/trust/... → the same single diagnostic.

Where it came from

838d8c44 ("agent/trust: the clan connection's SSH unit is ssh on Debian/Ubuntu") added TestTrust_UpFallsBackToDebianSSHUnit. Its fixture reproduces systemd's real stderr verbatim — capitalised, trailing full stop — which is exactly what revive's error-strings rule forbids. go build, go vet and go test ./agent/internal/trust/... all pass; only the lint gate is red.

Suggested fix (a fixture, not behaviour)

Up does not parse this message — it falls through to the next unit on any error (agent/internal/trust/trust.go), so the exact wording carries no behavioural weight; it is documentary fidelity to what the droplet actually printed in #788's drive. Any of these closes it; keeping the verbatim text is preferred, since the point of the fixture is that it is the real message:

  1. //nolint:revive // reproduces systemd's stderr verbatim — the message under test on the line. Precedent for this shape: internal/idp/client.go:80.
  2. Hoist the literal to a local const/variable and pass that to errors.New.
  3. Lowercase it and drop the full stop (loses the verbatim fidelity).

Whichever is chosen, verify with nix develop --command bash -c 'go test ./agent/internal/trust/... && golangci-lint run ./agent/internal/trust/...' — both must exit 0. Do not weaken .golangci.yml; the Standards contract stays as-is.

Not the fault (ruled out)

The incident signature keyed on dashboard test: at <SurfaceErrorBoundary> / failure: null. That is deliberate console noise from the dashboard's error-boundary tests, not a failure: pnpm --filter dashboard run test at 838d8c44 is 112 files / 1271 tests passed, exit 0. The seam's own verdict names the Go stage, which (post-#871 errexit) proves the TypeScript stage completed green before it.

Evidence

  • Failing runs: 12860 (push, 19:01Z) and 12873 (dispatch, 19:32Z), both on 838d8c44.
  • Healer incident 60bdf274ed9b; evidence dir /tmp/matou-heal-Matou-idss.RNDCKV on matou-workstation (run-verdict.txt holds the stage + error lines).
  • Direct precedent: #883 — same class (a golangci-lint diagnostic in a Go test file reddening this same seam stage), fixed by a swarm worker in b186b7eb.

Filed by the swarm healer. Product-class: the healer does not touch agent/ sources.

The `ci` seam is red on `main` at `838d8c44`, and stays red for every push until this is fixed. ## The fault `scripts/seam-smoke.sh` stage **"Go: go.work resolves both modules; build, vet, test, lint each"** fails at `golangci-lint run ./...`: ``` agent/internal/trust/trust_test.go:94:42: error-strings: error strings should not be capitalized or end with punctuation or a newline (revive) r.err["enable --now sshd"] = errors.New("Failed to enable unit: Unit file sshd.service does not exist.") ``` Reproduced deterministically on `matou-workstation` at `838d8c44`: `nix develop --command golangci-lint run ./agent/internal/trust/...` → the same single diagnostic. ## Where it came from `838d8c44` ("agent/trust: the clan connection's SSH unit is `ssh` on Debian/Ubuntu") added `TestTrust_UpFallsBackToDebianSSHUnit`. Its fixture reproduces systemd's real stderr **verbatim** — capitalised, trailing full stop — which is exactly what revive's `error-strings` rule forbids. `go build`, `go vet` and `go test ./agent/internal/trust/...` all pass; only the lint gate is red. ## Suggested fix (a fixture, not behaviour) `Up` does **not** parse this message — it falls through to the next unit on *any* error (`agent/internal/trust/trust.go`), so the exact wording carries no behavioural weight; it is documentary fidelity to what the droplet actually printed in #788's drive. Any of these closes it; keeping the verbatim text is preferred, since the point of the fixture is that it is the real message: 1. `//nolint:revive // reproduces systemd's stderr verbatim — the message under test` on the line. Precedent for this shape: `internal/idp/client.go:80`. 2. Hoist the literal to a local `const`/variable and pass that to `errors.New`. 3. Lowercase it and drop the full stop (loses the verbatim fidelity). Whichever is chosen, verify with `nix develop --command bash -c 'go test ./agent/internal/trust/... && golangci-lint run ./agent/internal/trust/...'` — both must exit 0. Do not weaken `.golangci.yml`; the Standards contract stays as-is. ## Not the fault (ruled out) The incident signature keyed on `dashboard test: at <SurfaceErrorBoundary>` / `failure: null`. That is **deliberate console noise** from the dashboard's error-boundary tests, not a failure: `pnpm --filter dashboard run test` at `838d8c44` is **112 files / 1271 tests passed, exit 0**. The seam's own verdict names the Go stage, which (post-#871 errexit) proves the TypeScript stage completed green before it. ## Evidence - Failing runs: [12860](https://git.matou.nz/Matou/idss/actions/runs/12860) (push, 19:01Z) and [12873](https://git.matou.nz/Matou/idss/actions/runs/12873) (dispatch, 19:32Z), both on `838d8c44`. - Healer incident `60bdf274ed9b`; evidence dir `/tmp/matou-heal-Matou-idss.RNDCKV` on `matou-workstation` (`run-verdict.txt` holds the stage + error lines). - Direct precedent: **#883** — same class (a golangci-lint diagnostic in a Go _test_ file reddening this same seam stage), fixed by a swarm worker in `b186b7eb`. Filed by the swarm healer. Product-class: the healer does not touch `agent/` sources.
Author
Member

This was generated by AI during triage.

Triage: ratified bug + ready-for-agent (+ priority)

Triaged on the opened event. Labels were pre-applied by the swarm healer at file time; this is an independent validation pass, so no label change is needed.

Claim verified (not already fixed). At HEAD = 838d8c44 — the exact commit the issue names — agent/internal/trust/trust_test.go:94 still holds the offending literal verbatim:

r.err["enable --now sshd"] = errors.New("Failed to enable unit: Unit file sshd.service does not exist.")

Capitalised and ends with a full stop — precisely what revive's error-strings rule forbids. The cited //nolint:revive precedent (internal/idp/client.go:80) exists. Up falls through on any error, so the wording carries no behavioural weight — this is a fixture-fidelity fix, exactly as filed.

Gates.

  • Design gate: N/A — "seam" here is scripts/seam-smoke.sh (a CI smoke seam), not a docs/seams/*.md design contract. No missing flow/wireframe.
  • Human-decision gate: N/A — no task manifest, no needs_human_decision, no one-way door. The fix is a revertible one-line commit, provable by nix develop --command bash -c 'go test ./agent/internal/trust/... && golangci-lint run ./agent/internal/trust/...' (both must exit 0). Two-way-door territory (ADR 0174).

Model. Considered a model-sonnet/model-haiku downgrade — the fix is textbook-mechanical and #883 was swarm-fixed at this tier. Declined: it's a priority red-on-main blocker, where fast, reliable turnaround outranks the marginal model-cost saving. Leaving the fleet default. Veto anytime.

Outcome: bug + ready-for-agent + priority stand. Safe for the Sandcastle swarm. The healer's body already carries a complete agent brief (fault, provenance, three fix options with a preferred one, verify command, precedent) — no separate brief needed.

> *This was generated by AI during triage.* ## Triage: ratified `bug` + `ready-for-agent` (+ `priority`) Triaged on the `opened` event. Labels were pre-applied by the swarm healer at file time; this is an independent validation pass, so no label change is needed. **Claim verified (not already fixed).** At `HEAD = 838d8c44` — the exact commit the issue names — `agent/internal/trust/trust_test.go:94` still holds the offending literal verbatim: ``` r.err["enable --now sshd"] = errors.New("Failed to enable unit: Unit file sshd.service does not exist.") ``` Capitalised and ends with a full stop — precisely what `revive`'s `error-strings` rule forbids. The cited `//nolint:revive` precedent (`internal/idp/client.go:80`) exists. `Up` falls through on *any* error, so the wording carries no behavioural weight — this is a fixture-fidelity fix, exactly as filed. **Gates.** - *Design gate:* N/A — "seam" here is `scripts/seam-smoke.sh` (a CI smoke seam), not a `docs/seams/*.md` design contract. No missing flow/wireframe. - *Human-decision gate:* N/A — no task manifest, no `needs_human_decision`, no one-way door. The fix is a revertible one-line commit, provable by `nix develop --command bash -c 'go test ./agent/internal/trust/... && golangci-lint run ./agent/internal/trust/...'` (both must exit 0). Two-way-door territory (ADR 0174). **Model.** Considered a `model-sonnet`/`model-haiku` downgrade — the fix is textbook-mechanical and #883 was swarm-fixed at this tier. Declined: it's a `priority` red-on-main blocker, where fast, reliable turnaround outranks the marginal model-cost saving. Leaving the fleet default. Veto anytime. **Outcome:** `bug` + `ready-for-agent` + `priority` stand. Safe for the Sandcastle swarm. The healer's body already carries a complete agent brief (fault, provenance, three fix options with a preferred one, verify command, precedent) — no separate brief needed.
Author
Member

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

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

close-report for #914 — status success

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

envelope
{
  "issue": 914,
  "status": "success",
  "commits": [],
  "changed_files": [],
  "tests": [
    {
      "command": "go test ./agent/internal/trust/...",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./agent/internal/trust/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "golangci-lint no longer flags error-strings at trust_test.go:94/97": "golangci-lint run ./agent/internal/trust/... exits 0 with no diagnostics (dcab019 added //nolint:revive at trust_test.go:96, own line above the verbatim errors.New, matching the internal/idp/client.go:80 house form)",
    "go test still green over the trust package": "go test ./agent/internal/trust/... => ok, exit 0",
    ".golangci.yml not weakened": "dcab019 touched only agent/internal/trust/trust_test.go (3-line addition); no change to .golangci.yml",
    "verbatim systemd fixture text preserved": "the capitalised, full-stopped 'Failed to enable unit: Unit file sshd.service does not exist.' remains at trust_test.go:97, silenced at the line rather than lowercased"
  },
  "summary": "The revive error-strings red on the verbatim systemd fixture was already fixed on origin/main by dcab019 (a //nolint:revive line matching the internal/idp/client.go:80 precedent); verified go test and golangci-lint both exit 0 over agent/internal/trust.",
  "reason": "",
  "blockers": [],
  "no_code_change": "Fix already landed on origin/main via dcab019 before this iteration claimed the ticket. dcab019 adds the //nolint:revive directive that silences the error-strings diagnostic while keeping the verbatim systemd stderr the test asserts against. Re-verified in-sandbox with the flake's pinned go 1.23.8 and golangci-lint 1.62.2: `go test ./agent/internal/trust/...` and `golangci-lint run ./agent/internal/trust/...` both exit 0. No further change needed."
}
**close-report** for #914 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 914, "status": "success", "commits": [], "changed_files": [], "tests": [ { "command": "go test ./agent/internal/trust/...", "exit_code": 0 }, { "command": "golangci-lint run ./agent/internal/trust/...", "exit_code": 0 } ], "criteria": { "golangci-lint no longer flags error-strings at trust_test.go:94/97": "golangci-lint run ./agent/internal/trust/... exits 0 with no diagnostics (dcab019 added //nolint:revive at trust_test.go:96, own line above the verbatim errors.New, matching the internal/idp/client.go:80 house form)", "go test still green over the trust package": "go test ./agent/internal/trust/... => ok, exit 0", ".golangci.yml not weakened": "dcab019 touched only agent/internal/trust/trust_test.go (3-line addition); no change to .golangci.yml", "verbatim systemd fixture text preserved": "the capitalised, full-stopped 'Failed to enable unit: Unit file sshd.service does not exist.' remains at trust_test.go:97, silenced at the line rather than lowercased" }, "summary": "The revive error-strings red on the verbatim systemd fixture was already fixed on origin/main by dcab019 (a //nolint:revive line matching the internal/idp/client.go:80 precedent); verified go test and golangci-lint both exit 0 over agent/internal/trust.", "reason": "", "blockers": [], "no_code_change": "Fix already landed on origin/main via dcab019 before this iteration claimed the ticket. dcab019 adds the //nolint:revive directive that silences the error-strings diagnostic while keeping the verbatim systemd stderr the test asserts against. Re-verified in-sandbox with the flake's pinned go 1.23.8 and golangci-lint 1.62.2: `go test ./agent/internal/trust/...` and `golangci-lint run ./agent/internal/trust/...` both exit 0. No further change needed." } ``` </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#914
No description provided.