Skip to content

fix(rest): pin the toolchain that generates the embedded spec - #4

Merged
m4schini merged 1 commit into
mainfrom
fix/pin-generate-toolchain
Sep 29, 2026
Merged

m4schini merged 1 commit into
mainfrom
fix/pin-generate-toolchain

Conversation

@m4schini

Copy link
Copy Markdown
Owner

oapi-codegen embeds the OpenAPI spec as a base64'd compress/flate stream, so the bytes of ports/rest/v1/gen.go depend on the stdlib's deflate implementation. Regenerating on a newer Go than CI's produces a byte-different file, and the quality workflow's generated-code drift gate fails on a commit that changed nothing but the spec.

Pin GOTOOLCHAIN for the generate recipes to the toolchain go.mod already names -- the same one setup-go installs -- so make generate is reproducible regardless of the Go on the developer's PATH, and regenerate gen.go under that pin. Only the embedded blob changes.

Assisted-by: Claude:claude-opus-5

oapi-codegen embeds the OpenAPI spec as a base64'd compress/flate stream,
so the bytes of ports/rest/v1/gen.go depend on the stdlib's deflate
implementation. Regenerating on a newer Go than CI's produces a
byte-different file, and the quality workflow's generated-code drift gate
fails on a commit that changed nothing but the spec.

Pin GOTOOLCHAIN for the generate recipes to the toolchain go.mod already
names -- the same one setup-go installs -- so `make generate` is
reproducible regardless of the Go on the developer's PATH, and regenerate
gen.go under that pin. Only the embedded blob changes.

Assisted-by: Claude:claude-opus-5
@m4schini
m4schini merged commit 87c2fcc into main Sep 29, 2026
12 checks passed
@m4schini
m4schini deleted the fix/pin-generate-toolchain branch September 29, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant