Repository navigation
fix(engine): pin go directive to minor (1.26) not patch - #130
Merged
Merged
Conversation
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]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The engine module's
go.moddeclared a patch-level Go directivego 1.26.4. A library'sgodirective 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'sgo.modto a patch directive too.Atrium imports
github.com/stacklok/mecatl/engineand has a CI guard that forbids a patch-levelgodirective (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.26is the correct minimum. This PR drops both the engine and root modulegodirectives to the minor version. Notoolchaindirective is present; had one been, it could stay patch-pinned — only thegolanguage directive must be minor.Changes
engine/go.mod:go 1.26.4→go 1.26go.mod(root):go 1.26.4→go 1.26(same hygiene)engine/CHANGELOG.md:[Unreleased]→ Hygiene entry (no public-API change, following the Add govulncheck + dependabot to CI (esp. once theenginemodule is published) #118 precedent)Verification
cd engine && GOWORK=off go build ./...— cleancd 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 onmain, unrelated to this change)GOWORK=off go mod tidyon the engine leavesgo 1.26untouched — 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 changego build ./...— cleanOnce this merges and
engine/v0.0.3is cut, Atrium re-pins to it and its CI go-directive guard passes.🤖 Generated with Claude Code