Skip to content

Per-repo workflows still take setup-go's default cache on persistent self-hosted runners #333

Backlog

Description

@aitrawog

Category

category:delivery

Type

type:fix

Remedy / files the remedy will touch

In each repository listed in the evidence, give every actions/setup-go step an explicit cache decision: cache: false when the step needs no module cache, otherwise cache: ${{ runner.environment == 'github-hosted' }}. That is the rule #324 applies to the org workflows and enforces there with scripts/setup-go-cache_test.sh. One PR per repository.

Cited design decision or org-rulebook rule (or none)

#324 (root fix); AGENTS.md C5, C6

Classification

Non-blocking — genuinely separable; left unclaimed for a later session to pick up.

Evidence (verified: commands with output, file:line, measurements)

$ gh api -X GET search/code -f q='org:opencharly "actions/setup-go" path:.github/workflows' --jq '.items[]|"(.repository.full_name) (.path)"' | sort -u | grep -v 'opencharly/.github '
opencharly/charly .github/workflows/ci.yml
opencharly/charly .github/workflows/pin-currency.yml
opencharly/charly .github/workflows/release-binary.yml
opencharly/charly-lib .github/workflows/build.yml
opencharly/docs .github/workflows/deploy.yml
opencharly/plugin-containerd .github/workflows/ci.yml
opencharly/plugin-cua .github/workflows/ci.yml
opencharly/plugin-generate-packages .github/workflows/ci.yml
opencharly/plugin-generate-packages .github/workflows/release.yml
opencharly/plugin-generate-podcast .github/workflows/ci.yml
opencharly/plugin-gh .github/workflows/ci.yml
opencharly/plugin-lobster .github/workflows/ci.yml
opencharly/plugin-marketplace .github/workflows/drift-gate.yml
opencharly/plugin-openwebui .github/workflows/ci.yml
opencharly/plugin-pipeline .github/workflows/ci.yml
opencharly/plugin-qdrant .github/workflows/ci.yml
opencharly/plugin-review .github/workflows/ci.yml
opencharly/plugin-review .github/workflows/release.yml
opencharly/plugin-spice .github/workflows/ci.yml
opencharly/plugin-strata .github/workflows/ci.yml
opencharly/plugin-task .github/workflows/ci.yml
opencharly/plugin-tmux .github/workflows/ci.yml
opencharly/plugin-tunnel .github/workflows/ci.yml
opencharly/plugin-udev .github/workflows/ci.yml
opencharly/plugin-unix-group .github/workflows/ci.yml
opencharly/sdk .github/workflows/ci.yml
opencharly/spec .github/workflows/ci.yml

$ gh api "repos/opencharly/charly/actions/caches?per_page=3&sort=size_in_bytes&direction=desc" --jq ...
2968681005 ref=refs/pull/1363/merge setup-go-Linux-x64-undefined-go-1.26.8-376631a1f990175d82385
2744903518 ref=refs/pull/1360/merge setup-go-Linux-x64-undefined-go-1.26.0-272dcab001a3b9899954a
2513740581 ref=refs/heads/main setup-go-Linux-x64-undefined-go-1.26.8-376631a1f990175d82385

Mechanism

On a persistent self-hosted runner GOMODCACHE + GOCACHE survive between jobs. setup-go's default post step tars them whole into a multi-GB cache, which the next run downloads and untars over the live copy. The org workflows are fixed in #324; the per-repo CI and release workflows listed here still take the default.

Missed control

No check covers per-repo workflows. setup-go-cache_test.sh reads only opencharly/.github's own workflows.

Blast radius

27 workflow files in 22 repositories (listed). Each is a source of multi-GB cache entries when it runs on a self-hosted runner. Example: charly's own caches are 2.4-2.8 GB each (evidence).

Root fix

Apply the #324 rule per repository; optionally extend the org's retired-sweep-style reach so a per-repo workflow without a decision is reported.

Spike (its result, or none with the reason)

The mechanism and the rule are proven in #324 (cold offline build of the contract sweep; actionlint types runner.environment; the test fails on the unmodified workflows). The per-repo application is the same one-line change.

Agent: cloud-charly · Claude Code session 4f8404c4-b4fe-44e0-90d2-89db3fe800d5
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

Activity

  1. added
    category:delivery
    type:fix
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:deliverytype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions