Skip to content

fix(engine): pin go directive to minor (1.26) not patch - #130

Merged
JAORMX merged 2 commits into
mainfrom
fix/engine-go-directive-minor-pin
Jun 21, 2026
Merged

JAORMX merged 2 commits into
mainfrom
fix/engine-go-directive-minor-pin

Conversation

@JAORMX

@JAORMX JAORMX commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

The engine module's go.mod declared a patch-level Go directive go 1.26.4. A library's go directive sets the language version it requires, and the go command raises a consumer's own directive to the highest one in its module graph — so a patch-level directive forces every consumer's go.mod to a patch directive too.

Atrium imports github.com/stacklok/mecatl/engine and has a CI guard that forbids a patch-level go directive (it requires a minor floor, e.g. go 1.26). The patch pin therefore breaks Atrium's build the moment it imports the engine.

The engine uses no Go 1.26.4-specific language feature, so go 1.26 is the correct minimum. This PR drops both the engine and root module go directives to the minor version. No toolchain directive is present; had one been, it could stay patch-pinned — only the go language directive must be minor.

Changes

Verification

  • cd engine && GOWORK=off go build ./... — clean
  • cd engine && GOWORK=off go test ./... — pass (serial -p 1; the one failure seen under the default parallel run, TestParallelPersistsAllBranchesAllJoinModes/first, is a pre-existing order-dependent flake present on main, unrelated to this change)
  • GOWORK=off go mod tidy on the engine leaves go 1.26 untouched — no dependency forces a patch bump (deps are doublestar + x/sync, both minor-pinned)
  • task api:check (go test ./internal/apicheck) — pass; this is not an API-surface change
  • root go build ./... — clean

Once this merges and engine/v0.0.3 is cut, Atrium re-pins to it and its CI go-directive guard passes.

🤖 Generated with Claude Code

JAORMX and others added 2 commits June 21, 2026 04:09
A library's `go` directive declares the language version it requires, and
the go command raises a consumer's own directive to the highest one in its
module graph. A patch-level directive (`go 1.26.4`) therefore forces every
consumer's go.mod to a patch directive too. Atrium imports the engine and
its CI forbids a patch-level `go` directive (it requires a minor floor such
as `go 1.26`), so the patch pin breaks Atrium's build.

The engine uses no Go 1.26.4-specific language feature, so `go 1.26` is the
correct minimum. Apply the same hygiene to the root module's directive. A
`toolchain` directive (none present today) may stay patch-pinned — only the
`go` language directive must be minor.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@JAORMX
JAORMX merged commit 32112ef into main Jun 21, 2026
jhrozek added a commit that referenced this pull request Sep 21, 2026
….0 pin

v0.0.47-v0.0.49 patch-pinned toolhive-core's own go directive to
`go 1.27.0`, which forces every consumer's go.mod to a patch directive too
(the exact hygiene issue mecatl fixed for itself in #130). v0.0.50 restores
the minor `go 1.27` baseline upstream (stacklok/toolhive-core#301), so this
commit moves the previous commit's target from v0.0.47 to v0.0.50 and
reverts every go.mod/go.work directive this repo picked up back to `go 1.27`.

Updates the ADR-0330 dependency-floor guard's pinned toolhive-core version
alongside the bump.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
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