fix: include lake-package-directory in cache key hashes#167
Open
b-mehta wants to merge 1 commit into
Open
Conversation
b-mehta
added a commit
to b-mehta/Polychromatic
that referenced
this pull request
Jun 27, 2026
The make-docs job's GitHub cache key didn't include the toolchain or manifest hash, because lean-action computes them from the repo root while our Lake package lives under `Lean/`. That made the restore-key version-agnostic, so a stale `.lake` from an older Mathlib gets restored and `lake exe cache get` then fails trying to check Mathlib out to the new revision — which is what broke make-docs on the v4.30 bump. This pins lean-action to a fork carrying the fix (leanprover/lean-action#167) until it's released upstream, at which point we switch back to the official action.
Contributor
Author
|
The CI failure here appears transient, if someone could re-run it that would be great. |
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.
The cache
pathalready honorslake-package-directory, but thekeyandrestore-keyshash root-relativelean-toolchainandlake-manifest.json. For a project whose Lake package lives in a subdirectory those globs match nothing, so both hashes are empty and the key carries no toolchain/manifest information. The restore-key then matches caches from any version, so after a toolchain or Mathlib bump a stale.lakeis restored andlake exe cache getfails trying to check Mathlib out to the new revision.This computes both hashes from
lake-package-directory(default".", unchanged behaviour for root-level projects) at all three call sites — the restorekey, therestore-keys, and the savekey.Prepared by Claude Code.