Skip to content

fix: reference-manual breakage from nightly-2026-10-06 - #140

Merged
hargoniX merged 1 commit into
masterfrom
push-xolrspwtsqpw
Oct 7, 2026
Merged

hargoniX merged 1 commit into
masterfrom
push-xolrspwtsqpw

Conversation

@downstream-lean4

Copy link
Copy Markdown
Contributor

master went red with the bump to nightly-2026-10-06
(run 37451416455,
toolchain-only commit 0c29ffc). Four repos are red; this PR fixes the one that
can be fixed downstream.

reference-manual (critical) — fixed

Two expectation blocks went stale, from two different lean4 changes.

Manual/Runtime.lean — lean4#15486 ("chore: pre-compute information about
IR decls") renumbers IR variables and join points, so the leanOutput discardElems block no longer matched: block_4/block_9 are now
block_1/block_2 and the variables shift accordingly. The block is
regenerated from the new output. The prose below it names two of those
variables; both are re-pointed at the new numbering — x_11 for the discarded
element whose reference count is decremented and x_9 for the freshly
allocated List.cons. (The old x_5 was already stale: it named the reused
cons cell rather than the decremented element, and after the renumbering it
names a u8.)

extended-examples/IndexMapGrind.lean — lean4#15506 ("fix: grind runs
upward propagation from the toProcess queue") changes the order in which
terms enter cutsat's equivalence classes, which reorders the members of two
[eqc] lines in the grind diagnostics that the tutorial's #check_msgs
docstring captures verbatim. Eighteen lines, pure reordering — nothing about
the proof or the diagnostics' content changed. Expect this block to move again
when the blocker below is fixed.

Verified: full lake build locally, 1577/1577 jobs, exit 0. reference-manual
defines neither a test nor a lint driver, so lake build is the whole phase
set (matching test/lint being null in the build reports).

mathlib4 (critical) — blocker, not fixable downstream

grind throws the internal error unknown free variable `_fvar.771.11634`
on List.pairwise_iff_forall_infix in Mathlib/Data/List/Pairwise.lean:49.
Roughly 110 Mathlib modules sit behind it, and with them repl's test phase
(which compiles Mathlib) and cslib (skipped, no build for mathlib4).

Bisected to lean4#15506 against the pr-release toolchains, with a repro that
needs core only — no Mathlib, no Batteries:

namespace List

theorem test {α : Type u} {l : List α} {R : α → α → Prop} :
    l.Pairwise R ↔
      ∀ l', (h : 1 < l'.length) → l' <:+: l → R (l'.head <| by grind) (l'.getLast <| by grind) := by
  refine l.pairwise_iff_getElem.trans ⟨fun h l' hne ⟨l₁, l₂, hl⟩ ↦ ?_, fun h i j hi hj hij ↦ ?_⟩
  · grind [getElem_append_left', getElem_append_right']
  · grind [h _ _ <| List.drop_suffix i _ |>.isInfix.trans <| l.take_prefix (j + 1) |>.isInfix]
toolchain result
nightly-2026-10-05 clean
pr-release-15503 clean
pr-release-15506 unknown free variable
nightly-2026-10-06 unknown free variable

Dropping either bullet makes the error disappear, so it is the interaction of
the two grind calls, not either one alone. An internal error is not something
downstream can adapt to, so this is left to lean4 and master stays red until
it is fixed.

Left unfinished

lean4#15486 pre-computes information about IR declarations, which renumbers IR
variables and join points. The `discardElems` listing in `Manual/Runtime.lean`
is regenerated from the new output, together with the prose that names two of
its variables: `x_11` for the element whose reference count is decremented and
`x_9` for the freshly allocated `List.cons` (the old `x_5` was already stale and
now names a `u8`).

lean4#15506 moves `grind`s upward propagation into the `toProcess` queue, which
reorders the members of two cutsat equivalence classes in the `grind`
diagnostics that `extended-examples/IndexMapGrind.lean` captures in a
`#check_msgs` docstring.

Verified with a full `lake build` (1577 jobs). `reference-manual` defines
neither a test nor a lint driver.

Co-Authored-By: Claude Opus 5 <[email protected]>
@downstream-lean4

Copy link
Copy Markdown
Contributor Author

Build report for fix: reference-manual breakage from nightly-2026-10-06

Turned green:

Repo Critical Build Test Lint
reference-manual ✅ ✅ in 1m 17s ⏭️ ⏭️
Stayed red
Repo Critical Build Test Lint
mathlib4 ✅ 🟥 in 11s ⏭️ ⏭️
cslib 🛑 by mathlib4 ⏭️ ⏭️
repl ✅ in 0s 🟥 in 22s ⏭️
Stayed green
Repo Critical Build Test Lint
aesop ✅ ✅ in 0s ✅ in 5s ⏭️
batteries ✅ ✅ in 0s ✅ in 4s ✅ in 2s
import-graph ✅ ✅ in 2s ✅ in 4s ⏭️
lean4-cli ✅ ✅ in 0s ✅ in 0s ⏭️
plausible ✅ ✅ in 0s ✅ in 2s ⏭️
ProofWidgets4 ✅ ✅ in 1s ✅ in 1s ⏭️
quote4 ✅ ✅ in 0s ✅ in 1s ⏭️
BibtexQuery ✅ in 3s ⏭️ ⏭️
comparator ✅ in 2s ⏭️ ⏭️
doc-gen4 ✅ in 7s ⏭️ ⏭️
illuminate ✅ in 1s ✅ in 10s ⏭️
lean4-unicode-basic ✅ in 0s ⏭️ ⏭️
lean4export ✅ in 0s ✅ in 7s ⏭️
LeanSearchClient ✅ in 0s ✅ in 0s ⏭️
leansqlite ✅ in 7s ✅ in 16s ⏭️
nerodia ✅ in 1s ✅ in 21s ⏭️
verso ✅ in 1m 21s ✅ in 2m 54s ⏭️
verso-slides ✅ in 43s ✅ in 8s ⏭️
verso-web-components ✅ in 30s ⏭️ ⏭️

View run

@hargoniX
hargoniX merged commit ee5da78 into master Oct 7, 2026
20 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant