Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .claude/skills/release-go-agent/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,25 @@ SERVICE_GO_PACKAGE_TESTS=required \
go test -race -count=1 -timeout 15m ./pkg/builder -run TestPackageRealCGO
```

#### Known gap: Go 1.27.2 has no goreleaser-cross image

`go.mod` says `go 1.27.2`, but goreleaser-cross has published no 1.27.2 image:
the newest 1.27 tags (ghcr.io and Docker Hub, checked 2026-10-13) are
`v1.27.1-3` / `v1.27.1-3-v2.18.3`, whose build sets `GO_VERSION=1.27.1`. Both
pins therefore stay on older images (`v1.27.1-1` in `releaser.yml`, `v1.27.0`
in `builder.go`). Do not pin a tag that is not published.

- **Release build:** the image sets no `GOTOOLCHAIN`, so Go's default `auto`
downloads go1.27.2 from the module proxy inside the container. v0.0.68 and
v0.0.69 shipped this way. It is not hermetic: a release fails if that
download is blocked.
- **User-service packaging:** `Package` passes `GOTOOLCHAIN=<the version the
source selects>` (`resolvePackageGoToolchain`), so the image's Go is only a
bootstrap. A newer selection is still downloaded inside the container.

When goreleaser-cross publishes a 1.27.2 image, move both pins to it, run the
packaging suite above, and delete this section.

Run it before tagging a release that moved the Go version. Dropping a target
from `.goreleaser.yaml` to make a release pass removes a platform users install
on; fix the toolchain instead.
Expand Down
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ it was seen rather than where it lives.
## Build and test

Derived from `.github/workflows/ci.yml`. The Go version comes from `go.mod`
(1.27.0) — CI reads it with `go-version-file`, so it is never pinned twice.
(1.27.2) — CI reads it with `go-version-file`, so it is never pinned twice.

```bash
go build ./... # CI: Build
Expand Down Expand Up @@ -106,7 +106,9 @@ rather than re-deriving from `go list`.
`.claude/skills/release-go-agent/`.
- **Releases require CGO** — core's source inspection uses real tree-sitter
grammars, so every target is built through the `goreleaser-cross` image, whose
Go version must match `go.mod`. Disabling CGO to make a build pass ships an
Go version must match `go.mod`. **Known gap:** no image ships Go 1.27.2 yet, so
releases build in `v1.27.1-1` and Go downloads 1.27.2 — see
`.claude/skills/release-go-agent/`. Disabling CGO to make a build pass ships an
agent whose parser cannot work.
- **The archive name is a contract with core's downloader**
(`service-{name}_{version}_{os}_{arch}.tar.gz`). Renaming it breaks install,
Expand Down
2 changes: 1 addition & 1 deletion docs/PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cancellation. If the build succeeded and shutdown returns a wrapped
keeps the packaged result. Other shutdown errors remain fatal. When the build
failed, any shutdown error is joined to the build error so both remain visible.

The companion's Docker lifecycle is owned by core. The pinned core v0.17.0 also
The companion's Docker lifecycle is owned by core. The pinned core v0.19.4 also
applies its own ten-second timeout to the removal request; the outer two-minute
context does not override that timeout. A removal timeout can leave a container
behind; this change preserves the artifact and reports its container name, and
Expand Down
58 changes: 29 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/codefly-dev/service-go
go 1.27.2

require (
github.com/codefly-dev/core v0.17.0
github.com/codefly-dev/core v0.19.4
github.com/stretchr/testify v1.12.1
golang.org/x/mod v0.41.0
golang.org/x/tools v0.50.0
google.golang.org/grpc v1.83.2
google.golang.org/grpc v1.84.0
google.golang.org/protobuf v1.36.12
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -39,38 +39,38 @@ require (
github.com/dekobon/tree-sitter-groovy v0.3.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/docker v28.5.2+incompatible // indirect
github.com/docker/go-connections v0.8.1 // indirect
github.com/docker/go-connections v0.8.2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.1 // indirect
github.com/go-git/go-git/v5 v5.19.2 // indirect
github.com/go-git/go-billy/v5 v5.9.2 // indirect
github.com/go-git/go-git/v5 v5.19.3 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-openapi/analysis v1.0.0 // indirect
github.com/go-openapi/errors v0.22.8 // indirect
github.com/go-openapi/errors v0.22.9 // indirect
github.com/go-openapi/jsonpointer v1.0.1 // indirect
github.com/go-openapi/jsonreference v1.0.2 // indirect
github.com/go-openapi/loads v0.25.3 // indirect
github.com/go-openapi/spec v1.0.1 // indirect
github.com/go-openapi/strfmt v0.27.2 // indirect
github.com/go-openapi/swag v0.28.0 // indirect
github.com/go-openapi/swag/cmdutils v0.28.0 // indirect
github.com/go-openapi/swag/conv v0.29.1 // indirect
github.com/go-openapi/swag/fileutils v0.28.0 // indirect
github.com/go-openapi/swag/jsonutils v0.29.1 // indirect
github.com/go-openapi/swag/loading v0.29.1 // indirect
github.com/go-openapi/swag/mangling v0.29.1 // indirect
github.com/go-openapi/swag/netutils v0.28.0 // indirect
github.com/go-openapi/swag/pools v0.29.1 // indirect
github.com/go-openapi/swag/stringutils v0.29.1 // indirect
github.com/go-openapi/swag/typeutils v0.29.1 // indirect
github.com/go-openapi/swag/yamlutils v0.29.1 // indirect
github.com/go-openapi/swag v0.29.2 // indirect
github.com/go-openapi/swag/cmdutils v0.29.2 // indirect
github.com/go-openapi/swag/conv v0.29.2 // indirect
github.com/go-openapi/swag/fileutils v0.29.2 // indirect
github.com/go-openapi/swag/jsonutils v0.29.2 // indirect
github.com/go-openapi/swag/loading v0.29.2 // indirect
github.com/go-openapi/swag/mangling v0.29.2 // indirect
github.com/go-openapi/swag/netutils v0.29.2 // indirect
github.com/go-openapi/swag/pools v0.29.2 // indirect
github.com/go-openapi/swag/stringutils v0.29.2 // indirect
github.com/go-openapi/swag/typeutils v0.29.2 // indirect
github.com/go-openapi/swag/yamlutils v0.29.2 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/gofrs/flock v0.13.1 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
Expand All @@ -82,7 +82,6 @@ require (
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.6.0 // indirect
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
github.com/lufia/plan9stats v0.0.0-20260802145828-341c2f0c90b5 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
Expand All @@ -95,7 +94,7 @@ require (
github.com/oklog/ulid/v2 v2.1.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pjbgf/sha1cd v0.6.0 // indirect
github.com/pjbgf/sha1cd v0.7.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/power-devops/perfstat v0.0.0-20260805114148-88456608a4f6 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 // indirect
Expand All @@ -121,22 +120,23 @@ require (
github.com/yuin/goldmark v1.8.6 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 // indirect
go.opentelemetry.io/otel v1.46.0 // indirect
go.opentelemetry.io/otel/metric v1.46.0 // indirect
go.opentelemetry.io/otel/trace v1.46.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 // indirect
go.opentelemetry.io/otel v1.47.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/crypto v0.57.0 // indirect
golang.org/x/exp v0.0.0-20260820142414-ca536658362e // indirect
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect
golang.org/x/net v0.60.0 // indirect
golang.org/x/sync v0.23.0 // indirect
golang.org/x/sys v0.48.0 // indirect
golang.org/x/sys v0.49.0 // indirect
golang.org/x/term v0.46.0 // indirect
golang.org/x/text v0.42.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect
Expand Down
Loading
Loading