A repo generated from template-go-agent does not pass task check out of the box, even after correct placeholder substitution. Two template-level defects break the baseline:
No go.sum shipped. The template root has go.mod but no go.sum, so go build ./... fails on missing sum entries until someone runs go mod tidy. Verified: the template root currently ships no go.sum file.
Two errcheck lint failures in the template's own code — an unchecked deferred shutdown(ctx) and an unchecked resp.Body.Close(). golangci-lint (v2.x, as configured in CI) fails on both.
Evidence
Surfaced while bootstrapping mathias/parallax (generated from this template). koala Claude had to fix all three items by hand to get a green baseline — see parallax#1 and commit 5dce341 in that repo. Because these are defects in the template source, every repo generated from template-go-agent inherits them.
Desired outcome
A freshly generated repo passes task check immediately after substitution, with no manual fix-ups.
Suggested fixes (technique TBD in this repo)
Commit a go.sum (run go mod tidy and check it in), or add a CI/generation step that guarantees it.
Fix the two errcheck sites: check the errors on the deferred shutdown(ctx) and resp.Body.Close() (e.g. _ = f() if intentionally ignored, or proper handling/logging).
Confirm go build ./... and task check are green on a clean checkout before closing.
Notes
This template is not dispatch-eligible yet, so this is a manual/local task (run on koala), not a dispatch job.
Independent of the gitea-mcp substitution/durability issues (filed separately) — this is purely a template-content fix and can land on its own.
## Problem
A repo generated from `template-go-agent` does **not** pass `task check` out of the box, even after correct placeholder substitution. Two template-level defects break the baseline:
1. **No `go.sum` shipped.** The template root has `go.mod` but no `go.sum`, so `go build ./...` fails on missing sum entries until someone runs `go mod tidy`. Verified: the template root currently ships no `go.sum` file.
2. **Two `errcheck` lint failures in the template's own code** — an unchecked deferred `shutdown(ctx)` and an unchecked `resp.Body.Close()`. `golangci-lint` (v2.x, as configured in CI) fails on both.
## Evidence
Surfaced while bootstrapping `mathias/parallax` (generated from this template). koala Claude had to fix all three items by hand to get a green baseline — see parallax#1 and commit `5dce341` in that repo. Because these are defects in the template *source*, every repo generated from `template-go-agent` inherits them.
## Desired outcome
A freshly generated repo passes `task check` immediately after substitution, with no manual fix-ups.
## Suggested fixes (technique TBD in this repo)
- Commit a `go.sum` (run `go mod tidy` and check it in), or add a CI/generation step that guarantees it.
- Fix the two `errcheck` sites: check the errors on the deferred `shutdown(ctx)` and `resp.Body.Close()` (e.g. `_ = f()` if intentionally ignored, or proper handling/logging).
- Confirm `go build ./...` and `task check` are green on a clean checkout before closing.
## Notes
- This template is **not dispatch-eligible yet**, so this is a manual/local task (run on koala), not a dispatch job.
- Independent of the gitea-mcp substitution/durability issues (filed separately) — this is purely a template-content fix and can land on its own.
Fixed in 2b3851a (v0.1.0), verified 2026-09-17 — same commit as #1, which is the same defect seen from a second bootstrap. Full write-up is on #1; this records what is specific to this issue.
Two of the three defects listed here were already fixed, and this issue did not know.
Listed here
State on 2026-09-17
No go.sum shipped
already present — go build ./... exits 0 on a clean checkout
Verified before touching anything, rather than trusted from the issue text. Working from the description would have meant "fixing" a go.sum that exists and a Close() already wrapped, then reporting three fixes where there was one.
Why it survived two independent reports
Both this issue and #1 correctly identified the symptom and neither could explain why the template itself stayed green. The answer is that Go skips directories whose names start with an underscore when expanding ./..., so cmd/__PROJECT_NAME__ was never analysed here — while in mathias/parallax and mathias/brain-gardener, where the directory has a real name, it was.
Two reporters, two repos, same invisible cause. That is the signature of a defect in the transformation rather than in either artifact.
What stops the recurrence
scripts/tests/generated-child_test.sh in task check now substitutes the tracked tree into a throwaway child and gates go list / build / vet / golangci-lint on the result. Your closing line asked to "confirm go build ./... and task check are green on a clean checkout before closing" — that is now a gate rather than a one-time confirmation, and it caught the entrypoint invisibility as its first assertion.
Confirmed running in CI (run 7509), not merely present: 4 passed, 0 failed.
**Fixed in `2b3851a` (v0.1.0), verified 2026-09-17** — same commit as #1, which is the same defect seen from a second bootstrap. Full write-up is on #1; this records what is specific to this issue.
**Two of the three defects listed here were already fixed, and this issue did not know.**
| Listed here | State on 2026-09-17 |
|---|---|
| No `go.sum` shipped | **already present** — `go build ./...` exits 0 on a clean checkout |
| `resp.Body.Close()` unchecked | **already wrapped** — `pkg/litellm/model.go:115` reads `defer func() { _ = resp.Body.Close() }()` |
| deferred `shutdown(ctx)` unchecked | **still live** — this is what `2b3851a` fixes |
Verified before touching anything, rather than trusted from the issue text. Working from the description would have meant "fixing" a `go.sum` that exists and a `Close()` already wrapped, then reporting three fixes where there was one.
## Why it survived two independent reports
Both this issue and #1 correctly identified the symptom and neither could explain why the template itself stayed green. The answer is that **Go skips directories whose names start with an underscore** when expanding `./...`, so `cmd/__PROJECT_NAME__` was never analysed here — while in `mathias/parallax` and `mathias/brain-gardener`, where the directory has a real name, it was.
Two reporters, two repos, same invisible cause. That is the signature of a defect in the *transformation* rather than in either artifact.
## What stops the recurrence
`scripts/tests/generated-child_test.sh` in `task check` now substitutes the tracked tree into a throwaway child and gates `go list` / `build` / `vet` / `golangci-lint` on the result. Your closing line asked to *"confirm `go build ./...` and `task check` are green on a clean checkout before closing"* — that is now a gate rather than a one-time confirmation, and it caught the entrypoint invisibility as its first assertion.
Confirmed running in CI (run 7509), not merely present: `4 passed, 0 failed`.
---
_Created via git-mcp on behalf of @mathias_
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
A repo generated from
template-go-agentdoes not passtask checkout of the box, even after correct placeholder substitution. Two template-level defects break the baseline:go.sumshipped. The template root hasgo.modbut nogo.sum, sogo build ./...fails on missing sum entries until someone runsgo mod tidy. Verified: the template root currently ships nogo.sumfile.errchecklint failures in the template's own code — an unchecked deferredshutdown(ctx)and an uncheckedresp.Body.Close().golangci-lint(v2.x, as configured in CI) fails on both.Evidence
Surfaced while bootstrapping
mathias/parallax(generated from this template). koala Claude had to fix all three items by hand to get a green baseline — see parallax#1 and commit5dce341in that repo. Because these are defects in the template source, every repo generated fromtemplate-go-agentinherits them.Desired outcome
A freshly generated repo passes
task checkimmediately after substitution, with no manual fix-ups.Suggested fixes (technique TBD in this repo)
go.sum(rungo mod tidyand check it in), or add a CI/generation step that guarantees it.errchecksites: check the errors on the deferredshutdown(ctx)andresp.Body.Close()(e.g._ = f()if intentionally ignored, or proper handling/logging).go build ./...andtask checkare green on a clean checkout before closing.Notes
Fixed in
2b3851a(v0.1.0), verified 2026-09-17 — same commit as #1, which is the same defect seen from a second bootstrap. Full write-up is on #1; this records what is specific to this issue.Two of the three defects listed here were already fixed, and this issue did not know.
go.sumshippedgo build ./...exits 0 on a clean checkoutresp.Body.Close()uncheckedpkg/litellm/model.go:115readsdefer func() { _ = resp.Body.Close() }()shutdown(ctx)unchecked2b3851afixesVerified before touching anything, rather than trusted from the issue text. Working from the description would have meant "fixing" a
go.sumthat exists and aClose()already wrapped, then reporting three fixes where there was one.Why it survived two independent reports
Both this issue and #1 correctly identified the symptom and neither could explain why the template itself stayed green. The answer is that Go skips directories whose names start with an underscore when expanding
./..., socmd/__PROJECT_NAME__was never analysed here — while inmathias/parallaxandmathias/brain-gardener, where the directory has a real name, it was.Two reporters, two repos, same invisible cause. That is the signature of a defect in the transformation rather than in either artifact.
What stops the recurrence
scripts/tests/generated-child_test.shintask checknow substitutes the tracked tree into a throwaway child and gatesgo list/build/vet/golangci-linton the result. Your closing line asked to "confirmgo build ./...andtask checkare green on a clean checkout before closing" — that is now a gate rather than a one-time confirmation, and it caught the entrypoint invisibility as its first assertion.Confirmed running in CI (run 7509), not merely present:
4 passed, 0 failed.Created via git-mcp on behalf of @mathias