ci: actualizar setup-go a v6 (arregla covdata) y restaurar la compilación de pkg/lockdown#9
Merged
Merged
Conversation
The 'Run tests with coverage' step ran 'go test -coverprofile=coverage.out ./...'. Passing packages that have no test files (cmd/..., internal/profiler, pkg/context, pkg/http/mark, script/print-mcp-diff-configs) to a combined -coverprofile triggers 'go tool covdata', which fails with 'go: no such tool covdata' for those packages and fails the whole job. Restrict the coverage run to packages that actually have tests via 'go list', which avoids the covdata invocation while still producing coverage.out.
…ctor safety_coverage_test.go (added in eed328b) targets the pre-refactor lockdown API: it references the newSafetyTestCache helper (removed with safety_test.go), the deleted SetLogger method, and queryRepoAccessInfo's old 4-arg signature. None of these exist after the lockdown rewrite, so pkg/lockdown fails to build on main. lockdown_test.go already covers IsSafeContent and the cache paths, so remove the incompatible file to restore the build.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f35563b1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reverts the go list filter from the previous commit per review feedback: that filter dropped no-test packages (e.g. script/print-mcp-diff-configs, pkg/context) from coverage.out, hiding them instead of reporting 0%. Root cause of the 'go: no such tool covdata' failure is setup-go@v4 not installing Go 1.25 natively, so go falls back to the module toolchain (golang.org/toolchain@...go1.25.0), which omits the covdata tool. Bumping to setup-go@v6 (matching go.yml) installs Go natively — which includes covdata — so 'go test -coverprofile=coverage.out ./...' works across all packages.
israel2606
pushed a commit
that referenced
this pull request
Jun 17, 2026
main's only red check is python-package.yml: a deprecation stub with no jobs, which is an invalid workflow that always reports failure. Remove it. Also remove go-build.yml: it duplicates go.yml (Build and Test Go Project) and runs on Node20-deprecated actions (setup-go@v4, cache@v3). It currently passes but is redundant. The earlier lockdown compile break was already resolved on main (PR #9 removed the obsolete safety_coverage_test.go), so no code change is needed. https://claude.ai/code/session_01W9xh1kJCqtHqBgBAMQikon
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.
Dos arreglos para dejar el job
builden verde.1.
setup-go@v4→@v6(arregla el fallo decovdata)El paso "Run tests with coverage" (
go test -coverprofile=coverage.out ./...) fallaba con:Causa raíz:
setup-go@v4no instala Go 1.25 de forma nativa, así quegocae al module toolchain (golang.org/toolchain@...go1.25.0), que no incluye la herramientacovdata. Al instrumentar la cobertura de los paquetes sin tests, falla.Arreglo: subir a
setup-go@v6(igual quego.yml, que ya pasa). Instala Go 1.25 nativo, que sí traecovdata, de modo que se mantiene el universo./...completo (los paquetes sin tests siguen reportándose como 0%, sin ocultarlos). Verificado: el Go nativo incluyecovdata; el toolchain de módulo no.2.
pkg/lockdownno compilabasafety_coverage_test.go(commiteed328b) usa la API anterior al refactor de lockdown (newSafetyTestCache,SetLogger,queryRepoAccessInfocon firma de 4 args), ya inexistente, por lo quepkg/lockdownno compilaba enmain(rompiendobuild,lintygo.yml). Comolockdown_test.goya cubreIsSafeContenty los caminos de caché, se elimina el archivo incompatible.Verificación local
go test ./...en verde.golangci-lint run ./...(v2.9) sin issues.