Repository navigation
fix(verdict): verify Lean version and invalidate unversioned kernel caches - #1339
Conversation
|
Joint local verification of #1337–#1341 against main 565d7fd, including the constructor-model correction in #1338:
No physical GPU, macOS/Metal runtime, or mini-cluster gate was exercised. Separate PR source branches remain independent; the integration branch is local verification only. |
Lorenzobattistela
left a comment
There was a problem hiding this comment.
Thanks, this fixes #1332 the right way: the Lean version is now in the cache key, and lean --version is checked before anything is compiled. I ran it against the toolchains here and it does what the description says. Two changes before merge:
- The version regex needs the m flag (bend2/safe.ts, the version.match(...) line)
run_read returns stdout and stderr as one text, and /^Lean (version .../ only matches at the very start of it. When lean on the PATH is elan's launcher, elan can print lines like info: syncing channel updates… or info: downloading component 'lean' to stderr before Lean's banner. The match then fails, and a real 4.34.0 is rejected with "the kernel did not build". Running it a second time works.
I reproduced it with an empty HOME and a lean on the PATH that prints an info: line before the real 4.34.0 banner:
- As the PR stands, it's rejected: the kernel did not build (lean --version: info: syncing channel updates for 'leanprover/lean4:v4.34.0' / Lean (versi
- With /^Lean (version ([^,\s)]+)/m, the kernel builds and the verdict gives ALL PROOFS CHECK.
- With the same setup but 4.34.1, it's stirsion is run.
- if (version.match(/^Lean \(version ([^,SION) {
+ if (version.match(/^Lean \(version ([^,\s)]+)/m)?.[1] !== LEAN_VERSION) {- Please remove the CHANGELOG change entirely. We don't keep an Unreleased section; the release notes are written when a release is cut.
|
Confirmed the merged kernel builder uses multiline banner matching (/m) and leaves CHANGELOG.md unchanged. I built the current main kernel with real Lean 4.34.0 and used it for the new proof regressions. Thanks for the elan-first-launch case; future cache/toolchain changes must preserve that banner handling. |
Fixes #1332.
Pin the compiler check and cache namespace to Lean 4.34.0. A cache miss checks lean --version before any compilation, then builds the kernel. The key includes the pinned release and source; source-only legacy caches are ignored. Verified versioned caches still work without an installed Lean, and an explicit BENDTT override is unchanged.
Local end-to-end verification: