Changelog

leanprover/lean4 · · 21 commits

HTTP fixes lead a feature-heavy Lean day

Major HTTP server correctness work plus VCGen, `grind`, and name-resolution improvements; also a kernel heartbeat fix and memory/runtime bug fixes.

HTTP server now handles RFC edge cases and timeouts correctly (algebraic-devd15bfa7, algebraic-dev902461b)

Lean’s HTTP stack got a substantial correctness pass: connection timers now use a watchdog, URI parsing gained size limits, Expect: 100-continue and transfer-coding parsing became RFC-aware around quoted strings, and CONNECT/lingering-close timeout handling was tightened. The follow-up commit fixed lingering close, timeout reporting, and CONNECT tunnel handling so connections no longer mis-handle buffered bytes or report the wrong failure mode.

VCGen learned to split assertions and reuse better split rules (sgraf8121b091cc, sgraf8124dc94ee)

vcgen can now split if/match conditions appearing in assertions and reuses that information later via cached split equalities. In parallel, join-point generation was improved to anti-unify common jump arguments, which reduces proof search work and avoids duplicated case splits in common structured-state patterns.

Reserved-name handling and name resolution got faster (leodemoura47ac95d, leodemouradcd22d5)

Lean now records a cheap “candidate” test for reserved-name predicates and uses it to avoid re-running expensive checks for every namespace candidate during resolution. This makes global name resolution faster in files with many opens, and the benchmark added here reports a sizable instruction reduction.

Kernel heartbeat limits are now scoped per declaration (Khad0aceb3)

The kernel’s maxHeartbeats limit now applies separately to each addDeclCore call instead of accumulating across declarations checked on the same thread. That fixes a class of false failures for tools that replay many declarations in sequence, while keeping per-declaration checking limits intact.

Runtime and tactic bugs were fixed (hargoniX70c9a7d, sgraf812300f273, hargoniX18b4a16, leodemoura29480b5, hargoniXaede766)

lean_array_get_borrowed no longer leaks memory on its panic path, grind can case-split on negated check guards, stack-size setting now saturates instead of overflowing, and match congruence equation auxiliaries are now private to avoid diamond import conflicts. There’s also a small ABI clarity change for isScalarObj.

Other misc changes

  • CI workflow tweaks and cache/backport script updates (3 commits)
  • Benchmark/test formatting and scaling-test additions (2 commits)
  • Stage0 refresh and a CMake version-cycle bump (2 commits)