Skip to content

ci: drop redundant Go module cache step - #194

Merged
Desperado merged 1 commit into
mainfrom
fix/ci-redundant-go-cache
Sep 8, 2026
Merged

ci: drop redundant Go module cache step#194
Desperado merged 1 commit into
mainfrom
fix/ci-redundant-go-cache

Conversation

@Desperado

Copy link
Copy Markdown
Contributor

Problem

Every QualityMax Go Tests run emits roughly 12,000 red ##[error] annotations from a step that succeeds:

##[error]/usr/bin/tar: .../x/term@v0.45.0/term.go: Cannot open: File exists
##[error]/usr/bin/tar: .../x/text@v0.16.0/encoding/japanese/iso2022jp.go: Cannot open: File exists
...

actions/setup-go@v5 caches ~/go/pkg/mod and ~/.cache/go-build by default, keyed on go.sum. The actions/cache@v4 step immediately after it restored the same two paths, so tar hit 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 modules block. setup-go keeps caching both paths, keyed off go.sum via go-version-file, so caching behaviour is preserved. Nothing that currently works is lost, because the manual restore was already failing.

ci.yml and release.yml already use setup-go alone and are unchanged.

Verification

YAML parses; remaining steps are Checkout codeSet up GoDownload modulesRun testsReport results to QualityMaxUpload test artifacts.

The real check is this PR's own run: it should stay green and produce zero Cannot open: File exists annotations. 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.

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.
@qualitymaxapp

qualitymaxapp Bot commented Sep 8, 2026

Copy link
Copy Markdown

QualityMax Review

Verdict: COMMENT · Confidence: evidence-backed scan

Files eligible: 1 · Files reviewed: 1 · Files with findings: 1 · Findings: 1 · Inline cards: 1

Priority findings

priority location finding
P3 .github/workflows/qamax-go.yml:33 Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs.

Review gates

gate status
AI diff review completed · eligible 1, reviewed 1 · LLM · served gemini-3.1-flash-lite
SAST completed · eligible 1, reviewed 1 · hybrid
Overall review evidence non-blocking findings remain
Inline evidence posted

Important files

file risk note next step
.github/workflows/qamax-go.yml P3 Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs. Inspect the inline card and apply the smallest safe fix.

Review lifecycle

Use 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. @qmax Q&A is tracked separately.

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 9858b1002fde94295ff0a872b21d3165e071bc53 · run 2026-09-08T12:54:14+00:00 · model served gemini-3.1-flash-lite · model requested gemini-3.1-flash-lite · model review recorded — 501 model output tokens · model source not recorded · re-review 2 · proof counts {'MODEL-ONLY': 1}

@qualitymaxapp

qualitymaxapp Bot commented Sep 8, 2026

Copy link
Copy Markdown

⚠️ QualityMax Diff Analysis — WARN

The removal of the Go module cache step will significantly degrade CI performance by forcing a full re-download of dependencies on every workflow execution. While this change is functionally correct and does not introduce security vulnerabilities, it creates a substantial regression in build times and resource consumption for the repository.

🟡 Finding 1: logic

File: .github/workflows/qamax-go.yml:33 | Severity: warning

What: Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs.

Fix: 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.

Fix with your LLM agent
<your-llm-agent> "Fix the logic issue in .github/workflows/qamax-go.yml at line 33: Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs."
Fix all findings with your LLM agent
<your-llm-agent> "Fix all QualityMax review findings in this PR:\n- logic in .github/workflows/qamax-go.yml:33: Removal of the Go module cache step will cause every CI run to re-download all dependencies, increasing build latency and network egress costs."

Analyzed commit 9858b100 with gemini-3.1-flash-lite (1 files, 1951 tokens) | Customize review preferences

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QualityMax Review — canonical overview updated; inline findings are attached to this review.

@@ -33,16 +33,6 @@ jobs:
go-version-file: go.mod

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@qualitymaxapp qualitymaxapp Bot added bug Something isn't working qualitymax:reviewed labels Sep 8, 2026
@qualitymaxapp

qualitymaxapp Bot commented Sep 8, 2026

Copy link
Copy Markdown

⚠️ QualityMax Pipeline

Gate Result
🔍 AI diff review ⚠️ 1 warning(s) · 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

@Desperado
Desperado merged commit 699e4c1 into main Sep 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working qualitymax:reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant