fix(mathlib): always lake build after cache get (robust to incomplete upstream cache)#15
Merged
Merged
Conversation
…e gaps)
Nightly cold-cache CI failed intermittently (06-11/06-12, self-healed 06-13):
`lake exe cache get` returned 0 but Mathlib's upstream Azure cache was
momentarily incomplete ('some files were not found'), so lib/Mathlib came out
empty and the CC-006 consolidation check (correctly) failed the fetch. The
source-build fallback only fired on a NON-ZERO cache get, so a 0-exit-but-empty
cache slipped through.
Fix: retry cache get for transient misses, then ALWAYS run `lake build Mathlib`
— the canonical workflow. Fast no-op when the cache was complete; fills any
missing oleans otherwise. (aeneas_lean_lib already always builds, so it was
unaffected.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 issue
The nightly cold-cache CI failed intermittently (06-11, 06-12 — self-healed 06-13). Root cause:
lake exe cache getreturns exit 0 even when Mathlib's upstream Azure cache is momentarily incomplete ('some files were not found in the cache'), solib/Mathlibcame out empty and the CC-006 consolidation check correctly refused to ship a broken@mathlib(oleans: source=10 consolidated=9). The source-build fallback only fired on a non-zero cache get, so a 0-exit-but-empty cache slipped past it.Fix
Retry
cache get(transient misses), then alwayslake build Mathlib— the canonicalcache get+buildworkflow. It's a fast no-op when the cache supplied everything and fills any gaps otherwise.aeneas_lean_libalready always-builds, so it was unaffected.CI
build-mathlibexercises the new path (cache complete →lake buildno-op).🤖 Generated with Claude Code