Skip to content

[CI Failure Doctor] 🏥 CI Failure Investigation - Run #33424 #13366

@github-actions

Description

@github-actions

Summary

The CI workflow run 33424 fails because the actions/cache go-modules restore step aborts with numerous /usr/bin/tar: ... Cannot open: File exists errors, leaving go test unable to run and the test job to exit with code 1.

Failure Details

Root Cause Analysis

actions/cache is attempting to restore $GOMODCACHE before the test job runs, but /usr/bin/tar immediately fails because the destination already contains the same module files (github.com/charmbracelet/lipgloss, github.com/charmbracelet/x/ansi, etc.). The failure manifests as Failed to restore: "/usr/bin/tar" failed with error: ... exit code 2, which aborts the cache step and causes the subsequent go test invocation to finish with exit code 1.

Failed Jobs and Errors

  • testactions/cache@v3 restore step: repeated Cannot open: File exists errors for files under /home/runner/go/pkg/mod; final warning Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2 and the job ends with Process completed with exit code 1.

Investigation Findings

  1. Cache restore errors occur before any tests start, so module downloads never proceed beyond the failed tar extraction.
  2. The cache contents include files exactly matching what tar tries to create, so restore cannot overwrite the existing tree and aborts.
  3. The failure is deterministic for this run (run 33424) and prevents the Go test suite from executing.

Recommended Actions

  • Clean or recreate the module cache directory before running actions/cache (e.g., rm -rf "$GOMODCACHE" prior to restore or configure the step to extract into an empty directory) so tar can create files without colliding with leftovers.
  • Consider tightening the cache key/paths (e.g., ensure each job uses a unique path or adds a timestamp suffix) to avoid overlapping cache restores running concurrently.
  • Once the cache is cleared, re-run the workflow to verify the cache step succeeds and tests complete.

Prevention Strategies

  • Validate the cache directory is empty before restoring (a preparatory rm -rf or go clean -modcache), ensuring actions/cache never encounters pre-existing module files.
  • Instrument the workflow to log go env GOMODCACHE and the restore target so future investigations can quickly detect directory mismatches.

AI Team Self-Improvement

When a Go workflow fails during caching, immediately check /usr/bin/tar errors; if files already exist, clear $GOMODCACHE or run go clean -modcache before restoring so the cache extraction does not abort.

Historical Context

No previous investigations with the same Cannot open: File exists tar signature have been stored in the current cache.

AI generated by CI Failure Doctor

To add this workflow in your repository, run gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d. See usage guide.

  • expires on Feb 5, 2026, 12:56 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    cookieIssue Monster Loves Cookies!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions