Skip to content

ci(#6675): no cache is saved by a pull request; graph-accuracy seeds its caches nightly - #6676

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
ci/cache-budget
Oct 25, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
ci/cache-budget

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #6675.

Problem

The Actions cache is over GitHub's 10 GB limit: 10.69 GB in 127 entries on 2026-10-25, the oldest last read 10.6 h earlier. Past the limit GitHub evicts the least recently used entries, so caches saved on main survive about half a day. cache-prune.yml trims to ~6 GB nightly (the 2026-10-25 run planned 49 deletes, 10.20 -> 5.96 GB), and PRs refill it past the limit within ~12 h.

The leak is combined actions/cache steps in pull_request workflows. A PR's save is scoped to its own ref, which no other PR can read. #4968 (java-compile) and #5024 (corpora) already fixed this for their caches; 20 steps in 7 workflows were left:

Cache Size Entries saved by PRs
scip-java (graph-accuracy) 2.18 GB 7 of 7: graph-accuracy never ran on main, so there was no shared copy and every PR started cold
db2-odbc-cli (det-sweep, equivalence-e2e) 0.28 GB 9 of 11, same key as main's (re-saved after main's copy was evicted)
setup-go (graph-accuracy) 0.19 GB 7 of 7
cargo-registry (graph-accuracy) 0.07 GB 7 of 7
m2, gnucobol-image, tree-sitter small now whenever a PR changes the key input or main's copy was evicted

Change

  • 20 steps split: each combined step in cics-crucible, det-sweep, equivalence-e2e, graph-accuracy-audit, ports-compile and smoke-test becomes actions/cache/restore (same id, so existing steps.<id>.outputs.cache-hit checks keep working) plus an actions/cache/save at the end of its job. The save runs only when success() && github.event_name != 'pull_request' && cache-hit != 'true', keeps the step's original if, and is continue-on-error, the same shape as Siblings of #4968: per-PR cache saves (mainframe-corpora key) #5024. A partial restore-keys hit still saves on main, as the combined step's post-save did.
  • setup-go: cache: ${{ github.event_name != 'pull_request' }}, since its built-in cache restores and saves in one step (26 MB of modules on a PR).
  • graph-accuracy-audit.yml: gains schedule (nightly, every gate) and workflow_dispatch. This seeds the one shared scip-java / cargo / Go copy on main, and gives the graph gates a main-side signal. Main Watch now watches it.
  • test_cache_keys.py: fails on any combined cache step in a PR workflow, and on any save a PR can reach (!= 'pull_request', or an == pinning schedule / dispatch / push, as det-sweep's durations saves do).

Not changed: the pip keys of smoke-test.yml / mainframe-ground-truth.yml (owner-protected, #4935).

Expected effect

Steady state frees ~2.6 GB of PR-scoped copies (scip-java alone 2.18 GB, collapsing to one main copy of ~0.3 GB), and stops the per-PR re-saves that drive the eviction churn. A PR on graph-accuracy restores scip-java from main instead of starting cold. Measure after merge: gh api repos/squid-protocol/gitgalaxy/actions/cache/usage and the oldest entry's age a day later; that age should go well past 10.6 h.

Verification

  • 342 workflow / cache tests pass (cache keys incl. the 4 new ones, main-watch, draft gate, shard-split pin, critical-path split, tested-tree, workflow inputs, ci_retry, smoke-test concurrency, graph-accuracy plan, post-merge dispatch, db2 image cache). Every workflow file parses. The ruff audit shows no new findings, and format is clean.
  • I reviewed each generated save for placement: it goes at the end of its own job, before the next job's comment block.

Conflicts to expect

🤖 Generated with Claude Code

…its caches nightly on main

The Actions cache was 10.69 GB / 127 entries (limit 10 GB), the oldest last read 10.6 h earlier, so main's caches
were evicted within about half a day. 20 combined actions/cache steps in 7 pull_request workflows saved under the
PR's own ref, which nothing else reads: 2.18 GB of scip-java (graph-accuracy never ran on main), 9 PR copies of
db2-odbc-cli, and go / cargo / m2 / image copies.

Each is now actions/cache/restore plus a main-only save at the end of its job (only on a miss, continue-on-error,
as #5024); setup-go's cache is off on a PR; graph-accuracy-audit.yml gets a nightly + dispatch run (every gate)
that seeds its caches on main, and Main Watch watches it. test_cache_keys.py fails on any combined cache step in a
PR workflow and on a save a PR can reach. smoke-test / ground-truth pip keys are untouched (owner-protected, #4935).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit aa9f1bd into main Oct 25, 2026
51 checks passed
@squid-shepherd
squid-shepherd Bot deleted the ci/cache-budget branch October 25, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actions cache over 10 GB: no combined cache step may save on a pull request (scip-java, odbc, go, cargo, m2, images)

1 participant