ci(agent): gate Go vet + lint, race the full agent tree#2512
Merged
Conversation
Deploying breeze with
|
| Latest commit: |
a24dd58
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1502973b.breeze-9te.pages.dev |
| Branch Preview URL: | https://toddhebebrand-ci-agent-lint.breeze-9te.pages.dev |
ToddHebebrand
force-pushed
the
ToddHebebrand/ci-agent-lint-race
branch
4 times, most recently
from
July 16, 2026 04:55
1690a97 to
47a4195
Compare
The `lint` job is JS/TS + compose guards only — the Go agent was never vet/lint-gated in CI (golangci-lint lived only in agent/Makefile), and `test-agent` runs CGO-off so the race detector never ran on the broad tree. - lint-agent: `go vet ./...` (hard gate; tree is already vet-clean) + golangci-lint in new-issues-only mode (--new-from-rev) so the pre-existing backlog (incl. ~20 unformatted files) does not block PRs. - test-agent-race: `go test -race ./...` across the whole linux-buildable agent tree (~80s) so new concurrency-heavy packages are covered without a hand-maintained list. - agent/.golangci.yml: golangci-lint v2 config (standard linters + gofmt). Verified locally: go vet clean, go test -race ./... green (81s), golangci-lint --new-from-rev=origin/main = 0 issues, actionlint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Both new jobs turned CGO on (vet compiles with it; -race requires it), which pulled in the agent's only cgo files — the linux X11/pcap capture backends (pcap.h, X11/Xlib.h) — whose C headers aren't on the runner. The repo only cgo-builds the agent on darwin (build-agent), never linux. - lint-agent: run vet + golangci CGO-off (matches test-agent). vet/lint cover the CGO-off build; the cgo backends are compiled by build-agent. - test-agent-race: -race needs CGO, so run on macos-latest — the repo's only cgo agent build path — reproducing the green local run. Concurrency logic is platform-independent. Adds CGO_LDFLAGS_ALLOW to match build-agent's darwin. Verified: CGO=0 vet clean, CGO=0 golangci --new-from-rev = 0 issues, CGO=1 go test -race ./... green locally (darwin, 81s), actionlint clean.
ToddHebebrand
force-pushed
the
ToddHebebrand/ci-agent-lint-race
branch
from
July 16, 2026 05:12
47a4195 to
a24dd58
Compare
ToddHebebrand
pushed a commit
that referenced
this pull request
Jul 17, 2026
golangci-lint gating (#2512) flags unchecked Close/SetReadDeadline in the new PAM dismissal tests after the rebase onto main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Closes the deterministic-CI gaps for the Go agent that the recent agent work surfaced. Two new jobs + a golangci config — no product code changes.
lint-agentgo vet ./...as an unconditional gate. The tree is already vet-clean, so this is safe today and catches vet regressions going forward.--new-from-rev=origin/<base>). Introduced red-safe: the pre-existing lint backlog (including ~20 unformatted files onmain) does not block PRs; only issues on code a PR actually changes are reported. Burn down the backlog separately.lintjob is JS/TS + compose guards only — the Go agent was never vet/lint-gated in CI (golangci-lint lived only inagent/Makefile).test-agent-racego test -race ./...across the whole linux-buildable agent tree (~80s locally).test-agentruns CGO-off, so the race detector never ran broadly. This covers new concurrency-heavy packages automatically — no hand-maintained package list to drift. Windows-only concurrency stays covered by the agent's Windows race/smoke jobs.agent/.golangci.ymlVerification (local)
go vet ./...→ cleango test -race -count=1 ./...→ green, 81sgolangci-lint config verify→ exit 0golangci-lint run --new-from-rev=origin/main ./...→ 0 issues (red-safe confirmed)actionlint .github/workflows/ci.yml→ clean (the one SC2155 warning it reports is a pre-existing script, not these jobs)Note for reviewer
These jobs are not required checks until added to branch protection. To enforce them as merge gates, add
Lint Agent (Go)andTest Agent (race)to the required status checks.LLM-based review (
/code-review,/pr-review-toolkit:review-pr,/security-review) is intentionally kept local/on-demand, not wired into CI.🤖 Generated with Claude Code