ci: drop redundant Go module cache step - #194
Conversation
actions/setup-go@v5 caches ~/go/pkg/mod and ~/.cache/go-build by default, keyed on go.sum. The separate actions/cache step restored the same two paths afterwards, so tar hit an already-populated directory and failed per file: ##[error]/usr/bin/tar: .../x/term@v0.45.0/term.go: Cannot open: File exists The step still reported success, so CI stayed green while emitting roughly 12,000 red error annotations per run — enough noise that a passing run looks broken and real errors stop being read. The restore never took effect anyway, so nothing that currently works is lost; the ~11s spent on the failed restore and its save goes away with it. ci.yml and release.yml already rely on setup-go alone and are unchanged.
QualityMax ReviewVerdict: COMMENT · Confidence: evidence-backed scan Files eligible: 1 · Files reviewed: 1 · Files with findings: 1 · Findings: 1 · Inline cards: 1 Priority findings
Review gates
Important files
Review lifecycleUse the inline cards to inspect evidence and suggested remediation. Re-run the QualityMax review after pushing a fix; unchanged cards are identified by their stable finding marker. Dismiss with a reason through the existing QualityMax/GitHub review feedback flow. 0 prior card(s) are stale/resolved on this head. Proof legend: VERIFIED independently judged patch · REPRODUCED verified finding · GROUNDED deterministic evidence · MODEL-ONLY model judgment. QualityMax project results are available in the configured project. Receipt · commit |
|
| @@ -33,16 +33,6 @@ jobs: | |||
| go-version-file: go.mod | |||
There was a problem hiding this comment.
P3 ·
logic· MODEL-ONLY
Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs.
Evidence: .github/workflows/qamax-go.yml:33
Impact / next step: If the cache was causing issues, consider debugging the cache key or path rather than removing it entirely. If removal is intentional, ensure the team is aware of the resulting increase in CI execution time.
Detailed reasoning
- Root cause: Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs.
- Threat model: Review callers that can reach
.github/workflows/qamax-go.yml:33. - Existing protection: Reported by llm; confidence: high.
- Alternatives considered: Preserve the current interface; prefer the smallest safe change.
- Severity calibration: P3 based on the scanner severity.
Prompt to fix with AI
Fix this logic finding in .github/workflows/qamax-go.yml:33. Evidence: Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs. Requested outcome: If the cache was causing issues, consider debugging the cache key or path rather than removing it entirely. If removal is intentional, ensure the team is aware of the resulting increase in CI execution time.. Preserve existing behavior and add focused coverage.
QualityMax · proof: MODEL-ONLY · served model: gemini-3.1-flash-lite · requested: gemini-3.1-flash-lite
|
| Gate | Result |
|---|---|
| 🔍 AI diff review | gemini-3.1-flash-lite · completed · 1 eligible / 1 reviewed · gemini-3.1-flash-lite |
| 🔍 SAST | completed · 1 eligible / 1 reviewed |
| 🔍 Canonical PR review delivery | completed · 0 eligible / 0 reviewed · exact-head review #5141926449 and overview #5585451166 confirmed |
| 🧪 Repo Tests | ✅ 794/794 passed (go) |
Powered by QualityMax — AI-Powered Test Automation
Problem
Every
QualityMax Go Testsrun emits roughly 12,000 red##[error]annotations from a step that succeeds:actions/setup-go@v5caches~/go/pkg/modand~/.cache/go-buildby default, keyed ongo.sum. Theactions/cache@v4step immediately after it restored the same two paths, sotarhit an already-populated directory and refused to overwrite — one error line per file.Why it's worth fixing
Not for speed. The wasted time is ~11s per run (6s failed restore + 5s save), which on its own wouldn't justify a PR.
It's about signal. A green run covered in red errors is how a team learns to stop reading CI output — this exact confusion is what prompted the change. The failing restore also meant the manual cache was never actually doing anything.
The change
Delete the redundant
Cache Go modulesblock.setup-gokeeps caching both paths, keyed offgo.sumviago-version-file, so caching behaviour is preserved. Nothing that currently works is lost, because the manual restore was already failing.ci.ymlandrelease.ymlalready usesetup-goalone and are unchanged.Verification
YAML parses; remaining steps are
Checkout code→Set up Go→Download modules→Run tests→Report results to QualityMax→Upload test artifacts.The real check is this PR's own run: it should stay green and produce zero
Cannot open: File existsannotations. Worth confirming that before merge, since the workflow only exercises itself on a PR.Pre-existing issue, unrelated to any recent feature work — the v1.33.0 merge run (
53bee916) has 12,228 of these same errors.