Skip to content

Comments

chore: Upgrade to go 1.26#1655

Merged
yottahmd merged 6 commits intomainfrom
go_1_26
Feb 12, 2026
Merged

chore: Upgrade to go 1.26#1655
yottahmd merged 6 commits intomainfrom
go_1_26

Conversation

@yottahmd
Copy link
Collaborator

@yottahmd yottahmd commented Feb 12, 2026

Summary by CodeRabbit

  • Chores
    • Updated Go toolchain from version 1.25 to 1.26 across CI/CD workflows and container builds.
    • Refactored internal pointer allocation patterns for improved code maintainability.

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Updates Go toolchain version from 1.25 to 1.26 across CI, build, and module files. Simultaneously removes custom pointer helper functions (ptrTo, intPtr, boolPtr, ptrString, ptrFloat) and replaces them with Go's built-in new() function across tests and production code.

Changes

Cohort / File(s) Summary
Go Version Upgrades
.github/workflows/ci.yaml, Dockerfile, Dockerfile.alpine, Dockerfile.dev, deploy/docker/Dockerfile.alpine, deploy/docker/Dockerfile.dev, go.mod
Bumps Go toolchain from 1.25 to 1.26 in CI environment, base images, and module declaration.
Test Files - Pointer Helper Refactoring
internal/cmn/eval/eval_test.go, internal/cmn/eval/walk_test.go, internal/core/llm_test.go, internal/core/spec/dag_test.go, internal/intg/ssh_test.go, internal/llm/providers/anthropic/anthropic_test.go, internal/llm/providers/gemini/gemini_test.go, internal/llm/providers/openrouter/openrouter_test.go, internal/runtime/builtin/sql/import_test.go, internal/persis/filedag/store_test.go, internal/service/frontend/api/v1/agent_models_test.go
Removes test helper functions (intPtr, boolPtr, ptrString) and replaces with new(type) for pointer allocation in test fixtures.
Production Code - Pointer Refactoring (Valid)
internal/agent/api.go, internal/agent/read.go, internal/core/spec/dag_test.go, internal/gitsync/service.go, internal/intg/distr/fixtures_test.go, internal/intg/handler_test.go, internal/llm/providers/gemini/gemini.go, internal/llm/providers/openrouter/openrouter.go, internal/persis/filedag/store.go, internal/runtime/builtin/archive/config.go, internal/runtime/builtin/chat/executor.go, internal/runtime/builtin/docker/client.go, internal/runtime/builtin/redis/config_schema.go, internal/runtime/builtin/s3/config.go, internal/runtime/builtin/sql/config.go, internal/runtime/manager.go, internal/runtime/manager_test.go, internal/service/coordinator/handler_test.go, internal/service/frontend/api/v1/services.go, internal/service/frontend/api/v1/transformer.go
Replaces local variable + address-of patterns with new(value) for pointer allocation. Changes like new(true), new(int), new(thinkingBudget + 4096) standardize pointer creation. Most changes preserve semantics, though handler_test.go introduces a pointer-to-pointer behavior change (new(\*m.status)).
⚠️ Problematic Allocations
internal/persis/fileapikey/store.go, internal/persis/filewebhook/store.go
Attempts to use new(time.Now().UTC()) which is invalid Go syntax—function calls cannot be nested inside new(). This will cause compilation errors and requires fixing to use local variables or assignment patterns.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: Upgrade to go 1.26' accurately describes the primary change across the pull request: upgrading the Go toolchain version from 1.25 to 1.26 in CI configuration, Dockerfiles, go.mod, and associated refactoring.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch go_1_26

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
internal/service/frontend/api/v1/services.go (1)

152-169: Inconsistent mix of ptrOf and new in the same function.

Lines 155–158 still use ptrOf(...) while lines 163 and 168 use the new Go 1.26 new(expr). Consider migrating the remaining ptrOf calls to new() for consistency, e.g. PublicUrl: new(info.PublicURL).

♻️ Suggested diff
 	response := api.GetTunnelStatus200JSONResponse{
 		Enabled:   true,
 		Status:    status,
-		PublicUrl: ptrOf(info.PublicURL),
-		Error:     ptrOf(info.Error),
-		Mode:      ptrOf(info.Mode),
-		IsPublic:  ptrOf(info.IsPublic),
+		PublicUrl: new(info.PublicURL),
+		Error:     new(info.Error),
+		Mode:      new(info.Mode),
+		IsPublic:  new(info.IsPublic),
 	}
internal/service/frontend/api/v1/transformer.go (1)

17-23: Consider replacing ptrOf with new() across this file.

Now that Go 1.26's new(expr) is available, the generic ptrOf helper is functionally equivalent to the builtin new(). The remaining ~30 ptrOf calls in this file could be migrated for consistency. This isn't urgent but would reduce reliance on a custom helper.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yottahmd yottahmd merged commit 5394d09 into main Feb 12, 2026
4 checks passed
@yottahmd yottahmd deleted the go_1_26 branch February 12, 2026 13:37
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 70.54264% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.75%. Comparing base (5c7afbb) to head (295ee63).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/runtime/builtin/sql/global_pool.go 0.00% 5 Missing ⚠️
internal/gitsync/service.go 0.00% 4 Missing ⚠️
internal/service/scheduler/scheduler.go 33.33% 0 Missing and 4 partials ⚠️
internal/runtime/builtin/s3/client.go 25.00% 1 Missing and 2 partials ⚠️
internal/service/scheduler/queue_processor.go 25.00% 1 Missing and 2 partials ⚠️
internal/cmd/startall.go 60.00% 2 Missing ⚠️
internal/cmn/collections/deterministic_map.go 75.00% 0 Missing and 2 partials ⚠️
internal/runtime/builtin/chat/executor.go 50.00% 2 Missing ⚠️
internal/runtime/data.go 33.33% 2 Missing ⚠️
internal/agent/read.go 75.00% 1 Missing ⚠️
... and 10 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1655      +/-   ##
==========================================
- Coverage   70.21%   67.75%   -2.46%     
==========================================
  Files         344      344              
  Lines       38315    38292      -23     
==========================================
- Hits        26902    25944     -958     
- Misses       9275     9331      +56     
- Partials     2138     3017     +879     
Files with missing lines Coverage Δ
internal/agent/api.go 69.66% <100.00%> (+0.53%) ⬆️
internal/cmn/backoff/retrypolicy.go 89.28% <100.00%> (-10.72%) ⬇️
internal/cmn/cmdutil/cmd_unix.go 82.35% <ø> (-5.89%) ⬇️
internal/cmn/eval/dollar_escape.go 100.00% <100.00%> (ø)
internal/cmn/fileutil/logutil.go 53.23% <100.00%> (-4.83%) ⬇️
internal/cmn/signal/signal_unix.go 75.00% <ø> (ø)
internal/cmn/stringutil/stringutil.go 90.99% <100.00%> (ø)
internal/core/exec/context.go 70.00% <100.00%> (-21.12%) ⬇️
internal/core/spec/dag.go 61.77% <100.00%> (-23.58%) ⬇️
internal/core/spec/loader.go 79.36% <100.00%> (ø)
... and 42 more

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c7afbb...295ee63. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai bot mentioned this pull request Feb 17, 2026
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