Repository navigation
fix(notebook-tools,#8053): Infer-6-Debugging cell 20 — stub-ify viz demo under Exercice 1 header (C.1 content-based) - #8162
Conversation
…Exercice 1 header Cell 20 (1341 chars of complete FactorGraph visualization code) sat between the markdown '## Exercice 1' header (cell 19) and the next section. The leak detector's closest-preceding header attribution flagged it as HIGH (exercice + solution code). Per exercise-example-labeling.md (content-based rule): stub the code, keep the title. Per C.1: TODO etudiant + Console.WriteLine stub pattern, 5 Indices preserved, no NotImplementedError. Re-executed cell 20 via .NET Interactive kernel (jupyter_client) so outputs match the new source. Stop & Repair (mandat 2026-06-22): never scrub outputs by hand; the 224 lines of stale factor-graph SVG/stdout outputs were removed because they corresponded to the OLD code, not the new stub. Detector post-fix: 0 HIGH, 0 MEDIUM. C.2 compliance: 17/17 code cells. See #8053. Supersedes partial-fix approach in PR #8161 (cell reorder alone left the viz under Exercice 1; this PR replaces the viz body with a real stub).
Notebook PR Validation: PASS
Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns) |
Golden-Set Execution (H.7 P3)✅ 8/8 notebooks passed (certified reproducible)
Pinned lockfile: |
|
Verified on origin/main HEAD For ai-01 de-HOLD path on #8084: this PR (#8162) + #8146 (Search-3 cell 64) close the 2 mechanical FP classes per ai-01 DM msg-20260723T050120. Wiring PR #8151 (or #8084) can merge after both are MERGED. Recommendation: merge this PR as canonical; close #8161 as superseded. Co-Authored-By: Claude noreply@anthropic.com |
#8162) -- URGENT fleet blocker (#8255) * fix(security): strip probeAddresses banner from Infer-6 (re-injected by #8162 re-exec) -- fleet blocker unblock Le commit d89a6e2 (#8162, "stub-ify viz demo cell 20", merge aujourd'hui 03:33) a re-execute la cellule 20 de Infer-6-Debugging.ipynb SANS appliquer le strip post-exec. La banniere probeAddresses (.NET Interactive HTTP-bootstrap, kernel-injected, se re-injecte a CHAQUE re-exec .NET) s'est donc retrouvez committed dans l'output data["text/html"] de la cell 20. Fuite de securite sur un repo PUBLIC : la banniere contient un <script> JS qui appelle loadDotnetInteractiveApi() -> probeAddresses([...]) avec la liste COMPLETE des interfaces reseau du runner/contributeur : - IPv6 globalement routable Orange-FR /32 : 2a01:e0a:9d4:f320:6701:5a41:8422:35ad et 2a01:e0a:9d4:f320:7caf:c5ad:fe00:85e5 - IPv6 link-local : fe80::902b:f9f6:2003:66a1, fe80::ae60:2bbf:92f7:4e06, ... - IPv4 LAN : 192.168.0.51, 172.21.192.1, 172.25.0.1 - loopback ::1, 127.0.0.1 BLOCKER FLEET-WIDE : le check CI "probeAddresses banner guard" tourne en --scan-all (pas scope aux fichiers changes), donc cette banniere Infer-6 fait FAILER TOUTES les PR open du cluster (~20+ : #8238/#8239/#8243/#8249/#8253 + tranches cost-frontmatter po-2025 + citations po-2023...). Aucune PR ne peut merger tant qu'Infer-6 porte la banniere. Fix : strip_probe_banner.py --apply (outil dedie, exception Rule-6 sanctionnee -- la banniere est un artefact kernel, PAS un output pedagogique reel ; elle se re-injecte a chaque re-exec .NET, donc le workflow canonique = re-exec PUIS strip, #8162 a oublie le strip). Remplace data["text/html"] de la cell 20 output[0] (display_data) par "" -- structure output preservee, exec_count et autres outputs intacts. Precedents : #6338 (#6309), #6632 (#6312). +1/-1, 1 fichier, 1 champ. validate_pr_notebooks.py PASS (17 cells). Co-Authored-By: Claude <noreply@anthropic.com> * chore(twin-parity,#8057): rebaseline Probas-6 csharp_sha to post-strip Infer-6 blob This PR strips the probeAddresses banner from Infer-6-Debugging (changing its blob). Infer-6 is the C# side of the registered Probas-6 Debugging twin pair, so per the twin-rebaseline rule (#8264, any PR touching a registered twin must rebaseline its last_audit sha) this commit updates Probas-6 csharp_sha to the post-strip blob (21c3019). Verified via local fleet-merge simulation (merge #8267+#8246+#8250+#8255): without this rebaseline, Probas-6 re-drifts after the banner strip (af1ea69 pre-strip -> 21c3019 post-strip). With it, twin-parity goes GREEN (OK=39) once the unblock sequence lands. Note: #8267 also sets Probas-6 csharp_sha (to the pre-strip af1ea69, since it rebaselined before this strip). If #8267 merges first, this line will conflict trivially -- resolve by keeping THIS value (21c3019), which reflects the actual post-strip Infer-6 blob. Co-Authored-By: Claude-Code <noreply@anthropic.com> --------- Co-authored-by: jsboige <jsboige@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
fix(notebook-tools,#8053): Infer-6-Debugging cell 20 — stub-ify viz demo under "Exercice 1" header (C.1 + content-based FP)
Grain: MED/guard — lane myia-po-2023:CoursIA-2 — prev: LIGHT/ledgerSource de l'audit
EPIC #8053 (branch
detect_solution_leaksen CI), cluster #8084/#8146/#8151.ai-01 steer 2026-07-23T05:08Z (DM msg-20260723T050852) : fixer les 2 classes de FP pour de-HOLD #8084, puis rebase + merge.
Le finding
Cellule 18 = vrai stub (TODO 1-5 +
Console.WriteLine("Exercice a completer"))Cellule 19 =
## Exercice 1 : Diagnostic d'un modèle de melange gaussien(markdown)Cellule 20 =
// Visualisation du factor graph du modele EP vs VMP(1341 chars de solution complete : modele, inference, factor graph SVG inline)Le detector attribut le code de cell 20 au header
## Exercice 1(closest-preceding), produisant un HIGH (exercice + solution code) malgre l'absence d'intention pedagogique d'exercice — la viz est une demonstration isolee mal situee entre l'exercice et la suite du notebook.La regle appliquee
exercise-example-labeling.md(content-based, HARD) :C.1 (notebook-conventions) :
raise NotImplementedError/assert False/1/0interdits. Patterns corrects :pass,print("Exercice a completer"),return None,# TODO etudiant.Le fix
Remplacement du corps de cell 20 (1341 chars de viz working) par un stub C.1 conforme :
5 indices pedagogiques preserves (modele canonique, hyperparametres, array indexation, options moteur, helper Graphviz) — l'etudiant a tout le contexte pour implementer.
Re-execution reelle (Stop & Repair, mandat user 2026-06-22)
Le fix modifie le source de cell 20 → re-execution OBLIGATOIRE via .NET Interactive kernel (
jupyter_client.KernelManager(kernel_name='.net-csharp')). JAMAIS hand-editer les outputs (interdit, scrubbing = falsification).Outputs precedents (viz working 1341 chars + factor graph SVG) supprimes car stale : ils correspondent a l'ancien code, plus au nouveau.
Verification post-fix
C.2 : 17/17 cellules code avec
execution_count != nullEToutputs != [].Conformite regles
raise NotImplementedError/ 0assert False/ 01/0dans le fix. Pattern C.1 =Console.WriteLine("Exercice a completer : ...")+ commentaires# TODO etudiant+ 5# Indice.sk-/ghp_/AIzasur le diff).git diff | tr -cd '\r' | wc -c= 0 CR.See #Npartial : ne resout pas l'EPIC [#4208] Brancher en CI la détection sémantique « Exercice contenant sa solution » #8053 entier (reste Search-3 cell 64 + branch detector), doncSee #8053(et nonCloses #8053).Statistiques
MyIA.AI.Notebooks/Probas/Infer/Infer-6-Debugging.ipynb../CoursIA-c8104-infer6-stub-cell20)Reste pour de-HOLD #8084
L'autre classe de FP =
Search-3-Informed.ipynb:cell 64(Exercice 5 commented-solution, 2882 chars de code). Cette PR ne couvre que la moitie Infer-6 — Search-3 sera couvert dans une PR suivante (meme epic #8053, meme lane, scope distinct = atomique).Cross-references
EPIC #8053 (detect_solution_leaks CI) · PR #8084/#8146 (wiring canonique, HOLD pending 2 FP fixes) · PR #8151 (redondant, a closer superseded) · PR #8161 (Mon essai anterieur de reorder cells, fix PARTIEL — reordonneait cells 18↔20 mais la viz restait dans la section Exercice 1). Cette PR rend le fix real et stable (stub-ification + re-exec).