Skip to content

fix(search,#710): make MGS-15-LandscapeAnalysis notebook portable (relative paths) - #7608

Merged
jsboige merged 2 commits into
mainfrom
fix/search-mgs15-portable-710
Jul 20, 2026
Merged

jsboige merged 2 commits into
mainfrom
fix/search-mgs15-portable-710

Conversation

@jsboige

@jsboige jsboige commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Apply the #710 portability pattern to MGS-15-LandscapeAnalysis.ipynb — the next notebook in the Search Part4-Metaheuristics portability sweep (cf #7595 MGS-7-TSP, #7598 MGS-10-CenterBias, #7603 MGS-19, #7605 MGS-18, #7607 MGS-16). The notebook's wiring cell had 8 hardcoded #r "c:/dev/MetaGeneticSharp/..." references that only worked on a specific developer machine.

Change

Part4-Metaheuristics/MGS-15-LandscapeAnalysis.ipynb — wiring cell:

  • #r "c:/dev/MetaGeneticSharp/src/.../GeneticSharp.Infrastructure.Framework.dll" × 8 lines
  • → #r "../MetaGeneticSharp/src/.../GeneticSharp.Infrastructure.Framework.dll" × 8 lines

Forward-slash form (../MetaGeneticSharp/) chosen for true cross-platform portability (the actual goal of #710 — not just Windows-relative), matching the canonical form already on main for MGS-3-Eukaryote's wiring cell. .NET #r accepts forward slashes on Windows. Build config stays Debug (matches canonical, minimum surface change). MetaGeneticSharp submodule pointer NOT bumped (no submodule content change).

Execution proof (§D / C.2 / H.1)

Re-executed end-to-end via .net-csharp kernel (Jupyter nbconvert), after building MetaGeneticSharp.sln in Debug (0 errors):

Check Result
dotnet build MetaGeneticSharp.sln -c Debug 0 errors
Code cells executed 10/10, execution_count != null for all
Error outputs 0
Wiring cell output "Benchmarks dispos : SphereFitness, RastriginFitness, AckleyFitness" — proves the relative ../MetaGeneticSharp/ paths load the DLLs (benchmark types come from the loaded assemblies)
End-to-end (papermill-equivalent) nbconvert --execute --inplace SUCCESS (178941 bytes written, landscape analysis figures regenerated)
`grep -nE "raise NotImplementedError assert False
Anti-regression (no # Solution / # Exemple résolu cell removed) none removed

Outputs regenerated — landscape analysis produces fitness/topology figures that vary with the run, so the diff includes the regenerated landscape figures (expected and required for a re-executed code cell per C.2). The source-code change is exactly 8 #r lines.

Scope (R3 atomicity)

1 file, 1 notebook, 1 subject — portable-path fix for MGS-15. Catalog byte-identical to main.

See #710

…lative paths)

Apply the #710 portability pattern (cf #7595 MGS-7, #7598 MGS-10, #7603
MGS-19, #7605 MGS-18, #7607 MGS-16) to MGS-15-LandscapeAnalysis.ipynb:
8 hardcoded '#r' references c:/dev/MetaGeneticSharp/... ->
../MetaGeneticSharp/... (forward-slash, cross-platform portable,
matching MGS-3 canonical form on main).

Re-executed end-to-end via .net-csharp kernel (MetaGeneticSharp.sln Debug
built, 0 errors): 10/10 code cells, exec_count != null, 0 errors, wiring
cell emits 'Benchmarks dispos : SphereFitness, RastriginFitness, AckleyFitness'
proving the relative paths load. Landscape analysis figures regenerated (C.2).

Build config = Debug maintained. Submodule pointer NOT bumped.

See #710

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

github-actions Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 8/8 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 5.9s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.5s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 4.1s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 5.3s
Search-1-StateSpace.ipynb ✅ SUCCESS 4.3s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 3.0s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 27.0s
GameTheory-4c-NashExistence-Python.ipynb ✅ SUCCESS 3.7s

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

@github-actions

github-actions Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 2
  • 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)

@jsboige jsboige left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

{
"event": "COMMENT",
"body": "[Hermes] Review — MGS-15 LandscapeAnalysis portable (#7608)\n\nVerification artefacts:\n- Diff read: single notebook MGS-15-LandscapeAnalysis.ipynb, +163/-48. The substantive code change is making paths relative (per #710) — the bulk of additions are re-executed .NET polyglot outputs (HTML/JS probing scaffolding auto-generated by the dotnet-interactive kernel).\n- Execution: execution_count present on all code cells, timestamps fresh (2026-07-20), no NotImplementedError/sorry-scan hits.\n\n🟡 Concern (non-blocking, privacy): notebook output leaks residential network info.\nThe .NET interactive HTML output at the probeAddresses([...]) call embeds the author's live network interfaces captured at execution time:\n- IPv6 FAI prefix 2a01:e0a:9d4:f320:... (Free/Proxad France subscriber)\n- LAN gateway http://192.168.0.51:2048/, 172.25.160.1:2048, 172.25.0.1:2048\n- Link-local fe80:: addresses with interface indices (%14, %44, %20)\n\nThis is auto-generated by the kernel at runtime (not hardcoded source), so it's not a credential leak and doesn't fail the standard TOKEN|API_KEY|SECRET scan. But it does expose the author's home network topology + ISP subscriber prefix in a public pedagogical repo. For a teaching notebook that students will re-execute, each re-execution will re-leak the runner's own interfaces.\n\nSuggestion (optional, non-blocking): clear the .NET interactive discovery HTML output before commit (keep the code cell, drop the captured probeAddresses list from outputs), or document that students should re-execute to overwrite. Not a merge blocker — flagging for awareness given the series is large and the same pattern likely recurs across MGS-3/4/6/11-19 polyglot notebooks."
}

…s output (banner-guard)

.NET Interactive bootstrap re-injects the probeAddresses banner on every
re-exec; sanctioned strip via scripts/notebook_tools/strip_probe_banner.py
--apply (secrets-hygiene regle 6, not hand-scrubbing). Content unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jsboige
jsboige merged commit 46c25d1 into main Jul 20, 2026
26 checks passed
@jsboige
jsboige deleted the fix/search-mgs15-portable-710 branch September 2, 2026 13:17
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.

1 participant