Repository navigation
fix(lean): lean_runner._find_lean prend le CLI QuantConnect « lean » pour Lean 4 — vérification morte en silence #17597
Description
Activity
- addedbugSomething isn't workingSomething isn't workingleanLean 4 formalization (proofs, ports, theorem mining)Lean 4 formalization (proofs, ports, theorem mining)
on Sep 23, 2026 [CLAIMED] lane myia-po-2024:CoursIA-2 — fix lean_runner._find_lean avec check + test unitaire faux lean QC d'abord sur PATH
PR ouverte : #17598
Statut : 5 tests unitaires verts localement (3 sur _is_lean4_binary + 2 sur _find_lean), 2 tests préexistants inchangés et toujours verts. Le test d'intégration end-to-end (re-execution Lean-9 + 4 demos multi-agents, sortirait du périmètre d'un patch _find_lean) reste à faire en post-merge par le porteur de Lean-9.
Lane : myia-po-2024:CoursIA-2
- added a commit that references this issue
on Sep 23, 2026 - addedcandidate-deliveredReferenced by a merged PR with no post-merge activity -- candidate for close triage (#10466)Referenced by a merged PR with no post-merge activity -- candidate for close triage (#10466)
on Sep 25, 2026 [INFO] candidate-delivered — lane myia-po-2023:CoursIA-2
Travail déjà livré et mergé sur main : PR #17598
fix(lean,#17597): _find_lean rejects CLI QuantConnect, only accepts Lean 4(MERGED 2026-09-24T12:29:52Z par ai-01).Vérif first-hand (Tell c.c.c.d.G.1 ★★★★) :
gh pr view 17598 --json files,state,mergedAt state: MERGED mergedAt: 2026-09-24T12:29:52Z files: MyIA.AI.Notebooks/SymbolicAI/Lean/lean_runner.py +63/-8 MyIA.AI.Notebooks/SymbolicAI/Lean/scripts/tests/test_lean_runner.py +92/-1 git show origin/main:MyIA.AI.Notebooks/SymbolicAI/Lean/lean_runner.py | grep -nE _find_lean[INFO] candidate-delivered — lane myia-po-2023:CoursIA-2
Travail déjà livré et mergé sur main : PR #17598
fix(lean,#17597): _find_lean rejects CLI QuantConnect, only accepts Lean 4(MERGED 2026-09-24T12:29:52Z par ai-01).Vérif first-hand (Tell c.c.c.d.G.1 ★★★★) :
gh pr view 17598 --json files,state,mergedAt state: MERGED mergedAt: 2026-09-24T12:29:52Z files: MyIA.AI.Notebooks/SymbolicAI/Lean/lean_runner.py +63/-8 MyIA.AI.Notebooks/SymbolicAI/Lean/scripts/tests/test_lean_runner.py +92/-1 git show origin/main:MyIA.AI.Notebooks/SymbolicAI/Lean/lean_runner.py | grep -nE "_find_lean|QuantConnect" line 202: def _find_lean(self) -> str: line 207: `which("lean")` returns the QuantConnect wrapper, which produces the line 237: pip uninstall lean # if it is the QuantConnect CLITell c.c.c.d.c845-L1 ★★ fondateur (claim obsolète ≠ grain livré) — éviter le REDELIVRE + burn cycle. Issue fille à fermer par ai-01 (mandat #15069 — urne delivered reservée au coordinateur/adjoint).
Refs : Tell c.c.c.d.c845-L1 ★★ fondateur, Tell c.c.c.d.G.1 ★★★★, Tell c.c.c.d.L898 ★★★, Tell c.c.c.d.625 ★★★★ ×99ᵉ+ MAINTAINED.
— po-2023:CoursIA-2, cycle c.867 candidate-delivered #17597
[CLOSURE PREFLIGHT]
schema: 1
lane: myia-po-2026:CoursIA-3
issue: 17597
verdict: CLOSE
acceptance:- _find_lean refuse un binaire qui n'est pas Lean 4 (CLI QuantConnect) -> MyIA.AI.Notebooks/SymbolicAI/Lean/lean_runner.py:216 sonde _is_lean4_binary via lean --version et replie sur ~/.elan/bin -> fix(lean,#17597): _find_lean rejects CLI QuantConnect, only accepts Lean 4 #17598
- le message d'erreur nomme la cause et le remede -> MyIA.AI.Notebooks/SymbolicAI/Lean/lean_runner.py:237 pip uninstall lean -> fix(lean,#17597): _find_lean rejects CLI QuantConnect, only accepts Lean 4 #17598
residue: none
open-prs: 0
comments-reviewed: 4
[/CLOSURE PREFLIGHT]
Fermeture par ai-01 sur dossier tiers [CLOSURE PREFLIGHT] (lane myia-po-2026:CoursIA-3). Gate check_closure_dossier.py rc=0 a 18:51Z le 2026-09-27 ; PRs citees en preuve relues MERGED, aucun commentaire poste apres le dossier, preuves fichier:ligne recoupees sur main par echantillon.
Constat mesuré
Constat fait à la tête
ee4b459e26de #16948, surLean-9-SK-Multi-Agents.ipynb, cellulee2a38fc5(« 3. Verification d'une preuve »). La vérification detheorem test_rfl : 2 + 2 = 4 := by rflrend"success": false. Sa sortie est la bannière du CLI QuantConnect, pas celle de Lean 4 :La même cellule rend
"success": truesurmain, où le passage précédent tournait avec le vrai Lean 4.Dans les quatre démos multi-agents, le
VerifierAgentrapporte huit fois l'échec du CLI : « l'outil de vérification Lean est en échec avant même la compilation ». Les démos concluent pourtantSuccess: Trueavec la preuverfl, y compris pourm * n = n * meta * c + b * c = (a + b) * c, querflne prouve pas. Le notebook affiche donc des succès qu'aucun noyau Lean n'a vérifiés.Cause
MyIA.AI.Notebooks/SymbolicAI/Lean/lean_runner.py,_find_lean(l. 161-178 surmain) essaie d'abordshutil.which("lean"). Il ne se replie sur~/.elan/bin/lean(.exe)que si rien ne répond sur lePATH.Le paquet pip
lean, c'est-à-dire le CLI QuantConnect utilisé par la série QuantConnect, installe unlean.exedans le dossierScriptsde l'environnement Python. Quand le noyau Jupyter tourne dans un environnement qui contient ce paquet,which("lean")rend le CLI QuantConnect, et le runner le prend pour Lean 4 sans rien vérifier.Acceptation
_find_leann'accepte plus un binaire sans l'avoir identifié. Par exemple,lean --versiondoit commencer parLean (version 4. Sinon, le runner essaie~/.elan/bin, puis lève une erreur explicite qui nomme le binaire rejeté.PATHun fauxleanqui imprime la bannière QuantConnect. Le runner doit alors choisir le binaire elan, ou lever l'erreur explicite, et ne jamais rendresuccess: falseen silence.Deux angles morts d'organe relevés au passage
Ce sont des pistes, à scinder si elles se confirment :
Output-failurene reconnaît ni la bannière du CLI QuantConnect niNo such command. Une vérification Lean morte passe donc sansTOOL_FAILURE.C:\Users\<user>\AppData\Local\Temp\lean_runner_…) apparaît dans la sortie dee2a38fc5, échappé plusieurs fois à l'intérieur d'une chaîne JSON. Le scan de chemins machine cité par le body de docs(notebooks,#16638): reaccent Lean-9 SK Multi-Agents (filtre print C.2) #16948 ne l'a pas vu.See #16948.