Skip to content

fix(go): make and the pre-push hook run the pinned toolchain - #150

Merged
jayleaton merged 1 commit into
mainfrom
fix/pinned-toolchain
Nov 1, 2026
Merged

jayleaton merged 1 commit into
mainfrom
fix/pinned-toolchain

Conversation

@jayleaton

@jayleaton jayleaton commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Rules. Before merge, run what this change needs on its exact head (docs/CI.md, "What to run"): for Go, make lint test scoped with LINT_DIRS/TEST_PKGS (scripts/affected.sh prints them) or make check-fast, plus the checks of what you touched. Then make ci-local RAN="<what you ran>" posts local-ci and fills "Local verification" with that statement and the head SHA. Never edit that section by hand. The Local verification check, make pr-merge and the staging gate refuse the PR while it is missing, names another head, or differs from what local-ci attested. A new push or rebase needs a new attestation. A reported failure (FAILED=) is final for that head: fix it in a new commit (docs/CI.md, "Local verification").

Problem

With a system Go other than go.mod's (here Go 1.27), make check-fast and the pre-push hook fail TestDecodeNamesJSONTypes on a clean main: Go 1.27 no longer names the field in a type error returned by a field's own UnmarshalJSON (validate.Nullable), so the API answered " must be a string". Every run needed GOTOOLCHAIN exported by hand.

Fix

  • The Makefile and scripts/check-fast.sh set GOTOOLCHAIN to go.mod's version (+auto) unless one is already set, so a local go of another version runs the pinned one.
  • validate.DecodeInto (web and admin) finds the field of such a type error itself, so the message is right on either Go.

Follows #149 (it will be rebased onto main once that merges).

Local verification

Filled by make ci-local, 2026-11-01T13:04:28Z. Never edit this section by hand.

Head 607773cf20c18018991d4581d785a96493471b97 · tree ee116c7ee8ad · passed
Attested by JJ Eaton on Studio-01

Ran: make ci-pg (make ci, make check-migrations, release smoke on a throwaway Postgres 18) and make check-fast, with the system Go 1.27 and no GOTOOLCHAIN set

🤖 Generated with Claude Code

Under a system Go 1.27 the pre-push hook failed TestDecodeNamesJSONTypes
on a clean main, so every run needed GOTOOLCHAIN exported by hand. The
Makefile and scripts/check-fast.sh now set GOTOOLCHAIN to go.mod's
version (+auto) unless one is already set, so a local go of another
version runs the pinned one.

The test was right: Go 1.27 no longer names the field of a type error
that a field's own UnmarshalJSON returns (validate.Nullable), so the
API answered " must be a string". validate.DecodeInto now finds that
field itself, in web and admin, so the message holds on either Go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jayleaton
jayleaton force-pushed the fix/pinned-toolchain branch from 1d94c87 to 607773c Compare November 1, 2026 13:03
@jayleaton
jayleaton merged commit 544ba08 into main Nov 1, 2026
4 checks passed
@jayleaton

Copy link
Copy Markdown
Owner Author

Merged with admin override; review requirement waived by JJ (authorized 2026-11-01)

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