fix(ci): point the frozen-source cache at the harnesses' real location - #7
Merged
Conversation
PR #6 wired the parity harnesses into CI and cached .parity-cache — the in-repo default from PR #4. But PR #5 (merged first) moved the harness cache to ~/.cache/workspacejson/cli-parity precisely so the frozen-source clone never trips the architecture guard, and nothing in the workflow sets WORKSPACEJSON_PARITY_CACHE. The cache step therefore saved and restored a directory the harnesses never write: a no-op, with every CI run re-cloning and rebuilding the frozen source from scratch. Point actions/cache at the real default. actions/cache expands ~, and on ubuntu-latest XDG_CACHE_HOME is unset, so the path matches parity-lib.sh's ${XDG_CACHE_HOME:-$HOME/.cache}/workspacejson/cli-parity exactly. The cache key is unchanged — still the immutable frozen-source SHA.
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.
Problem
Cross-PR race between #5 and #6. PR #6 caches
path: .parity-cache— the in-repo location from PR #4 — but PR #5 (merged first) moved the harness cache default to~/.cache/workspacejson/cli-parity, and the workflow never setsWORKSPACEJSON_PARITY_CACHE. Result: theactions/cachestep saves/restores a directory the harnesses never touch, so every parity CI run re-clones and rebuilds the frozen source from scratch.Not a correctness issue — the job still passes, and the guard job runs on a separate runner so nothing trips it. The cache is just dead weight and the parity job pays first-run cost every time.
Fix
One line:
path: ~/.cache/workspacejson/cli-parity, matchingparity-lib.sh's default (${XDG_CACHE_HOME:-$HOME/.cache}/workspacejson/cli-parity;XDG_CACHE_HOMEis unset onubuntu-latest, andactions/cacheexpands~). Cache key unchanged — still the immutable frozen-source SHA. Comment updated to record why the cache lives outside the tree, so the next workflow edit doesn't regress it.Verification
migration/parity-expected-differences.txtgrep -rn parity-cache .github/workflows/→ only this one path reference existed