Skip to content

fix(mathlib): always lake build after cache get (robust to incomplete upstream cache)#15

Merged
avrabe merged 1 commit into
mainfrom
fix/mathlib-cache-fallback
Jun 13, 2026
Merged

fix(mathlib): always lake build after cache get (robust to incomplete upstream cache)#15
avrabe merged 1 commit into
mainfrom
fix/mathlib-cache-fallback

Conversation

@avrabe

@avrabe avrabe commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

The issue

The nightly cold-cache CI failed intermittently (06-11, 06-12 — self-healed 06-13). Root cause: lake exe cache get returns exit 0 even when Mathlib's upstream Azure cache is momentarily incomplete ('some files were not found in the cache'), so lib/Mathlib came 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 always lake build Mathlib — the canonical cache get + build workflow. It's a fast no-op when the cache supplied everything and fills any gaps otherwise. aeneas_lean_lib already always-builds, so it was unaffected.

CI build-mathlib exercises the new path (cache complete → lake build no-op).

🤖 Generated with Claude Code

…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>
@avrabe avrabe merged commit 059e7ba into main Jun 13, 2026
10 checks passed
@avrabe avrabe deleted the fix/mathlib-cache-fallback branch June 13, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant