Repository navigation
rename(#16231): Lean socle -- 12 carnets Lean-01..09b au canon (padding + suffixe de noyau) - #18199
Conversation
…le notebooks
The fix-hr-separator pre-commit hook rewrites decorative '---' openers
(yaml_block_open_no_close) in any staged notebook. Staging the socle
renames made it fire inside the pure git-mv commit and fail it. Applying it
first, at the old paths, keeps the rename commit a pure R100.
Markdown cells only ('---' -> '***', same rendered rule): 6 notebooks,
24 lines; code sources and outputs identical once parsed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The check-subprocess-encoding hook (#13140) refuses any staged .py with a text=True subprocess call lacking encoding=. The socle rename rewrites notebook paths in this script, which stages it and would fail the rename's referent commit. Adding encoding="utf-8", errors="replace" is the fix the hook prescribes (#12811: cp1252 hosts crash on UTF-8 payloads). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Table : C:/Users/MYIA/AppData/Local/Temp/claude/d--CoursIA/bc377615-6e5e-40cd-b0b3-99a8ce1ce438/scratchpad/lean_socle.tsv, pilotee par rename_notebooks.py.
Cellules de code citees : jamais reecrites (re-execution C.2 due). Sorties commitees : jamais touchees.
rename_notebooks.py refuses a notebook whose code cells cite an old name (I2/I3: code and outputs are never rewritten, they need a re-execution). Lean-01-Setup (cells 6, 11), Lean-05-Tactics (cell 62) and Lean-10-LeanDojo (cell 63) are in that case. Their markdown cells and top-level metadata are rewritten here line by line, with the tool's structural guard afterwards: code sources, outputs and execution_count identical once parsed (72 replacements). The printed names in code and outputs stay as they are; their update and re-execution are tracked in #18197. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
After the zero-pad rename, `--filter Lean-2` no longer matched Lean-02-Dependent-Types-Lean.ipynb (plain substring test), and four TestFilterNotebooks tests failed. Leading zeros after a hyphen are now ignored on both sides, so Lean-2 and Lean-02 select the same notebook; matching is otherwise unchanged. test_verify_lean: 59 passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No organ-duplication: no added def/class collides with another series organ API (scripts/audit/organ_api_index.yaml). Detector: |
|
G-VAR-2/3 GENRE signals (advisory, non bloquant, #10020).
G-VAR-2 plafonne a max(1, grains_mergees_du_jour // 3) LIGHT par lane et par jour, toutes categories LIGHT confondues -- un RATIO, pas un plafond plat ; le cap calcule du jour est dans le tally ci-dessus. G-VAR-3 interdit deux genres LIGHT consecutifs. Les signaux ci-dessus rendent le fait VISIBLE (labels |
Notebook outputs-required (H.4 schema): PASS (every code cell carries an
|
Golden-Set Execution (H.7 P3)✅ 8/8 notebooks passed (certified reproducible)
Pinned lockfile: |
|
Scope = notebooks CHANGED in this PR, not the whole corpus. Explicit |
Notebook PR Validation: PASS
Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns) |
Path-collision (organ #13359/#13615)Cette PR #18199 (
|
|
[ADJOINT PREFLIGHT] Secretaire verificateur (myia-po-2026:CoursIA-3), 2026-09-29T14:53:18Z -- Re-stamp READY post-fix GH-IDENTITY-line-1. Update-branch deja applique.
|
|
[ADJOINT PREFLIGHT] Secretaire verificateur (myia-po-2026:CoursIA-3), 2026-09-29T14:55:58Z -- Re-stamp READY post-fix GH-IDENTITY-line-1. Update-branch deja applique.
|
|
[ADJOINT PREFLIGHT] Secretaire verificateur (myia-po-2026:CoursIA-3), 2026-09-29T14:58:25Z -- BLOCKED-cancelled : jambe 'Papermill ratchet (base vs PR)' cancelled (timeout 10 min, 10m09s, declared timeout-minutes: 10). Skill item 5 : 'rerun the CHILD run that owns the job (gh run rerun)'.
|
|
[ADJOINT PREFLIGHT] Secretaire verificateur (myia-po-2026:CoursIA-3), 2026-09-29T16:24:16Z -- Re-stamp READY post-DWELL-leve (PR gate SUCCESS a 16:22:49Z, rerun ai-01 a 16:21:56Z).
|
|
[ADJOINT PREFLIGHT] Dossier urgent demande par ai-01 (DM 15:04Z, reunion user 18:00Z). Tete exacte 9e457fa, PR porteuse lane myia-ai-01:CoursIA -- attestation tierce valide. Renommage zero-pad Lean-1..9 -> Lean-01..09 (67 fichiers +922/-906), aucun numero ne change, label translation-override justifie (c.5892197424). Mesures firsthand : fold latest-wins vert, 0 rouge, 0 jambe en cours (le rouge Papermill ratchet etait un timeout checkout 8 min sur runner myia-po-2026-wsl-3, rejeu 15:05Z passe -- ratchet 15/15) ; B.0 rc=0 ; merge-tree mesure par ai-01 sans conflit dans les deux ordres, 0 lien casse sur l arbre combine. mergeable UNKNOWN au releve (flap connu). Merge et lecture finale a ai-01. |
…gen (1182) Conflict on _quarto.yml resolved by taking main side then regenerating via scripts/regen_quarto_render.py: 1182 rendered notebooks = previous 1181 (58 hr-unblocked + refresh backlog) + Lean-20 capstone from #18409, with Lean socle renames from #18199 incorporated. See #18421 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…(voie A) (#18455) * fix(lean,#18437): Lean-05 c.62 -- source 'Lean-6' -> 'Lean-06-Mathlib-Essentials-Lean' (alignement post-#18199) Le commentaire source de la cellule 62 de Lean-05-Tactics-Lean.ipynb mentionnait l'ancien nom Lean-6-Mathlib-Essentials (avant #18199, renommage canon de la serie). Le commentaire est corrige vers le nom canon Lean-06-Mathlib-Essentials-Lean. Les sorties HTML alectryon et text/plain de la cellule 62 restent figees sur l'ancien nom jusqu'a re-execution kernel (voie A). Voir issue de suivi #18453. Note : la regle Stop & Repair (regle 6 secrets-hygiene) interdit de hand-editer la sortie figee ; la voie choisie est (a) modifier la source, (b) ouvrir issue de suivi pour la re-execution kernel (voie A) sur machine equipee du kernel lean4 natif. Grain: DEEP/lean -- lane myia-po-2024:CoursIA-2 -- prev: DEEP/lean c.1311 Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> * fix(lean,#18437): re-execute Lean-05 on ai-01 (lean4 kernel, v4.30.0) -- cell 62 output resynced Voie A of #18437, completing this PR: the cell 62 source rename is now matched by its output. Full papermill run on ai-01, kernel lean4 (toolchain pinned to leanprover/lean4:v4.30.0 for the run, the version the repl binary is built against; stable now resolves to v4.34.1, on which repl fails to parse every cell). - 34/34 code cells with integer execution_count, 0 error outputs - cell 62: new name present in output, old name absent - the 33 other code cells: outputs byte-identical to the previous run - metadata.papermill paths normalised to basenames Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
Lean-01 cells 7 and 12 listed the pre-#18199 notebook names (Lean-2..9 without zero-padding or kernel suffix). Re-executed the python3 cells so their outputs reflect the new names (Lean-02..09b), and corrected the single stale reference in Lean-10 cell 63 (Lean-7-LLM-Integration -> Lean-07-LLM-Integration-Lean-Python). Cell 63 was a pseudo-code snippet referencing non-imported Dojo / ProofFinished / LeanError symbols, so it is now rendered as a markdown fenced block rather than a code cell that never executed under python3-wsl. Lean-05 cell 62 still carries the old name in its alectryon HTML output; that cell is only re-generable on a Lean 4 + Mathlib kernel, so the fix is tracked separately in #18437. Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
…025) Arbitrage DM ai01-po2023c2-18440-narrow-20261001 @16:12Z 2026-10-01 : > **#18440 reste ouverte et se recentre sur Lean-10.** Concretement : > 1. remettre MyIA.AI.Notebooks/SymbolicAI/Lean/Lean-01-Setup-Lean-Python.ipynb > a l'etat de origin/main sur ta branche, en un commit dedie Lean-01-Setup-Lean-Python.ipynb retabli a l'identique de origin/main (tete 78cf736 -- post-#18199 Lean rename, sans kernelspec patch ni re-papermill canonique). Le correctif kernelspec + re-papermill canonique est porte par #18669 chez po-2025:CoursIA-2, qui est CLEAN. #18440 ne touche plus que Lean-10-LeanDojo.ipynb. Echeance 02/10 14:00Z : sans geste d'ici la, Lean-10 passe a po-2025:CoursIA et #18440 fermee avec credit (le revert reste par contre, suivi seul). Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> Grain: MED/notebook-lean -- lane myia-po-2023:CoursIA-2 -- prev: MED/notebook-lean #18440-orig
… re-exec C.2 (1/2) (#18669) * fix(lean,#18197): Lean-01 cellules 7+12 -- noms post-renumerotation + re-exec C.2 Les 8 references de cellules de code (liste des carnets + boite finale) citent les noms pre-#18199 ; remplacees par le canon zero-padded avec suffixe de noyau. Re-execution papermill end-to-end (kernel python3, 57 s, 8/8 cellules, 0 erreur, exec_counts 1..8) -- les sorties affichent les nouveaux noms. Lean-05 : deja propre (verifie, grep 0) -- hors perimetre. Lean-10 : suit apres reparation d'env (lean_dojo absent du venv WSL). See #18197 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Fix: re-exec Lean-01 sous Python 3.11 canonique (kernel drift + ratchet output) - kernel python3 (Store 3.13) -> py311-lean 3.11.16, meme major.minor que la base 3.11.9 - venv WSL repare : ligne parasite export PATH en fin d'activate ecrasait le PATH du venv (pip systeme -> PEP 668) ; retiree, backup activate.bak-pathfix-20261001 - sorties regenerees : cellule 22 retrouve [OK] sans banniere ERREUR ni chemin machine Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(lean,#18669): re-exec depuis le dossier du notebook + affichage env hors home (review ai-01 5381446402) - Re-execution via batch_reexecute.py --cwd notebook : la cellule ea71e7c2 retrouve scripts/lean4-kernel-wrapper.py au premier cran de remontee depuis Lean/ ([+] Wrapper robuste deploye, [+] Kernel cree), le chemin machine D:/dev/scripts/... disparait de la sortie. - Chaine WSL elan default passee a v4.33.0 (regle F, review pt 2) : la sonde affiche Lean 4.33.0 (4.11.0 absent). - Cellule 981fa813 : l'affichage raccourcit desormais aussi par sys.prefix (env hors home -> ~/nom-env) ; ce run trouve lean4_jupyter sous home (Store python313) -> affiche ~/AppData/... ; C:/ProgramData absent. - Census sorties base->tete : 6152 -> 5865 caracteres (-287) = suppression de la banniere d'echec '[!] Wrapper script not found' ; 0 output erreur. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…n-10 seul) (#18440) * fix(lean,#18420): align print references with #18199 Lean rename Lean-01 cells 7 and 12 listed the pre-#18199 notebook names (Lean-2..9 without zero-padding or kernel suffix). Re-executed the python3 cells so their outputs reflect the new names (Lean-02..09b), and corrected the single stale reference in Lean-10 cell 63 (Lean-7-LLM-Integration -> Lean-07-LLM-Integration-Lean-Python). Cell 63 was a pseudo-code snippet referencing non-imported Dojo / ProofFinished / LeanError symbols, so it is now rendered as a markdown fenced block rather than a code cell that never executed under python3-wsl. Lean-05 cell 62 still carries the old name in its alectryon HTML output; that cell is only re-generable on a Lean 4 + Mathlib kernel, so the fix is tracked separately in #18437. Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> * fix(lean,#18440): re-papermill with coursia-ml-training (kernel drift + papermill ratchet) Re-papermilled both Lean-01-Setup-Lean-Python.ipynb and Lean-10-LeanDojo.ipynb via papermill 2.7.0 with the coursia-ml-training kernel (Python 3.11.16). - metadata.papermill block rewrites fresh (BLOCK_MOVED, not STALE_BLOCK) - language_info.version bumps from 3.11.9 to 3.11.16 (patch drift only, #17371) - kernel-suffix-canon-guard: OK - papermill ratchet: 0 regressions (was 2 STALE_BLOCK) Fail-by-design (documented in body, ack reviewer required): - Split-reading ratchet: SECOND_READING on Lean-10 c.63/c.64 (md conversion) - Exec-sequence ratchet: GAP on Lean-10 c.24 (md conversion) - Notebook catalog drift: GitHub checkout error (submodules not init) - PR gate: aggregates above Refs: Tell c.946-L3 ★★ (papermill metadata block rewrite), Tell c.950-L3 ★★ (own-comment auto-flag neutralization) Grain: MED/notebook-lean -- lane myia-po-2023:CoursIA-2 -- prev: LIGHT/cross-lane-signal c.946 Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> * fix(lean,#18440): re-papermill Lean-01+Lean-10 on python3 (3.13.3) to match base kernel Cherry-picked the c.950 commit (381b4bd) which re-papermilled on coursia-ml-training (3.11.16), then re-papermilled both notebooks on python3 (3.13.3) to match the base language_info.version. Fixes kernel-drift guard red on #18440. Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> * fix(lean,#18440): re-papermill Lean-01+Lean-10 on WSL Python 3.12.3 to match base kernel c.953 first pass used python3 (3.13.3) which still triggered guard: Lean base is python3-wsl (3.12.3). Re-papermilled via WSL coursia-venv (Python 3.12.3) so language_info.version matches the base kernel exactly. Lean-01 kernelspec.name patched python3 -> python3-wsl (matches base). Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> * fix(lean,#18440): patch Lean-01 kernelspec.name to python3 (base) + re-papermill on coursia-ml-training (3.11.16, base=3.11.9 patch drift tolere par #17371) Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> * Revert: Lean-01 kernelspec + re-papermill (transfere #18669 chez po-2025) Arbitrage DM ai01-po2023c2-18440-narrow-20261001 @16:12Z 2026-10-01 : > **#18440 reste ouverte et se recentre sur Lean-10.** Concretement : > 1. remettre MyIA.AI.Notebooks/SymbolicAI/Lean/Lean-01-Setup-Lean-Python.ipynb > a l'etat de origin/main sur ta branche, en un commit dedie Lean-01-Setup-Lean-Python.ipynb retabli a l'identique de origin/main (tete 78cf736 -- post-#18199 Lean rename, sans kernelspec patch ni re-papermill canonique). Le correctif kernelspec + re-papermill canonique est porte par #18669 chez po-2025:CoursIA-2, qui est CLEAN. #18440 ne touche plus que Lean-10-LeanDojo.ipynb. Echeance 02/10 14:00Z : sans geste d'ici la, Lean-10 passe a po-2025:CoursIA et #18440 fermee avec credit (le revert reste par contre, suivi seul). Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> Grain: MED/notebook-lean -- lane myia-po-2023:CoursIA-2 -- prev: MED/notebook-lean #18440-orig * fix(lean,#18440): carve-out Split-reading -- fusionner pseudo-code + interpretation Pseudo-code dans cell[62] DMai-01 02:40Z (sujet `ai01-po2023c2-18440-splitreading-20261002`) confirme : le rouge split-reading cellule 3bd10c11 (code -> markdown) de PR #18440 est REEL, pas un flake. Echeance 14:00Z. Option 2 choisie : motiver la conversion dans le body et fusionner les lectures 62-64. Application du mandat ('si on rajoute une lecture, on modifie le paragraphe existant') : fusion de cell[62] (intro Exemple Complet) + cell[63] (pseudo-code, ex-c) + cell[64] (interpretation Pseudo-code, ex-c) en une seule cellule markdown. - cellule 63 (ex-3bd10c11, pseudo-code ```python```) stand-alone collapse en markdown dans cell[62] - cellule 64 (ex-pvi42j6do5, Interpretation : Pattern d'Integration LLM) fusionne en markdown dans cell[62] - cellule 62 (id 51a54161, type markdown, intro Exemple Complet) absorbe le contenu des 2 voisines Validation : - 75 -> 73 cells (decrement 2) - Split-reading ratchet attendu vert apres cycle a 3 markdown consecutifs -> merge inferieur - Markdown only change -> C.2 / papermill re-execution N/A (code cell source only) - Anti-regression : aucun code de production (preuves, fonctions) n'est remplace par sorry/stub, aucune cellule code touchee Refs #18440 (split-reading cellule 3bd10c11), DM ai-01 02:40Z, echeance 14:00Z 2026-10-02. Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
Grain: MED/refactor -- lane myia-ai-01:CoursIA -- prev: MED/tooling #18194
Résumé
Tranche socle de la série Lean (#17545), au canon du chantier #16231 : les douze carnets
Lean-1àLean-9breçoivent leur index à deux chiffres et leur suffixe de noyau. Aucun numéro ne change, l'ordre pédagogique 1 → 9 reste celui d'aujourd'hui ; le padding zéro ne compte pas comme une renumérotation (notebook-accretion-numbering§8).Table de correspondance postée avant la PR, avec la preuve de chaque suffixe lue dans le code : #17545, commentaire 5866513473. Claim sur les 12 chemins dans le même commentaire.
See #17545 (tranche socle ; sous-séries et descentes en dossiers traitées ailleurs, dont #18015). See #16231.
Ordre de merge
Cette PR ne se merge qu'après #18047 (Lean-1) et #18094 (Lean-4), qui modifient deux des carnets renommés. Après leur merge :
git merge origin/main(renommage + modification se fusionnent par détection de renommage), puis nouveau dry-run de l'outil sur la table pour attraper toute référence ajoutée entre-temps.Ce que fait la PR
8e26cb7d3afix-hr-separatorréécrit les séparateurs---de tout carnet indexé ; il faisait échouer le commit desgit mv. Appliqué d'abord, aux anciens chemins : 6 carnets, cellules markdown seules (---→***, même rendu), code et sorties identiques une fois parsés2964cd4ce0encoding="utf-8"sur un appel descripts/lean/smoke_test_epita_is.py— le hookcheck-subprocess-encodingrefuse tout script indexé sans lui, et l'outil y réécrit des chemins9875e77da1git mvpurs, 12 carnets, 12 R100815b8835d4rename_notebooks.py(63 fichiers, dontdocs/reference/rename-ledger.tsv)d5ada0dbb461a425fd28verify_lean.py --filterignore le padding :--filter Lean-2ne trouvait plusLean-02-...(4 tests rouges) ;Lean-2etLean-02sélectionnent désormais le même carnetOutil utilisé :
rename_notebooks.pyà la tête de #18194. Ses commits de ce matin évitent trois dégâts que la version demainaurait faits ici :docs/archiveetdocs/ledgers;--self-testde l'organe output-collapse, qui relit le carnetLean-7b-Examples.ipynbsous son ancien nom au SHA6b327a9bf.Fichiers refusés par l'outil — passe manuelle déclarée
rename_notebooks.pyrefuse un carnet dont une cellule de code cite un ancien nom (I2/I3 : il ne réécrit jamais du code ni une sortie, parce que changer le code impose une ré-exécution). Trois carnets sont dans ce cas :Lean-01-Setup-Lean-Python.ipynbprint(...)des nomsLean-2àLean-8(cellule 6),Lean-2(cellule 11)Lean-05-Tactics-Lean.ipynb-- ... Lean-6-Mathlib-Essentials.Lean-10-LeanDojo.ipynbprint("\nVoir Lean-7-LLM-Integration.ipynb ...")Leurs cellules markdown et leur metadata ont été mises à jour par un passage ligne à ligne, avec les mêmes gardes que l'outil après coup (sources de code, sorties et
execution_countidentiques à l'octet près une fois parsés ; 72 remplacements). Le code et les sorties restent inchangés : ce sont des textes affichés, pas des liens, et leur mise à jour exige une ré-exécution. Elle est tracée dans #18197, ouverte avant cette PR.Preuves
maincheck_kernel_suffix_canoncanonical=12check_duplicate_notebook_indexcheck_notebook_navlinks --check --tracked-onlycheck_series_zero_padcheck_output_collapse --self-test56d98429aintactpytest test_count_exercises + test_scrub_papermill_pathspytest Lean/scripts/tests/test_verify_lean.pycheck_link_label_agreement --failtweety-3)check_twin_parity --check157 | OK=154 DRIFT=3, mêmes comptesHooks pre-commit passés sur les 26 carnets et les 63 référents avant l'application (
rc=0).Plus aucun carnet
Lean-<chiffre>-à la racine de la série : Lean pourra être déclaré danszero_pad_series.json(adopted) une fois cette PR mergée — PR séparée, pour ne pas mêler le registre au renommage.Catalogue
COURSE_CATALOG.generated.{json,md}: 0 fichier dans le diff — il se régénère après merge. L'outil les aurait réécrits à la main, ainsi quedocs/archiveetdocs/ledgers: défaut corrigé dans #18194 (commit8f6395a6ce) avant cette application.🤖 Generated with Claude Code