From 7284228bec431d50f925deb3880feb9249e92867 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Mon, 31 Aug 2026 23:45:54 +0000 Subject: [PATCH] Upgrade maintained Go baseline to 1.26 --- .woodpecker/release.yml | 4 ++-- .woodpecker/shuffle.yml | 2 +- .woodpecker/verify.yml | 12 ++++++------ docs/development.md | 5 +++++ docs/release.md | 7 +++++++ docs/roadmap/implementation.md | 2 +- go.mod | 2 +- internal/doccheck/doccheck_test.go | 8 ++++---- internal/releasecheck/assets_test.go | 6 +++--- 9 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml index ec88596..4359095 100644 --- a/.woodpecker/release.yml +++ b/.woodpecker/release.yml @@ -3,12 +3,12 @@ when: steps: validate-release: - image: golang:1.25.5 + image: golang:1.26.7 commands: - ./scripts/check-release-candidate.sh "$CI_COMMIT_TAG" build-release-assets: - image: golang:1.25.5 + image: golang:1.26.7 depends_on: - validate-release commands: diff --git a/.woodpecker/shuffle.yml b/.woodpecker/shuffle.yml index 424d15d..31bb686 100644 --- a/.woodpecker/shuffle.yml +++ b/.woodpecker/shuffle.yml @@ -3,6 +3,6 @@ when: steps: shuffled-race-tests: - image: golang:1.25 + image: golang:1.26 commands: - go test -race -shuffle=on -count=3 ./... diff --git a/.woodpecker/verify.yml b/.woodpecker/verify.yml index 6b2592c..e2523cd 100644 --- a/.woodpecker/verify.yml +++ b/.woodpecker/verify.yml @@ -3,37 +3,37 @@ when: steps: tests: - image: golang:1.25 + image: golang:1.26 commands: - go test ./... race-tests: - image: golang:1.25 + image: golang:1.26 depends_on: tests commands: - go test -race ./... static-analysis: - image: golang:1.25 + image: golang:1.26 depends_on: tests commands: - go vet ./... build: - image: golang:1.25 + image: golang:1.26 depends_on: tests commands: - go build ./... documentation-and-examples: - image: golang:1.25 + image: golang:1.26 depends_on: tests commands: - go test ./internal/doccheck - go test ./internal/config -run '^TestExamplesLoadAndValidate$' cross-build: - image: golang:1.25 + image: golang:1.26 depends_on: [race-tests, static-analysis, build, documentation-and-examples] commands: - | diff --git a/docs/development.md b/docs/development.md index 5dbd812..1069693 100644 --- a/docs/development.md +++ b/docs/development.md @@ -10,6 +10,11 @@ polished transcripts and generated artifacts. Start with the [Architecture](policy/architecture.md) for normative system boundaries, and the [Internal Overview](internal/overview.md) for implemented component ownership. +## Go Prerequisite + +Maintained development and verification require Go 1.26. Use the official Go +1.26 toolchain before running repository commands. + ## What To Read | When working on | Read | Why | diff --git a/docs/release.md b/docs/release.md index 0b17f23..f9b0a32 100644 --- a/docs/release.md +++ b/docs/release.md @@ -5,6 +5,13 @@ binary release. The synchronous release boundary is a successful push of one new tag to `origin`; Woodpecker and Gitea publication happen later and do not change that result. +## Go prerequisite + +Release preparation requires the maintained Go 1.26 baseline. Tag CI currently +uses the explicitly pinned `golang:1.26.7` image for candidate validation and +asset construction; that asynchronous work does not change the tag-push +completion boundary. + ## Choose a version and write its note Narratio is past `v1.0.0`. Use an unused stable tag in the exact form diff --git a/docs/roadmap/implementation.md b/docs/roadmap/implementation.md index da29337..dccca35 100644 --- a/docs/roadmap/implementation.md +++ b/docs/roadmap/implementation.md @@ -140,7 +140,7 @@ During every stage: ## Stage 1 — Establish The Go 1.26 Baseline -**Status: Pending** +**Status: Completed** ### Goal diff --git a/go.mod b/go.mod index f460775..2a376a7 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module gitea.maximumdirect.net/eric/narratio -go 1.25.0 +go 1.26.0 require ( github.com/aws/aws-sdk-go-v2/config v1.32.17 diff --git a/internal/doccheck/doccheck_test.go b/internal/doccheck/doccheck_test.go index 3fb6e05..017ecc5 100644 --- a/internal/doccheck/doccheck_test.go +++ b/internal/doccheck/doccheck_test.go @@ -64,15 +64,15 @@ func TestReleaseWorkflowRequiresValidation(t *testing.T) { if !ok { t.Fatal("release workflow must define validate-release") } - if validate.Image != "golang:1.25.5" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) { - t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.25.5", validate) + if validate.Image != "golang:1.26.7" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) { + t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.26.7", validate) } assets, ok := workflow.Steps["build-release-assets"] if !ok { t.Fatal("release workflow must define build-release-assets") } - if assets.Image != "golang:1.25.5" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) { - t.Fatalf("build-release-assets = %#v, want validated golang:1.25.5 asset construction", assets) + if assets.Image != "golang:1.26.7" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) { + t.Fatalf("build-release-assets = %#v, want validated golang:1.26.7 asset construction", assets) } assetCommands := strings.Join(assets.Commands, "\n") if !strings.Contains(assetCommands, `./scripts/build-release-assets.sh "$CI_COMMIT_TAG" "$PWD/dist"`) || strings.Contains(assetCommands, "GOOS=") || strings.Contains(assetCommands, "go build") { diff --git a/internal/releasecheck/assets_test.go b/internal/releasecheck/assets_test.go index 36e4eec..4a36e93 100644 --- a/internal/releasecheck/assets_test.go +++ b/internal/releasecheck/assets_test.go @@ -183,7 +183,7 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) { { name: "wrong module", want: "go.mod must declare module", prepare: func(t *testing.T, fixture *candidateFixture) { - if err := os.WriteFile(filepath.Join(fixture.root, "go.mod"), []byte("module example.invalid/release\n\ngo 1.25.0\n"), 0o644); err != nil { + if err := os.WriteFile(filepath.Join(fixture.root, "go.mod"), []byte("module example.invalid/release\n\ngo 1.26.0\n"), 0o644); err != nil { t.Fatal(err) } }, @@ -192,7 +192,7 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) { name: "tracked workspace", want: "tracked workspace file is not allowed", prepare: func(t *testing.T, fixture *candidateFixture) { path := filepath.Join(fixture.root, "go.work") - if err := os.WriteFile(path, []byte("go 1.25.0\n"), 0o644); err != nil { + if err := os.WriteFile(path, []byte("go 1.26.0\n"), 0o644); err != nil { t.Fatal(err) } fixture.git("add", "go.work") @@ -364,7 +364,7 @@ func newCandidateFixture(t *testing.T) *candidateFixture { set -eu printf '%s build-release-assets %s\n' "${GOWORK:-}" "$1" >> "$NARRATIO_RELEASE_CHECK_LOG" `, 0o755) - writeFixtureFile(t, filepath.Join(root, "go.mod"), "module gitea.maximumdirect.net/eric/narratio\n\ngo 1.25.0\n", 0o644) + writeFixtureFile(t, filepath.Join(root, "go.mod"), "module gitea.maximumdirect.net/eric/narratio\n\ngo 1.26.0\n", 0o644) writeFixtureFile(t, filepath.Join(root, "main.go"), "package narratio\n", 0o644) notePath := filepath.Join(root, "docs", "releases", "v1.2.3.md") writeFixtureFile(t, notePath, "# Narratio v1.2.3\n\n## Summary\n\n## Compatibility\n\n## Upgrade\n\n## Changes\n", 0o644)