Conversation
- Replace strings.HasPrefix + TrimPrefix with strings.CutPrefix - Remove unnecessary loop variable captures (fixed in Go 1.22+) - Fix struct field alignment formatting Generated with Claude Code: https://claude.com/claude-code Signed-off-by: Andres Tobon <andrest2455@gmail.com>
- Update actions/checkout to v6.0.2 (de0fac2e4500dabe0009e67214ff5f5447ce83dd) - Update actions/setup-go to v6.2.0 (7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5) Changes include: - Git user-agent improvements with orchestration ID - Fixed tag handling for checkout - Node.js updates and @actions/cache v5 upgrade for setup-go 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Andres Tobon <andrest2455@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to modernize the codebase for Go 1.26 (though go.mod indicates 1.25.4) and update GitHub Actions workflows to newer versions. However, the PR contains critical bugs in the Go modernization changes that will cause data corruption.
Changes:
- Replace
strings.HasPrefix+strings.TrimPrefixpattern withstrings.CutPrefixin error handling - Remove loop variable captures in concurrent code paths
- Update GitHub Actions versions (checkout, setup-go, cosign, docker-login, megalinter, ko-build)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
internal/infrastructure/idmapper/nats_mapper.go |
Correctly modernizes error message parsing using strings.CutPrefix |
internal/service/survey_service.go |
Critical bugs: Incorrectly removes loop variable captures for deferred closures in three mapping functions; also includes formatting alignment fixes |
pkg/concurrent/workerpool.go |
Correctly removes loop variable capture for immediately-launched goroutines |
.github/workflows/survey-api-build.yaml |
Updates actions/checkout to v6.0.2 and actions/setup-go to v6.2.0 with commit hashes |
.github/workflows/mega-linter.yaml |
Updates actions/checkout to v6.0.2 and megalinter to v9.3.0 |
.github/workflows/ko-build-tag.yaml |
Updates actions/checkout to v6.0.2, actions/setup-go to v6.2.0, ko-build to v0.9, cosign to v3.0.3, and docker-login to v3.7.0 |
.github/workflows/ko-build-main.yaml |
Updates actions/checkout to v6.0.2, actions/setup-go to v6.2.0, and ko-build to v0.9 |
.github/workflows/ko-build-branch.yaml |
Updates actions/checkout to v6.0.2, actions/setup-go to v6.2.0 (ko-build already at v0.9) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jordane
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR applies Go 1.26 code modernizations and updates GitHub Actions workflows to latest stable versions.
Ticket
LFXV2-1087
Changes
Go 1.26 Modernization
Applied
go fix ./...to modernize code patterns identified by Go 1.26:strings.HasPrefix+strings.TrimPrefixpattern withstrings.CutPrefixFiles Modified:
internal/infrastructure/idmapper/nats_mapper.go- Usestrings.CutPrefixfor error message parsinginternal/service/survey_service.go- Remove loop variable capturespkg/concurrent/workerpool.go- Remove loop variable capturesGitHub Actions Updates
Updated all workflow files to use latest stable versions with security-pinned commit hashes:
Updates:
actions/checkout: v6.0.0 → v6.0.2 (commit:de0fac2e4500dabe0009e67214ff5f5447ce83dd)actions/setup-go: v6.0.0 → v6.2.0 (commit:7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5)Files Modified:
.github/workflows/ko-build-branch.yaml.github/workflows/ko-build-main.yaml.github/workflows/ko-build-tag.yaml.github/workflows/mega-linter.yaml.github/workflows/survey-api-build.yamlNew Features in Updated Actions: