Skip to content

feat: retarget Go standards baseline to Go 1.26 (1.25-compatible)#1

Merged
sebastian-iancu merged 2 commits into
mainfrom
claude/go-1.25-to-1.26-upgrade-51pm3e
Jul 1, 2026
Merged

feat: retarget Go standards baseline to Go 1.26 (1.25-compatible)#1
sebastian-iancu merged 2 commits into
mainfrom
claude/go-1.25-to-1.26-upgrade-51pm3e

Conversation

@sebastian-iancu

Copy link
Copy Markdown
Contributor

Summary

Moves the plugin's Go standards baseline from Go 1.25 to Go 1.26 (minimum 1.26.4), while keeping the guidance effective for 1.25 modules through the existing Since/go.mod version-gating in go-idioms. This satisfies "act effective for modern code (1.26+) while still supporting 1.25."

Grounded in the Go 1.26 release notes and the go fix blog post.

New Go 1.26 material added to the skills:

  • go-idiomsnew(expr) idiom (allocate + initialize a pointer in one step, ideal for optional/JSON pointer fields) as a Since 1.26 row; a note on self-referencing generic type parameters (type Adder[A Adder[A]] interface{ Add(A) A }); and go fix ./... reframed as the canonical, toolchain-native modernizer runner on 1.26.
  • go-testingtesting/cryptotest.SetGlobalRandom for deterministic crypto tests; note that the pre-1.25 GOEXPERIMENT=synctest (synctest.Run) API was removed in Go 1.26.
  • go-concurrency — experimental goroutineleak profile in runtime/pprof as a toolchain-native complement to goleak.

Baseline / tooling updates:

  • Standards baseline moved to Go 1.26 across go-coding, go-linting, go-explain, the go-reviewer agent, and rules/go-context.mdc; go fix ./... framed as the native modernizer runner with golangci-lint --enable-only=modernize retained for CI reproducibility and older toolchains.
  • docs/install.md + README.md — minimum host toolchain raised to Go 1.26.x (1.26.4+); tarball example → go1.26.4; gopls pin → v0.22.x (the gopls line adding Go 1.26 support).
  • Version bumped to 0.3.0 in both manifests; CHANGELOG 0.3.0 section added; AGENTS.md status line updated.

Checklist

  • ./scripts/validate.sh passes (or claude plugin validate . if Python is unavailable)
  • claude plugin validate . passes
  • Skill / command / agent triggering tested locally (see docs/testing.md) — content-only change; not exercised in this environment
  • Cursor install tested locally when manifest, rule, or hook content changed (see docs/install.md) — not exercised in this environment
  • Both manifests kept in sync when metadata changed: .claude-plugin/plugin.json and .cursor-plugin/plugin.json
  • Cursor rule files and the .cursor-plugin/plugin.json path map kept in step with the components that exist
  • Version bumped and CHANGELOG.md updated (if component content changed) — see docs/versioning.md
  • Docs synced (AGENTS.md, README.md, hooks/session-start.sh) when components were added or renamed

🤖 Generated with Claude Code

https://claude.ai/code/session_016DwDkMcyVnq9RqzJK7CHKu


Generated by Claude Code

…ible)

Move the standards baseline from Go 1.25 to Go 1.26 (1.26.4+) while keeping
version-gated guidance valid for 1.25 modules via the existing Since/go.mod
gating in go-idioms.

- go-idioms: add new(expr) idiom (1.26) and self-referencing generics note;
  frame go fix ./... as the canonical modernizer runner on 1.26.
- go-testing: add testing/cryptotest (1.26); note synctest.Run removal in 1.26.
- go-concurrency: add runtime/pprof goroutineleak profile (1.26).
- go-coding, go-linting, go-explain, go-reviewer, rules/go-context.mdc:
  bump baseline to 1.26 and clarify go fix vs golangci-lint modernize.
- docs/install.md, README.md: min toolchain Go 1.26.x (1.26.4+); tarball and
  gopls (v0.22.x) pins updated.
- Bump both manifests to 0.3.0; add CHANGELOG 0.3.0 section; update AGENTS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016DwDkMcyVnq9RqzJK7CHKu

@sebastian-iancu sebastian-iancu left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — LGTM ✅ (merge-ready)

Reviewed with /review + plugin-dev:skill-development + plugin-dev:agent-development. Because this plugin's value is factual grounding in authoritative Go sources, I verified every net-new Go 1.26 claim against the release notes and pkg.go.dev (Go 1.26 shipped Feb 2026, after my training cutoff) rather than trusting memory.

Factual accuracy — all verified

Claim Verification Status
new(expr) allocate+init a pointer Release notes: "the built-in new… now allows its operand to be an expression"; example Age: new(yearsSince(born))
new(expr) auto-fixed by modernize/go fix newexpr analyzer exists in x/tools/.../modernize/newexpr.go, runnable via go fix on 1.26
go fix revamped as the modernizer home Release notes: "now the home of Go's modernizers… builds atop the same analysis framework as go vet"
testing/cryptotest.SetGlobalRandom pkg.go.dev/testing/cryptotest: SetGlobalRandom(t, seed) deterministic source for crypto/rand
experimental goroutineleak profile Release notes: profile named goroutineleak, enabled via GOEXPERIMENT=goroutineleakprofile
synctest.Run removed in 1.26 Go 1.25 notes + tracking issue golang/go#74012 "remove Run in Go 1.26"; 1.26.4 shows only Test+Wait
self-referential generic type params Release notes: exact type Adder[A Adder[A]] example matches
Go 1.26 Feb 2026 / 1.26.4 Jun 2 2026 / gopls v0.22.0 May 15 2026 release timeline consistent

Conventions / parity / hygiene — clean

  • Skill descriptions stay third-person with trigger phrases; go-reviewer keeps tools: (not allowed-tools:).
  • Both manifests → 0.3.0, valid JSON, Cursor path keys intact.
  • SemVer minor bump correct; CHANGELOG follows Keep a Changelog; historical 1.25 entries correctly left untouched.
  • Retarget is complete — every residual 1.25 is intentional; session-start.sh has no stale version string.

Optional polish (non-blocking) — being fixed in a follow-up commit

  1. goroutineleak needs a build flag — go-concurrency says the runtime "ships" the profile, but it only appears with GOEXPERIMENT=goroutineleakprofile at build time. Noting the flag saves a fruitless hunt.
  2. SetGlobalRandom can't run under t.Parallel() — it's process-global and forbidden in parallel tests. go-testing heavily promotes t.Parallel(), so a caveat (and a nod to the seed arg) prevents a footgun.
  3. go-idioms "Over" column slightly broad — the newexpr modernizer targets the ptr[T](v) helper form; the inline tmp := v; &tmp pattern is more a review catch than an auto-fix. Minor precision.

- go-concurrency: note the goroutineleak profile needs
  GOEXPERIMENT=goroutineleakprofile at build time
- go-testing: SetGlobalRandom(t, seed) is process-global — flag that it
  can't run under t.Parallel()
- go-idioms: distinguish the newexpr auto-fixed ptr[T](v) helper from the
  review-catch tmp+&tmp inline form

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sebastian-iancu sebastian-iancu marked this pull request as ready for review July 1, 2026 10:09
@sebastian-iancu

Copy link
Copy Markdown
Contributor Author

✅ Resolved in d0a7c22 — all three review nits addressed:

  • go-concurrency: goroutineleak profile now notes it needs GOEXPERIMENT=goroutineleakprofile at build time.
  • go-testing: SetGlobalRandom(t, seed) now surfaces the seed arg and the process-global caveat (not usable under t.Parallel()).
  • go-idioms: "Over" column now distinguishes the newexpr-auto-fixed ptr[T](v) helper from the review-catch tmp := v; &tmp inline form.

Docs-only prose refinements; ./scripts/validate.sh and claude plugin validate . both pass.

@sebastian-iancu sebastian-iancu merged commit 8d5e1e0 into main Jul 1, 2026
1 check passed
@sebastian-iancu sebastian-iancu deleted the claude/go-1.25-to-1.26-upgrade-51pm3e branch July 1, 2026 10:10
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.

2 participants