-
Notifications
You must be signed in to change notification settings - Fork 296
Description
CI Failure Investigation - Run #38479
Summary
lint-go (golangci-lint) failed on run 22569299813 because new helper functions inside pkg/cli/git.go are no longer referenced anywhere in the codebase, so the unused rule aborts the linter.
Failure Details
- Run: 22569299813
- Commit: 54d55e7
- Trigger: push
Root Cause Analysis
golangci-lint flagged three helper functions (pullFromRemote, pushToRemote, and commitAndPushChanges) in pkg/cli/git.go as unused because they are no longer invoked from anywhere. The lint job halts in make lint when the unused rule reports these definitions, so the CI pipeline fails before even verifying any other packages.
Failed Jobs and Errors
lint-go(golangci-lint viamake lint)pkg/cli/git.go:509:6: func pullFromRemote is unused (unused) pkg/cli/git.go:533:6: func pushToRemote is unused (unused) pkg/cli/git.go:546:6: func commitAndPushChanges is unused (unused) 5 issues: * unused: 5 make: *** [Makefile:496: golint] Error 1
Investigation Findings
rgshows no call sites forpullFromRemote,pushToRemote, orcommitAndPushChangesoutsidepkg/cli/git.go, sogolangci-linttreats the definitions as dead code.- The three helpers only call each other (with the orchestrator never invoked), so no references remain, leaving the unused rule with zero hits.
- The lint job stops immediately after
golangci-lint runreports5 issues: unused: 5, thenmakebails before other steps can run. - Reproducing locally with
make lintorgolangci-lint run ./pkg/cli/...produces the same unused errors and exit code, confirming the failure is deterministic.
Recommended Actions
- Remove the unused helper functions (
pullFromRemote,pushToRemote, andcommitAndPushChanges) frompkg/cli/git.gosince nothing references them today. - Rerun
make lint(orgolangci-lint run ./...) to verify thelint-gojob now completes and the pipeline continues to the next stage.
Prevention Strategies
Keep lint-go green by either wiring helper code into a command before committing or deleting it immediately; running golangci-lint locally before large merges will catch unused definitions quickly.
AI Team Self-Improvement
- Prompt: "When a lint-go failure happens on an unused-rule report, search the repo for call sites of the flagged functions and delete the dead helpers if they are unreachable."
- Prompt: "Record the run number and commit alongside lint errors so future agents can quickly determine if this is a recurring unused-code failure."
Historical Context
- Issue #19179 is also tagged with
cookieand trackslint-gofailing, but that report could not inspect the log; this new issue captures the log output and root cause for run 22569299813.
🩺 Diagnosis provided by CI Failure Doctor
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d
- expires on Mar 3, 2026, 9:31 AM UTC