Repository navigation
fix(cache): save-cache=auto saves fully on a local runner (act/act2) (Fixes #537) - #563
Merged
Merged
Conversation
…ixes #537) auto skipped every durable save on a pull_request event. Right on GitHub (PR entries are ref-scoped and count against the 10 GB budget), wrong under act: its cache server has no ref scoping or budget, and local runs are pull_request on purpose so PR labels select jobs. Every local run restored and never saved, so every local Rust build was cold. auto now saves when ACT is truthy (act and act2 always export it); true and false still override, and GitHub runs keep #527's behaviour. The save-policy tests control ACT explicitly so the suite answers the same under act. Removes the need for repositories' save-cache: ${{ env.ACT && 'true' || 'auto' }} overrides (zackees/ci.yml ACT-003 exception #216). Co-Authored-By: Claude <[email protected]>
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #537.
save-cache: autoskipped every durable save on apull_requestevent. That's right on GitHub (a PR entry is ref-scoped and counts against the 10 GB budget) and wrong under act: its cache server has no ref scoping or budget, and local runs arepull_requeston purpose so PR labels select jobs, so every local run restored and never saved.decideCacheSave(mode, event, localRunner):autosaves when the run is local;true/falsestill override; GitHub runs keep fix(cache): never save durable caches from pull-request runs by default — they are unreachable and fill consumers' 10 GB budget (zccache 11.75 GB, kernal-api ~23 GB offered) #527's behaviour.isLocalRunner(env)isACTtruthy, the same signaldecideToolCacheStorealready uses; act and act2 always export it.dist/andcook/dist/rebuilt.Tests (RED -> GREEN)
Three new
#537tests in__tests__/save-policy.test.ts(decision matrix,ACTenv resolution, every layer saves onpull_requestunder act) fail onmainand pass here. The harness now setsACTexplicitly so the suite gives the same answers when it runs under act. Full suite: 863 pass; the one failure (companion archive round trips without requiring a standalone zstd executable) fails identically on the untouched tree in anode:24container, so it's environmental and unrelated.Removes the need for repositories'
save-cache: ${{ env.ACT && 'true' || 'auto' }}overrides: ACT-003 exception forge-ci/ci.yml#216. Coordinated with zackees/clud (local CI migration to bosn → act2), forge-ci/act2#1, zackees/bosn.