Skip to content

fix(gt-4c,#6927): Plotly CDN-script -> SVG inline Overlay (Brouwer trajectories) - #6972

Merged
myia-ai-01 merged 1 commit into
mainfrom
feature/gametheory-csharp-6927-v2
Jul 17, 2026
Merged

myia-ai-01 merged 1 commit into
mainfrom
feature/gametheory-csharp-6927-v2

Conversation

@jsboige

@jsboige jsboige commented Jul 17, 2026

Copy link
Copy Markdown
Owner

What

GameTheory-4c-NashExistence-Csharp.ipynb cell[10]: replace the blank-in-static Plotly chart (<script src=cdn.plot.ly>, renders WHITE on GitHub/nbviewer/offline since the sandbox strips the script) with an inline static SVG via the canon helper SvgChartHelper.Overlay() (#6942 + #6958 MERGED).

The chart is a 2D-simplex best-response dynamics illustration of Brouwer fixed-point theorem (Matching Pennies): 3 series sharing numeric axes P(Heads) j1 / j2:

  • 2 trajectories (depart (0.9, 0.1) and (0.1, 0.9)), TraceStyle.LineMarkers
  • Nash equilibrium point (0.5, 0.5), red TraceStyle.Markers

All converge to (0.5, 0.5) — the Nash equilibrium. Overlay() is the right primitive here (shared numeric X axis), vs Bar() used in #6967 DecInfer-7 (categorical axes).

#load convention (cross-family, documented firsthand)

Bare #load "SvgChartHelper.cs" (canon, byte-identical pattern to merged DecInfer-7 #6967). .NET Interactive #load resolves relative to the kernel CWD = the notebook directory (empirically verified: probe shows CWD=<notebook-dir>; bare #load from GameTheory/ → CS1504 Fichier introuvable). The helper lives in Probas/Infer/, so this cross-family notebook is executed with kernel CWD = MyIA.AI.Notebooks/Probas/Infer/ (Python ExecutePreprocessor resources.metadata.path) — the cluster convention (same mechanism that lets DecInfer-7 #load the helper bare). Closes the c.561 root-fragility question empirically: #load is CWD-rooted, not global-rooted.

Gates verified firsthand

Gate Result
Real .net-csharp exec (H.4) exec_count=5, 0 errors, SVG out_len=9648
detect_svg_decimal_commas.py (#6959, merge-gate) 0 defects rc=0 (helper F()=InvariantCulture → decimal-DOT by construction)
check_plotly_static_risk.py (#6931) GT-4c no longer risky (removed from list)
cdn.plot.ly in output False
probeAddresses banner (kernel-inherent) absent from cell[10] output
3 series present in legend True (Depart (0.9,0.1), Depart (0.1,0.9), Nash (0.5,0.5))
C.3 scope only cell[10] changed (source+output); all other cells byte-identical to main
Catalog byte-identity (R1) 0 diff on COURSE_CATALOG.generated.*; README CATALOG-STATUS untouched
Secrets / NotImplementedError none

Verdict: SOTA-OK (#3801 Prong-A)

Real inline SVG, zero-dependency (no NuGet, no CDN, no kaleido/node) — renders on GitHub/nbviewer/offline. Not a degraded workaround.

Notes

🤖 po-2025 (GLM no-vision lane)

…ajectories)

GameTheory-4c-NashExistence cell[10]: replace blank-in-static Plotly CDN
<script src=cdn.plot.ly> with SvgChartHelper.Overlay() (#6942 + #6958 MERGED),
rendering 3 series sharing numeric axes P(Heads) j1 / j2: 2 best-response
trajectories (depart 0.9/0.1 and 0.1/0.9, LineMarkers) converging to the Nash
equilibrium point (0.5, 0.5, red Markers) -- illustration of Brouwer fixed-point.

#load convention: bare '#load "SvgChartHelper.cs"' (canon, matches DecInfer-7
#6967). Resolves from kernel CWD = MyIA.AI.Notebooks/Probas/Infer/ (cluster
convention; .NET Interactive #load resolves relative to kernel CWD = notebook
dir, so cross-family notebooks execute with path=Infer/).

See #6927 (partial of epic, not Closes).

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

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 2
  • Code cells validated: 18
  • 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

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 6.4s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.5s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 4.0s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 5.0s
Search-1-StateSpace.ipynb ✅ SUCCESS 4.1s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 3.0s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 26.4s
GameTheory-4c-NashExistence-Python.ipynb ✅ SUCCESS 3.6s

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

@myia-ai-01
myia-ai-01 merged commit fd9f87a into main Jul 17, 2026
21 checks passed
jsboige added a commit that referenced this pull request Jul 17, 2026
…ance to helper-load root cause (#6978)

ai-01 corrected the svg-6927-canon point 4 (2026-07-17): display() RENDS when
the helper is loaded -- the merged #6967 (DecInfer-7 36964bf) cell[32] uses
display(SvgChartHelper...) and captures the <svg> (26 outputs). The earlier
canon rule "derniere expression PAS display()" was WRONG. The real white-figure
discriminator is helper/Formatter.Register NOT loaded (#load not resolving from
the kernel real cwd).

The detector merged in #6971 still DETECTS correctly (its 3-condition signature
ran + intended-chart + outputs==[] = white figure is sound), but its remediation
guidance told workers the wrong fix ("make chart last expression, drop
display()"). Correct the 4 wrong prose blocks (docstring canon rule 1, portee
cluster, Ce qu il NE corrige PAS, and the _human_report CI FIX string) to lead
with the real fix: make the #load resolve (helper in notebook dir, OR relative
#load "../<family>/SvgChartHelper.cs", OR re-exec via ExecutePreprocessor with
resources.metadata.path = helper dir per the durable lesson from #6972), then
re-execute.

Detection logic (regexes, detect_cell, scan_notebook, main) UNTOUCHED. 19/19
unit tests pass.

See #3801. See #6927.

Co-authored-by: Claude-Code <noreply@anthropic.com>
@jsboige
jsboige deleted the feature/gametheory-csharp-6927-v2 branch September 2, 2026 13:14
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.

2 participants