Repository navigation
Conversation
Proof profile (new / modified Lean files)Statement changes✅ No statements changed — all 1 tracked declaration across 1 modified file kept their type; only proofs / definition bodies changed. Statements are compared textually against the merge base (comments and whitespace ignored; Compile cost of modified files — base → headHeartbeats: 0 → 0 (+0, —). Declarations: 0 → 0. Per-file wall sum: 0.7 s → 0.8 s (+13.7%). Wall clock is measured under parallel load and is noisy; heartbeats are deterministic and are the regression signal. Files: 1 compared — 0 cheaper, 0 costlier, 1 within noise (threshold: |Δ heartbeats| ≥ 1,000 and ≥ 1%). Measurement errors: 1 base-side / 1 head-side file(s), marked ⚠; their heartbeat counts are partial. Both sides are elaborated against the merge-base build of the pool — sound when only proofs and definition bodies change; a file whose statements changed may fail there and is flagged ⚠. Heartbeats come from Mathlib's
Advisory only — never blocks merge. Full log uploaded as the |
Vilin97
left a comment
There was a problem hiding this comment.
Reviewed f7e0dbc3d904410e145e075e1b3508466331e798 under the refactor rubric. The current one-line change removes definition-body exposure from LeanPool.Basic while retaining the public hello declaration and its signature. The change is consistent with the stated API goal; I found no actionable defect in this increment.
This review covers the committed Basic.lean change only. The PR body describes a pool-wide migration that is still in progress, so it should remain a draft until that implementation is finished and the final head has passed the full build, linters, and quality checks. Current full-pool CI is still running.
🤖 LLM review — refactor (
|
| Aspect | Value |
|---|---|
| Scope | module exposure/API refactor |
| Introduces tech debt | 🛑 yes |
| Maintainability | 🛑 regressed |
| Brittleness | 🛑 more_brittle |
| Risk | 🟡 medium |
The selective interfaces improve some dependencies, but remaining public API gaps need fixing before merge.
Findings (2)
- reusability-lost —
LeanPool/RungeKuttaOrderConditions/ButcherOrder.lean:29
The public butcherCheck and gaussCheck macros still explicitly unfold Phi, gamma, order, the tableaux, and related definitions, whose bodies this change hides. An importing-module test using the exact tree definitions passes with the original exposure and fails after removal: decide +kernel gets stuck on order leaf, and simp only rejects gamma and its dependencies. Restoring targeted exposure makes the test pass. Preserve exposure for the checkers’ computational dependencies and verify both macros from a separate importing module; certificates inside this file do not exercise that boundary. - reusability-lost —
LeanPool/PointwiseBirkhoff/Main.lean:19
Removing exposure hides invCondexp without providing an equation identifying it with μ[φ | invariants f]. Both main Birkhoff theorems conclude convergence to this wrapper, so ordinary importing callers can no longer unfold it to obtain the conditional-expectation conclusion or apply Mathlib’s conditional-expectation lemmas. This follows Lean’s module visibility rules. Expose invCondexp individually or export its defining equality, then check the conditional-expectation formulation from an importing module.
Tokens: 1,753,751 in / 9,513 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $35.7885 (Standard API equivalent; uncached input) (long-context rate)
Automated review against .github/REFACTOR_REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.
request_changes is an ask, not a close: of the reviewer's past request_changes verdicts, 39% were merged after a human looked. Read the findings before acting on the verdict.
Changes requested by automated reviewReviewed head The exposure cleanup breaks the exported Runge–Kutta proof API. A separate module importing Acceptance condition: expose the definitions intentionally used by the public macros, or rewrite the macros against public equation lemmas, and verify both The large exposure delta was audited file by file with a reproducible inventory; the remaining proof/API edits were inspected separately. The finding is a reproduced client failure, not an objection to the diff's size. |
Changes requested by automated reviewReviewed exact head The exported Runge–Kutta checker API still fails from an importing module. After compiling Acceptance condition: give the public checkers access to the intended computational definitions (targeted exposure or public equations), export the required tactic implementation, and make both separate-module examples pass. Obtain all build shards and the unchanged aggregate lint/quality/trust gates at the resulting head. The current build is pending; the preceding head's nine failed shards are historical, not proof that these new repairs fail. The complete follow-up was partitioned into 454 mechanically compared attribute/ |
Changes requested by automated reviewReviewed exact head The refactor still breaks imported definition visibility. The completed predecessor run on the unchanged affected sources reports failures in ClassificationOfSurfaces/Moise/LocallyFiniteFaceExtension, BooleanMultiplication/N4/SevenGate, MarkovProcess/DenseTime/Trajectory and HardSphereNBC/HardSphereGeometry, among the grouped failures in run 36430792945. The latest two Nikodym batches (13 files, then 9 files) only add targeted Acceptance condition: Repair each failing dependency boundary with the needed exposed definitions or public lemmas, remove ineffective exposure attributes reported as warnings, and pass every build shard and unchanged repository gates. Preserve the valid exposure repairs already made. Prior complete source/dependency/source-attribution audits were reconciled against this head using full diffs, source/card/configuration equality where applicable, and the changed proofs. Fresh pending checks are not represented as green. Formal self-review is unavailable to the PR-author account. |
Changes requested by automated reviewReviewed exact repaired head The current public reduction API still breaks downstream consumers. The earlier no-new-failure checkpoint is superseded by this head’s completed shard 01, which has 69 Lean compiler diagnostics. Acceptance condition: restore the remaining selective exposure or public equation/constructor bridges in the affected RegtsSevenster closure, preserve exported computations and theorem contracts, and pass every build shard plus the unchanged warning, lint, quality and trust gates. Preserve the valid repairs already made. Neither draft status nor the diff’s size is a blocker or reason for a maintainer label. Additional completed shards at this same reviewed head corroborate the same API defect: shard 02 cannot eliminate |
|
Auto-rebase stopped: this PR conflicts with |
Independent review — changes requested at
|
|
Auto-rebase stopped: this PR conflicts with |
This draft removes blanket
@[expose] public sectionexports across Lean Pool. It keeps ordinarypublic sectiondeclarations and adds individual@[expose]attributes where imported clients require a definition's body. The main module-system migration merged separately in #517.The scope remains the full module migration: preserve all projects, mathematical statements, assumptions and intended APIs; review the individual exposure edits and any narrowly scoped proof repairs; reconcile accepted changes on Main through the review owner's integration process. No project removal, theorem weakening, warning suppression, waiver or gate change is proposed.
Draft — do not merge yet. Published and locally validated source remain distinct. The published PR head is
4e51cbbfd4a1b908ffbd333044bcda2df9697870. Earlier full-pool attempts used local H523823d12e542bef70447bd5a801ef3c0b717db54b; the current local, unpublished checkpoint in the dated observation below is Source70ec202b6ce0c4e64cf2d0f0cb9d956631e92b4021.Main was
2aaa7220788257635be774b855528c4f0be6f3bdin the primary observation at 2026-10-20, 02:14:10 UTC. Fresh metadata comparisons at 02:15:32 UTC against078c94d9712c98d0e1c0337fcd48999c02ffe76afound identical Git object types and IDs for the ten checked compiler/dependency, gate and review paths. Other intervening Main content was not inspected or integrated with Source70. Final integration with moving Main remains with the review owner.Saved H52 structure checks covered 14,216 Lean files, with zero missing module declarations and zero blanket-exposure sections. These structural checks do not establish compilation or final-gate acceptance. The later reviewed exposure repairs preserve all other statement, assumption, definition-body, proof, import, option and header bytes.
Retained N45/N59 Brill compilation passes at H52, including their recorded Row04/Row06 coverage, remain valid within their named scope. The earlier Regts/Stafford incremental batch passed using replayed artifacts and supplies no fresh-compilation credit; the separate Carlson Relations qualification freshly compiled and passed. Interrupted H52 full-pool attempts and later targeted runs retain their original outcomes, logs and caches. None is relabeled a completed full-pool build.
Retained earlier local history. Source53–68 supplied scoped passing targets while later EllipticPDE project runs still failed. Original outcomes, byte-preservation reviews, logs and caches remain retained, with the default 200,000-heartbeat limit, proofs, options and gates preserved. Source60's 600-second coordination stop occurred before its remaining targets; its separate continuation remains separate evidence.
Dated validation observation — 2026-10-20, 02:25:16 UTC. The current local, unpublished source is Source70
ec202b6ce0c4e64cf2d0f0cb9d956631e92b4021, saved at 18:18:25 UTC. Its two individual exposures in GrothendieckVanishing/CohomologyAPI add 20 bytes; independent preservation and actual commit/map reviews matched the exact change. All other statement, type, hypothesis, definition-body, proof, import, option and header bytes remain unchanged.Source69's EllipticPDE target 64108 passed at 16:50:28 UTC (project 0, outer 0, no guard stop), with 13 fresh
Builtrecords. That scoped pass remains separate from full-pool acceptance.Source69’s full
LeanPoolattempt 78968 remains an output-guarded failure: outer exit 1, target exit −15, no normal terminal. Its 1,095 freshBuiltrecords remain progress only. Its closed written log retained ten CohomologyAPI source-error headers, including the original 200,000-heartbeat timeout; unwritten stdout may have remained undrained. The old failure and separate operational Source release are not relabeled successes.On Source70, attempt 75079 completed
LeanPool.GrothendieckVanishingat 18:31:26 UTC, with project exit 0, outer exit 0 and no guard stop. Its independently reviewed closed log contains 13 freshBuiltrecords, including CohomologyAPI in 230 seconds and the project root in 3.0 seconds, without error, warning or crash markers. The ten earlier source-error headers cleared with the original heartbeat limit and options unchanged. This establishes the named retained-cache project result; it does not isolate which exposure caused the improvement or establish a full-pool pass.Three later full-
LeanPoolattempts stopped at their output-growth guards:Builtrecords in its closed written log.Builtrecords in its 59,450-byte closed written log.Builtrecords in its 50,225-byte closed written log.Subsequent independent review — 19:52:43 UTC. Reviews of all three entire written logs found no error, warning, heartbeat-timeout or crash markers in these written logs, including after ANSI removal. These observations cover written EOF only: stdout may not have fully drained, so unwritten output remains unknown. The missing normal terminals prevent complete compiler-capture or peak-resource claims. Per-run
Builtcounts are retained progress, not unique-module totals, completion percentages or full-pool acceptance.Before/after Source70 checks matched all 14,216 files against the same map, with clean tracked source. Empty groups and Source release were recorded separately; release supplies no build acceptance.
Closed continuation — 21:59:29 UTC. Attempt 23766 stopped at its finite 7,200-second target timeout:
LeanPoolexit −15, outer exit 0, withfullpool_build_passedandall_targets_passedboth false. Its independently reviewed 145,865-byte closed written log contains 1,116 freshBuiltrecords and 28 replay records, with zero findings across all fourteen raw/ANSI diagnostic scans. These are written progress records, not unique-module totals, completion percentages or a full-pool pass; unwritten stdout is not established complete.For 23766, both Source70 before/after checks matched 14,216 files / 271,053,191 bytes against the same map with clean tracked source. The owned group was empty and normal Source release was independently verified. All 512 captured compiler samples matched the pinned executable and final
-j1flags; these bounded samples do not establish continuous or universal compiler telemetry.Closed continuation — 2026-10-20, 00:09:43 UTC. Attempt 54848 stopped at its finite 7,200-second target timeout:
LeanPoolexit −15, outer exit 0, withfullpool_build_passedandall_targets_passedboth false. Its independently reviewed 116,398-byte closed written log contains 708 freshBuiltrecords and 38 replay records, with zero findings across all fourteen raw/ANSI diagnostic scans. Written EOF does not prove unwritten stdout complete; these records establish no global unique-module total, graph percentage or full-pool acceptance.For 54848, both Source70 checks matched 14,216 files / 271,053,191 bytes against the same map with clean tracked source. Normal Source release and an empty owned group were independently verified at 00:14:06 UTC. The recorded RSS maximum was 14,777,171,968 bytes, with at most two recorded compiler processes and 512 pinned final-flag samples; the samples supply no continuous or universal telemetry claim.
Closed project continuation — 2026-10-20, 02:25:02 UTC. Attempt 59420 reached normal CLOSED after its finite 7,200-second target timeout:
LeanPool.MovingSofaexit −15, outer exit 0, with project and full-pool results both false. Root’s whole-written-log scan covered 2,365 bytes at stable EOF/SHA, recording 24 freshBuiltrecords, zero replay records, zero findings across its ten broad raw/ANSI diagnostic scans, and no partial written tail. The independent fourteen-pattern closed review remains pending at the 02:25:16 UTC snapshot. Written EOF does not prove unwritten stdout complete; these records establish no global unique-module count, graph percentage or acceptance. Both Source70 checks matched 14,216 files / 271,053,191 bytes with clean tracked source; Root recorded normal Source release and an empty owned group. The terminal recorded a maximum RSS of 19,341,033,472 bytes, at most two compiler processes and 26 pinned final-flag compiler samples; these bounded observations do not establish continuous or universal telemetry. A new 7,200-second same-project retained-cache retry remains proposed only, requiring the independent fourteen-pattern closed review and fresh admission guards; no new actual plan, launch or result is credited. A later project C0 still requires a separate final sole-target 7,200-second fullLeanPoolrun, followed by all six post-build gates and the remaining final requirements. Any continuation remains on the same unpublished Source70 and retained cache, under the finite 7,200-second target bound, actual compiler-j1, at most two compiler processes and unchanged source guards. The prospectively qualified disk envelope is 32 GiB, with 14 GiB cumulative stage growth from the same baseline, superseding the earlier operational disk ceiling. RAM remains capped at 25 GiB. No cleanup, baseline reset, refund or new reservation origin is credited.All six post-build gates remain pending and unexecuted. Their current static preparation is inert, with no actual execution plan or gate credit. Execution still requires successful current-source full-pool closure, independent closed review, warning-free written output and fresh source/resource bindings. Final published-head CI and independent final review remain required.
Source58 also restored three legacy product-instance names as public aliases to canonical Mathlib structures, without adding duplicate instance-search registrations. Historical registration/reducibility behavior and compatibility with every external client are not claimed identical.
The twelve-file RemovalExtremalStability source proposal from earlier Main
374a940b17712eab49f6dfc0bbe754b8ff55e76bremains unapplied and uncompiled. Its static preservation review and prepared runner do not supply latest-Main integration or kernel acceptance; full-pool/post-build prerequisites and reviewer integration remain pending.The published head's observed CI still fails in Lean Action CI run 37186446631. Those historical diagnostics do not determine the later unpublished local outcomes. Fresh hosted CI must validate the final published head.
Before this PR can leave draft status and merge, the final integrated source must:
LeanPoolbuild.Targeted local successes or static reviews supply no full-pool, final quality, hosted-CI or merge acceptance. This PR remains draft while those requirements are pending.