Skip to content

fix: batteries breakage from nightly-2026-11-22 (lean4#15687) - #272

Merged
Kha merged 1 commit into
masterfrom
push-xvxtvqmvqpnz
Nov 23, 2026
Merged

Kha merged 1 commit into
masterfrom
push-xvxtvqmvqpnz

Conversation

@downstream-lean4

@downstream-lean4 downstream-lean4 Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

1 of 4 for run 45055845730, with #273, #274 and #275 — one PR per author of the upstream change behind each breakage, so each asks that author for review. This one stands alone: batteries and aesop go green with it and nothing else.

batteries was the only repo that CI could build this round: aesop, mathlib4 and
cslib were all skipped behind it, so this unblocks three more repos.

batteries — lean4#15687 (Kha)

lean4#15687 makes unfold on a non-recursive definition independent of whether
f.eq_def happens to have been realized already: it now always unfolds by plain delta
expansion, and so no longer reduces the resulting match on a constructor. In
Float.Model.UnpackedFloat.pack_unpack, unfold pack therefore leaves the two haves
of pack's .finite arm inside the unreduced match, where extract_lets cannot
reach them:

Batteries/Data/Float/Lemmas/Basic.lean:77:4: Tactic `extract_lets` failed: made no progress
Batteries/Data/Float/Lemmas/Basic.lean:94:4: Tactic `extract_lets` failed: made no progress

Fix: reduce the match with dsimp -zeta only before extract_lets, in both the
subnormal and the normal case.

This is byte-for-byte the hunk the bot already carries on adaptation-15687 (#265) and
adaptation-16623 (#266) — both now CONFLICTING, because upstream has since split
Batteries/Data/Float/Lemmas.lean into
Batteries/Data/Float/Lemmas/{Basic,Arithmetic,Order}.lean, so neither can merge as it
stands. Applying it at the new location is what makes master build.

Verified: batteries lake build --wfail, lake test and lake lint all green;
aesop lake build --wfail and lake test green (it has no lint driver).

lean4#15687 makes `unfold` on a non-recursive definition independent of
whether `f.eq_def` happens to have been realized: it now always unfolds by
plain delta expansion and no longer reduces the resulting `match` on a
constructor. In `Float.Model.UnpackedFloat.pack_unpack`, `unfold pack`
therefore leaves the two `have`s inside a `match` arm, where `extract_lets`
cannot reach them (`Tactic `extract_lets` failed: made no progress`).

Reduce the match with `dsimp -zeta only` before `extract_lets`, in both the
subnormal and the normal case. This is the same hunk the bot already carries
on `adaptation-15687` (#265) and `adaptation-16623` (#266); both conflict with
master because upstream has since split `Batteries/Data/Float/Lemmas.lean` into
`Batteries/Data/Float/Lemmas/{Basic,Arithmetic,Order}.lean`, so the fix is
applied to the new location here.

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

Copy link
Copy Markdown
Contributor Author

Build report for fix: batteries breakage from nightly-2026-11-22 (lean4#15687)

Turned green:

Repo Critical Build Test Lint
aesop ✅ ✅ in 15s ✅ in 3s ⏭️
batteries ✅ ✅ in 2s ✅ in 3s ✅ in 1s
Stayed red
Repo Critical Build Test Lint
mathlib4 ✅ 🟥 in 40s ⏭️ ⏭️
reference-manual ✅ 🟥 in 5m 19s ⏭️ ⏭️
cslib 🛑 by mathlib4 ⏭️ ⏭️
repl ✅ in 0s 🟥 in 18s ⏭️
Stayed green
Repo Critical Build Test Lint
import-graph ✅ ✅ in 2s ✅ in 4s ⏭️
lean4-cli ✅ ✅ in 0s ✅ in 0s ⏭️
plausible ✅ ✅ in 0s ✅ in 2s ⏭️
ProofWidgets4 ✅ ✅ in 0s ✅ in 0s ⏭️
quote4 ✅ ✅ in 0s ✅ in 1s ⏭️
BibtexQuery ✅ in 2s ⏭️ ⏭️
doc-gen4 ✅ in 5s ⏭️ ⏭️
illuminate ✅ in 0s ✅ in 9s ⏭️
lean4-unicode-basic ✅ in 3s ⏭️ ⏭️
lean4export ✅ in 0s ✅ in 5s ⏭️
LeanSearchClient ✅ in 0s ✅ in 0s ⏭️
leansqlite ✅ in 6s ✅ in 19s ⏭️
nerodia ✅ in 0s ✅ in 22s ⏭️
verso ✅ in 1m 15s ✅ in 3m 8s ⏭️
verso-slides ✅ in 16s ✅ in 9s ⏭️
verso-web-components ✅ in 3s ⏭️ ⏭️

View run

@Kha
Kha merged commit 50adf4c into master Nov 23, 2026
18 of 23 checks passed
TwoFX added a commit that referenced this pull request Nov 23, 2026
…274)

3 of 4 for [run
45055845730](https://github.com/leanprover/downstream-lean4/actions/runs/45055845730),
with #272, #273 and #275 — `reference-manual` goes green only with this
PR *and* #275 *and* the still-open #268, so on its own this PR's CI
stays red on `reference-manual` until those merge. Verified together.

### `reference-manual` — lean4#16627 (`TwoFX`)

lean4#16627 makes `MessageData.format` respect `maxTraceChildren`, so a
trace node with
more than 50 children now prints its first 50 followed by
`` N more entries... (increase `maxTraceChildren` to see more) ``. Two
nodes of the
`grind` diagnostics that the `#check_msgs` block in front of the first
`eraseSwap` pins
(`extended-examples/IndexMapGrind.lean`) have 86 and 119 entries, so the
block fails with

```
extended-examples/IndexMapGrind.lean:748:0: ❌️ Docstring on `#check_msgs` does not match generated message
```

and the two truncation markers are the *only* difference in the diff —
everything else
still matches. `Tutorial.Grind.IndexMap` then fails too, because it
extracts anchors
from that module through a nested `lake build`.

Those diagnostics are the whole point of the example, so this lifts the
limit for the
one command (`maxTraceChildren 0` = no limit, which is how core's own
guard reads it)
rather than pinning a truncated list. The `set_option` sits outside
`-- ANCHOR: eraseSwap_init`, so the code the manual renders is
unchanged.

**Verified:** `lake build IndexMapGrind` green, and the repo's full
`lake build` is green
with the two commits of this round plus #268 applied (`lake test` and
`lake lint` report
no driver configured, so `build` is the whole phase set here).

<!-- downstream-watch: unattended -->

---------

Co-authored-by: downstream-lean4[bot] <downstream-lean4[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: Julia Markus Himmel <[email protected]>
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