Skip to content

chore(go): raise module floor to 1.26 + absorb modernize sweep (RIG-3107) - #876

Open
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-managed/rig-3107-go-floor
Open

chore(go): raise module floor to 1.26 + absorb modernize sweep (RIG-3107)#876
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-managed/rig-3107-go-floor

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 2 PRs:

  1. main
  2. "chore(go): raise module floor to 1.26 + absorb modernize sweep (RIG-3107)" (this PR)
  3. feat(fabric): add NATS EventFabric + RunnerFabric seams (RIG-3107) #877

The T3 NATS fabric (RIG-3107) pulls in nats-server/v2 v2.14.6 as a test dependency, which requires a Go 1.26 language floor. This raises the go/go.mod directive 1.25.01.26.0 — within the pin-minus-one floor policy (the toolchain is pinned at 1.26.6 in tools/toolchain/versions/go.nix), and it is split out ahead of the fabric package so the floor bump and the lint fallout it surfaces are reviewable on their own.

Why this is its own PR. Bumping the language floor to 1.26 activates golangci-lint's 1.26-gated modernize/newexpr analyzer module-wide, which flags pre-existing pointer-to-value helper patterns (func ptr(x) { return &x } + call sites) as inlinable to the new new(expr) builtin. Those sites live in packages unrelated to the fabric work (internal/guestd, internal/ingest, internal/runtime, and the //go:build pgtest internal/comms), so folding them into the fabric PR would spread it across lanes. First lane to raise the floor owns the sweep the bump surfaces.

Changes. go.mod floor 1.25.01.26.0 + go.sum for the nats deps the fabric slice adds (nats.go v1.53.1, test-only nats-server/v2 v2.14.6, google/uuid); the shared Go vendorHash in flake.nix and guest-image/default.nix recomputed for the new module set; and the modernize sweep — 21 newexpr findings resolved across four packages: 17 new(...) call-site inlines (11 in guestd/supervisor_test.go, 3 in runtime/microvm_lifecycle_test.go, 1 in ingest/notify_router_test.go, 2 in comms/comms_test.go) and the 4 now-unused helper funcs (uidPtr, strPtr, ptr, and the pgtest-tagged comms ptr) deleted. The constant uidPtr sites become new(uint32(...)) to preserve the uint32 element type.

Transitive dep note. nats-server/v2 v2.14.6 transitively bumps github.com/klauspost/compress 1.18.61.19.2 on a production path (reached via minio-go/v7 object-store code, not test-only); govulncheck is clean at the new version and the full -race suite is green.

Spec-impact: none. Refs RIG-3107

@trunk-io

trunk-io Bot commented Sep 4, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

RIG-3107

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-managed-rig-3107-go.compass-eng-docs.pages.dev

Deployed from compass-managed/rig-3107-go-floor at ef5f83a.

@rigel-mintaka
rigel-mintaka force-pushed the compass-managed/rig-3107-go-floor branch 2 times, most recently from 33c6519 to 65ef824 Compare September 4, 2026 23:41
@rigel-mintaka
rigel-mintaka marked this pull request as ready for review September 4, 2026 23:43
…107)

The T3 NATS fabric (RIG-3107) pulls in `nats-server/v2 v2.14.6` as a test dependency, which requires a Go 1.26 language floor. This raises the `go/go.mod` directive `1.25.0`→`1.26.0` — within the pin-minus-one floor policy (the toolchain is pinned at 1.26.6 in `tools/toolchain/versions/go.nix`), and it is split out ahead of the fabric package so the floor bump and the lint fallout it surfaces are reviewable on their own.

**Why this is its own PR.** Bumping the language floor to 1.26 activates golangci-lint's 1.26-gated `modernize/newexpr` analyzer module-wide, which flags pre-existing pointer-to-value helper patterns (`func ptr(x) { return &x }` + call sites) as inlinable to the new `new(expr)` builtin. Those sites live in packages unrelated to the fabric work (`internal/guestd`, `internal/ingest`, `internal/runtime`, and the `//go:build pgtest` `internal/comms`), so folding them into the fabric PR would spread it across lanes. First lane to raise the floor owns the sweep the bump surfaces.

**Changes.** go.mod floor `1.25.0`→`1.26.0` + go.sum for the nats deps the fabric slice adds (`nats.go v1.53.1`, test-only `nats-server/v2 v2.14.6`, `google/uuid`); the shared Go `vendorHash` in `flake.nix` and `guest-image/default.nix` recomputed for the new module set; and the modernize sweep — 21 `newexpr` findings resolved across four packages: 17 `new(...)` call-site inlines (11 in `guestd/supervisor_test.go`, 3 in `runtime/microvm_lifecycle_test.go`, 1 in `ingest/notify_router_test.go`, 2 in `comms/comms_test.go`) and the 4 now-unused helper funcs (`uidPtr`, `strPtr`, `ptr`, and the pgtest-tagged `comms` `ptr`) deleted. The constant `uidPtr` sites become `new(uint32(...))` to preserve the `uint32` element type.

**Transitive dep note.** `nats-server/v2 v2.14.6` transitively bumps `github.com/klauspost/compress` `1.18.6`→`1.19.2` on a production path (reached via `minio-go/v7` object-store code, not test-only); `govulncheck` is clean at the new version and the full `-race` suite is green.

Spec-impact: none. Refs RIG-3107

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-managed/rig-3107-go-floor branch from 65ef824 to ef5f83a Compare September 5, 2026 15:06
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