Skip to content

fix(worker): use the always-built test logger in repo stats tests - #448

Merged
M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:fix/worker-test-noai
Nov 9, 2026
Merged

M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:fix/worker-test-noai

Conversation

@orcamedia

Copy link
Copy Markdown
Contributor

make check fails on main at the slim-build vet step:

go vet -tags noai,nomcp ./...
vet: internal/worker/repo_stats_test.go:53:30: undefined: testLog

repo_stats_test.go calls testLog, which lives in ai_analysis_test.go behind //go:build !noai. This switches its six calls to testLogger from regen_queue_test.go, which has no build constraint. Test-only change.

Checked locally: make check passes, and go test -short -race ./internal/worker/ passes with and without -tags noai,nomcp.

CI doesn't seem to run vet-tags or the slim-tag tests, which is how this slipped through. Would you like a follow-up that adds them to CI?

🤖 Generated with Claude Code

repo_stats_test.go called testLog, which is defined in ai_analysis_test.go
behind //go:build !noai, so the worker test package did not compile in slim
builds and `make check` (vet-tags) failed with "undefined: testLog". Use
testLogger from regen_queue_test.go, which has no build constraint.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@M0Rf30
M0Rf30 merged commit 57e344a into openartifact:main Nov 9, 2026
23 checks passed
@M0Rf30

M0Rf30 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks, reproduced with go vet -tags noai,nomcp on main. Yes to the follow-up: slim-tag vet and tests in CI would have caught it.

M0Rf30 pushed a commit that referenced this pull request Nov 9, 2026
The slim builds (-tags noai, nomcp) were only vetted by `make check`, so
code that compiles in the full build but not in a slim one reached main
(#448). Run `make vet-tags` after go vet, and the unit tests with
-tags noai,nomcp after the race run, in the build / vet / test job.

Co-authored-by: Areef <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@orcamedia
orcamedia deleted the fix/worker-test-noai branch November 9, 2026 18:26
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.

2 participants