main is red: errcheck refuses the bare defer res.Body.Close() in internal/controlapi/updates_i18n_seam_test.go:47 (from #2129/6caf5c25) #2153
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#2153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
main's seam is red: theGo: go.work resolves both modules; build, vet, test, lint eachstage of
scripts/seam-smoke.shexits 1 on a singleerrcheckfinding — theonly lint finding in the whole run:
Build, vet and the full Go test suite all pass (every
internal/*packageokin the same job log) — this is purely the lint stage, one line.
Where it came from
6caf5c25(sandcastle: #2129 — i18n Go seam) addedinternal/controlapi/updates_i18n_seam_test.go. ItsproblemAthelper closes theresponse body with a bare
defer res.Body.Close(), whicherrcheck(enabled in.golangci.yml) refuses. That commit's own message recordsgo vet + go test ./internal/controlapi/ + gofmt clean—golangci-lintwas not among the checksit ran.
It is the only bare
defer <x>.Body.Close()in the repo. The establishedidiom everywhere else (≈60 sites:
control-plane/cmd/control-plane/*.go,broker/internal/broker/selfprobe_test.go, every*_wiring_test.go) is thediscarded-error form.
The fix
internal/controlapi/updates_i18n_seam_test.go:47— adopt the repo idiom:Then prove the stage green the way CI runs it:
Why
prioritymainis red atf32d6599, so the seam stays red for every commit landing ontop of it until this one line is fixed.
Systemic note (not part of this fix)
The pre-push gate did not catch it because the full Go seam (
gate_go_stage,which runs
golangci-lint run ./...) is sandbox-only by #198; the HOSTreconcile/heal push path runs only the cheap gofmt tier (
gate_gofmt_stage,Gate 3b/#1458), and
defer res.Body.Close()is gofmt-clean.6caf5c25reachedmainover that host path (it was the commit the #1458 gofmt-gate break hadstranded, per
f32d6599), so nogolangci-lintever ran on it beforemain.Closing that gap is a design decision for a human — tracked here only as
context, and in the heal report for run 59608.
Filed by the swarm healer for run
https://git.matou.nz/Matou/idss/actions/runs/59608 (signature
e1fdd105c5b4).Evidence:
run-verdict.txt,job-log.txtin that run's heal bundle.swarm-claim host=bens-mac-04 run=59614
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59320
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=59635
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59328
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=59628
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59338
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=59647
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=59666
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=59647
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=59649
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=59672
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59362
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59376
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=59666
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59385
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=59720
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=59669
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59395
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=59743
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=59693
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=59697
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59402
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=59405
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=59786
(automated multi-host claim — lowest live claim id works this ticket)
⏩ independent reviewer for #2153 — verdict
unauthenticatedreview JSON
close-report for #2153 — status
success✅ close-report gates passed — every claim verified against the pushed worker branch
sandcastle/worker/20261104-063724-1d3519(pre-land — the host promotes it tomainonly after its post-run verify, #193/#283); issue closed.envelope
🚨 Reopened — a push-mode close did NOT land on
main(#283). close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (the promote did not advance main (a no-op push to main)), soorigin/mainnever carried the commits (2a521c4cfc2ee14d712595a3610f0f28049506a4). The gates-passed comment above is therefore NOT true ofmain. Reopening and relabellingready-for-sessionso the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).Close report — already fixed on
mainby #2130 (ADR 0174, two-way)Outcome: resolved, no new commit needed. The exact one-line fix this ticket
specifies already landed on
main; I verified it and proved the lint stagegreen. Nothing left to push.
What landed, and where
Commit
351c29de(sandcastle: #2130 — i18n Go seam: the join device-end code-taxonomy …) changed the offending line ininternal/controlapi/updates_i18n_seam_test.gowith the precise hunk thisticket prescribes:
Its own message records the intent: it "left
defer res.Body.Close()unchecked(from
6caf5c25) … unblocks the shared Go gate." So the concurrent #2130session picked up this stranded line while landing its own slice. Classic
session-runner ticket race — the fix reached
mainbefore this drainer openedthe ticket.
Proof the seam is green
origin/mainis at39c425cf; this checkout's HEAD equals it.Repo-wide check for the bad idiom —
grep -rn 'defer res.Body.Close()' --include='*.go' .— returns no matches. It was the only bare site.The lint stage, run exactly as CI runs it:
(exit 0)
mainis no longer red on this finding.Systemic note (unchanged, not actioned here)
The ticket's own "Systemic note" — the HOST reconcile/heal push path runs only
the cheap gofmt tier (
gate_gofmt_stage, Gate 3b/#1458), so the full Go seam'sgolangci-lint run ./...(gate_go_stage, sandbox-only per #198) never ran on6caf5c25before it reachedmain— remains a human design decision about thehost-path gate and is out of scope for this two-way fix. It is recorded here
and in the heal report for run 59608; no change made to it.
Ruled by agent under ADR 0174 — veto anytime. Two-way door (the fix was a
revertible one-line edit, and it is already in
mainvia #2130; proof is theexisting lint run above). Closing as resolved.