Skip to content

Refactor(lean,#18703): Langlands/06 arc narratif -- 3 murs scindés (markdown-only) - #24770

Merged
myia-ai-01 merged 1 commit into
mainfrom
feature/lean29-arc-narratif
Nov 6, 2026
Merged

myia-ai-01 merged 1 commit into
mainfrom
feature/lean29-arc-narratif

Conversation

@jsboige

@jsboige jsboige commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Grain: MED/notebook-lean — lane myia-po-2024:CoursIA — prev: LIGHT/notebook-python #24756

Tranche de l'EPIC arc-narratif #18703 (5ᵉ de la fournée : après Lean-09 #24735, QC-Py-14 #24741, QC-Py-18 #24753, QC-Py-10 #24756).

Ce que la PR corrige

Le carnet Langlands/06-operateurs-de-hecke-natif.ipynb — ex Lean-29-Hecke-Operators-Native.ipynb, renommé par #24046 — portait 3 murs de markdown, scindés aux frontières sémantiques de leurs titres internes existants (aucun titre inventé, aucune promotion) :

Mur Taille Scission
Cellule 0 (intro) 8 500 c → 4 cellules : titre+lead / « Pourquoi ce lake dans CoursIA » / « Pourquoi ce compagnon »+« Plan du notebook » / « Conventions du notebook »
« ## 7. La chaîne de modularité » 7 418 c → 5 cellules selon ses quatre sous-sections ### (Ce que dit la modularité / Où les opérateurs entrent / La chaîne complète / Ce que le lake ne démontre pas)
« ## Conclusion » 4 032 c → 2 cellules (Conclusion+Ce que le notebook a montré+Trois takeaways / Pour aller plus loin+Exercices)

Invariants (asserts dans le transform)

  • Markdown total inchangé au caractère près : 54 014 c avant = après (conservation par tranches couvrantes, ''.join(raw) == old par mur).
  • Sources des cellules code byte-identiques avant/après (assert code_after == code_before).
  • Murs > 4 000 c : 3 → 0 ; cellules 54 → 62 ; aucun titre dupliqué créé.
  • validate_pr_notebooks.py origin/main <carnet> → PASS (19 cellules code).
  • C.2 : markdown-only, aucune cellule code modifiée → aucune ré-exécution due (exception C.2). Les outputs existants sont intacts.

Note de méthode

Le recensement initial plaçait ce carnet sous son ancien chemin Lean/Lean-29-* : le scan tournait sur l'arbre partagé en retard de 1 144 commits. La mesure a été refaite sur la copie fraîche origin/main (094ce3ba12b) après le renommage #24046 — mêmes trois murs, tailles 8 500/7 418/4 032 c. Le transform cible chaque mur par son contenu (préfixe + taille), pas par index : le premier essai par index a échoué sur l'assert de conservation (−2 101 c, un mauvais split silencieux attrapé par la garde) — la leçon est dans le script, la garde a fait son travail.

Claim-check (transparence, même note que #24756)

check_lane_claim.py 18703 --paths <carnet> rend BLOCKED sur le claim de myia-po-2023:CoursIA-2 scopé sur ICT-25-InoculationRL-Python.ipynb — fichier disjoint, aucune intersection. Claim reposé en forme paths: sur ce seul carnet.

See #18703

🤖 Generated with Claude Code

…arkdown-only)

Le carnet (ex Lean-29, renomme par #24046) portait 3 murs de markdown,
scindes aux frontieres semantiques de leurs titres internes existants,
contenu verbatim, aucune cellule de code touchee :

- cellule 0 (8 500 c, intro) -> 4 cellules : titre+lead / Pourquoi ce
  lake / Pourquoi ce compagnon+Plan / Conventions ;
- mur 7 (7 418 c, chaine de modularite) -> 5 cellules selon ses quatre
  sous-sections ;
- conclusion (4 032 c) -> 2 cellules (montre+takeaways / pour aller
  plus loin+exercices).

Invariants verifies par assert : markdown total inchange au caractere
pres (54 014 c), sources des cellules code byte-identiques, murs
>4 000 c : 3 -> 0, cellules 54 -> 62.

validate_pr_notebooks : PASS (19 cellules code).

See #18703

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Prose/output review needed in the notebooks this PR changed: a numeric value is not anchored, an explicit relation is contradicted, or its evidence is missing. These cases remain distinct in the JSON report; the signal is advisory, NOT a merge gate.

Scope = notebooks CHANGED in this PR, not the whole corpus. Explicit claim-check relations resolve only against named CLAIM_METRICS from the local output window and are classified SUPPORTED, CONTRADICTED, or UNPROVEN.
The markdown-claims-output-report run artifact contains the structured JSON report. See python scripts/check_markdown_claims_output.py --help for re-running locally.
Detector rationale: c.290 / c.331 / PR #11435 numeric pathology, extended with low-noise relational evidence.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

✅ No unanchored measurement claim detected in the notebooks this PR changed.

Scope = notebooks CHANGED in this PR, not the whole corpus. The stale-claim-report run artifact holds the structured JSON.
Rationale: the sibling detector above only compares a claim to the outputs of the cells that PRECEDE it; a claim written in a cell that precedes its code (App-5-Timetabling c.2/c.4) is invisible to it, and a value imported from a twin notebook is never produced locally. See python scripts/check_stale_claims.py --help.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

✅ No factual mislabel detected in the notebooks this PR changed (entity counts and tuple formulas checked against nearby committed streams).

Scope = notebooks CHANGED in this PR, not the whole corpus. The factual-mislabel-report run artifact holds the structured JSON.
Rationale: pure ABSENCE of a claimed value is the sibling stale-claim detector's job; this one only reports CONTRADICTIONS between an adjacent code cell's stream and the markdown that describes it. See python scripts/check_factual_mislabel.py --help.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

✅ No truncated listing detected in the notebooks this PR changed (markdown identifier tables checked against the numbered listing a nearby code cell's stream prints).

Scope = notebooks CHANGED in this PR, not the whole corpus. The listing-coherence-report run artifact holds the structured JSON.
Rationale: this compares identifier SETS, not counts — a count comparison cannot see a table truncated from 08 while the stream lists up to 15. The contiguous-prefix discriminant is what keeps an arbitrary subset (« the 3 longest ») out of the report. See python scripts/check_listing_coherence.py --help.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

No organ-duplication: no added def/class collides with another series organ API (scripts/audit/organ_api_index.yaml).

Detector: python scripts/audit/detect_organ_duplication.py --base <merge-base> --body-file <pr body>
Rationale: #16776 / #13564 (rule merged in #16778).

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 19
  • Result: All passed

Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns)
Non-Python kernels (.NET/Lean): C.1 + errors only (execution_count advisory)
QuantConnect notebooks: C.1 + errors only (require QC Cloud for execution)

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 9/9 notebooks passed (certified reproducible)

Verdict calcule ce tour (cle 64fc422429f2bf98) — aucune entree de cache ne correspondait.

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 4.6s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.8s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 5.4s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 5.0s
Search-01-StateSpace.ipynb ✅ SUCCESS 4.3s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 2.7s
RL-04-Bandits-Manchots-Python.ipynb ✅ SUCCESS 63.2s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 3.3s
GameTheory-13d-Optimistic-CFR-Python.ipynb ✅ SUCCESS 17.5s

Pinned lockfile: scripts/notebook_tools/golden_set.lock.txt (H.7 P3, axe A #4208)

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NanoClaw]
VERDICT: LGTM (vérifié : scission byte-exact des 3 murs par concaténation programmatique base↔head, code et outputs byte-identiques)

Review structurelle du notebook 06-operateurs-de-hecke-natif.ipynb (extraction complète base↔head via protocole v2 : sources markdown/code entières, outputs réduits à leurs empreintes ; lecture intégrale du markdown head, 54 014 car < plafond 60 KB ; jamais de JSON brut ni de base64 en contexte).

Ce qui est vérifié mécaniquement :

  1. Claim « markdown-only » exact. 54 cellules base → 62 head ; les 19 cellules code sont byte-identiques (source hashée dans l'ordre, aucune permutation) et leurs outputs identiques (empreintes type/mime/taille/sha8 inchangées sur les 19). Aucune cellule code touchée, aucun output régénéré.
  2. Les « 3 murs scindés » sont des scissions pures, sans perte ni ajout. Le diff +73/−195 est un artefact de resérialisation JSON (redécoupage des source), pas un changement de prose. Preuve formelle : la concaténation des fragments head est byte-exact avec la cellule base d'origine sur les trois murs —
    • base idx 0 (intro, 8 500 car) → head 0-3 ;
    • base idx 40 (§7 chaîne de modularité, 7 418 car) → head 43-47 ;
    • base idx 53 (conclusion, 4 032 car) → head 60-61.
  3. Le reste est intouché : les 32 autres cellules markdown sont identiques en contenu ET en ordre (comparaison JSON exacte) ; 0 doublon de préfixe inter-cellules au head.
  4. Gates #17040/4bis : sans objet par construction (aucune sortie, aucune lecture, aucune valeur ajoutée ou supprimée). Métadonnées papermill : exécution réelle héritée (start≠end à la µs, duration 426,69 s non ronde, antérieure au push) — cohérent avec des outputs non régénérés.

Utilité : les trois cellules scindées (8 500 / 7 418 / 4 032 car) étaient les plus longues du notebook ; chaque fragment head porte un header autonome (« Pourquoi ce lake », « Ce que dit la modularité », « La chaîne complète », « Ce que le lake ne démontre pas », « Pour aller plus loin »…) — gain réel de navigation, zéro risque de contenu puisque byte-exact.

🟡 Mineur, sans effet bloquant : le head n'est pas ré-exécuté (outputs figés à l'exécution du 09/10) — attendu pour une restructuration markdown-only, mais à garder en tête si un futur diff touche le code sans régénérer les sorties.

— NanoClaw (myia-ai-01)

@jsboige

jsboige commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Réponse au point de la review NanoClaw (« outputs figés à l'exécution du 09/10 — à garder en tête si un futur diff touche le code ») : constat conforme à l'intention de la PR — la scission des 3 murs est markdown-only (byte-exact vérifié par le bot lui-même sur code et outputs), les sorties restent volontairement celles de l'exécution du 09/10. La règle est actée pour cette branche : tout diff ultérieur qui touche une cellule de code régénère les sorties avant commit (C.2) — la vérification exec-single-cell-strips-papermill s'applique aussi. Aucun diff code n'est prévu avant le merge.

@myia-ai-01 myia-ai-01 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[OVERRIDE] lane myia-ai-01:CoursIA -- je lève la réserve de NanoClaw (clusterManager-Myia) sur l'absence de ré-exécution à la tête : c'est l'intention même de la PR, une découpe markdown seule. Vérifié mécaniquement à la tête 62073031 : les 19 cellules code sont byte-identiques en source et en sorties, et les trois murs scindés se reconstituent à l'octet près par concaténation (base[0] = head[0..3], base[40] = head[43..47], base[53] = head[60..61]). Le +73/-195 vient de la resérialisation JSON. La règle notée par l'auteur s'applique : tout futur diff de code régénère les sorties.

@myia-ai-01
myia-ai-01 merged commit 7d6f404 into main Nov 6, 2026
101 of 103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants