Skip to content

ci: run covblocks as a tool of the bench module - #135

Merged
tannevaled merged 1 commit into
mainfrom
ci/covblocks-as-tool
Nov 29, 2026
Merged

tannevaled merged 1 commit into
mainfrom
ci/covblocks-as-tool

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Why

The coverage step ran go run github.com/go-fleettools/fleettools/cmd/covblocks@v0.27.0. go run pkg@version also loads the deprecation status of the module's latest release, and that verifies the latest go.mod against sum.golang.org. fleettools v0.191.0 was tagged but sum.golang.org answered 404 for it, so the step failed on ubuntu, macOS and Windows, even though coverage was 100.0 % and every test passed. This is run 46234030933, three attempts, and it blocks the SetState fix.

Refs #134

What

  • bench/go.mod gains tool github.com/go-fleettools/fleettools/cmd/covblocks. That module already required fleettools v0.81.0, so the version comes from go.sum, and the library's root go.mod is untouched.
  • .github/workflows/ci.yml now runs (cd bench && go tool covblocks ../cover.out). No latest-release lookup happens.

Checked locally

  • go tool covblocks -q from bench on a ./random/ profile prints 1395 block(s), 2115 statement(s); 0 block(s) uncovered, 0 statement(s) uncovered, exit 0.
  • go mod tidy and go build ./... in bench leave nothing else to change.

🤖 Generated with Claude Code

`go run github.com/go-fleettools/fleettools/cmd/covblocks@v0.27.0` loads
the deprecation status of the module's LATEST release, which verifies
that release's go.mod against sum.golang.org. fleettools v0.191.0 was
tagged but not yet known to the checksum database (404), so the coverage
step failed on every platform although coverage was 100.0 % and every
test passed (run 46234030933, three attempts).

Declare covblocks with a `tool` directive in bench/go.mod, the separate
module that already requires fleettools, and run it with `go tool`: the
version is pinned by go.sum, no latest-release lookup happens, and the
library's own go.mod is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 55fc079 into main Nov 29, 2026
13 checks passed
@tannevaled
tannevaled deleted the ci/covblocks-as-tool branch November 29, 2026 07:15
tannevaled added a commit that referenced this pull request Nov 29, 2026
* ci: run benchstat as a tool of the bench module

wfaudit v0.196.0 (go-run-version) flags the A/B workflow's
`go run golang.org/x/perf/cmd/benchstat@latest`: a versioned go run
loads the deprecation status of the module's newest release from
sum.golang.org, the failure #135 removed from the coverage step. It
also floated with every x/perf commit. Declare benchstat with a `tool`
directive in bench/go.mod, pinned by go.sum, and run it with `go tool`
from bench.

The ci.yml comment from #135 is reworded: wfaudit read its literal
example as a command (reported to the fleettools owner).
`wfaudit --fail .` now reports 0 MEDIUM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci(bench): install Go from bench/go.mod

The first dispatch of the A/B workflow (run 46267040621) failed in
Compare: "go: go.mod requires go >= 1.27.3 (running go 1.27.2;
GOTOOLCHAIN=local)". setup-go read the root go.mod (1.27.2), while
benchstat now runs as a tool of the bench module, whose go line is
1.27.3. Read the version from bench/go.mod; it also builds the root
module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
tannevaled added a commit to go-blas/blas that referenced this pull request Nov 29, 2026
* ci: run covblocks as a tool of the internal/cmd module

`go run github.com/go-fleettools/fleettools/cmd/covblocks@v0.27.0` loads
the deprecation status of the module's LATEST release, which verifies
that release's go.mod against sum.golang.org. fleettools v0.195.0 was
tagged but not yet in the checksum database (404), so the coverage step
failed on ubuntu, macOS and Windows for #15, although every test passed
and coverage was 100.0 % (run 46255384814). go-ndarray hit the same
failure with v0.191.0 and was fixed the same way (go-ndarray/ndarray#135).

Declare covblocks with a `tool` directive in internal/cmd/go.mod, the
tools module that keeps the library's go.mod free of them, and run it
with `go tool`: the version is pinned by go.sum and no latest-release
lookup happens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: run govulncheck as a tool of internal/cmd too

wfaudit v0.196.0 (go-run-version, fleettools#497) flags the remaining
`go run golang.org/x/vuln/cmd/govulncheck@v1.9.0`: the same latest-release
deprecation lookup against sum.golang.org as covblocks. Declare it with
`go get -tool` in internal/cmd/go.mod and run it from the root against
the library with `go tool -modfile=internal/cmd/go.mod govulncheck ./...`.
Locally: "No vulnerabilities found", and `wfaudit --fail .` reports
0 MEDIUM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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