Skip to content

Fix(gametheory,#14442): 15d encoding subprocess + re-exec -- ref issue source retiree - #20027

Merged
myia-ai-01 merged 1 commit into
mainfrom
fix/14442-15d-subprocess-encoding
Oct 9, 2026
Merged

myia-ai-01 merged 1 commit into
mainfrom
fix/14442-15d-subprocess-encoding

Conversation

@jsboige

@jsboige jsboige commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Grain: MED/notebook-python — lane myia-po-2025:CoursIA — prev: MED/notebook-python #20026

Ce que cette PR livre — 15d-Mobius-Coalitions, le carnet sorti de la tranche 2a

#20026 avait laissé 15d de côté : son hook pre-commit check-subprocess-encoding échoue sur un défaut préexistant sur main (cellule 9, id 295b83c6 : subprocess.run(..., text=True) sans encoding= — vérifié identique sur origin/main, #12811). Corriger exigeait de toucher une cellule code → re-exécution C.2 → PR dédiée. La voici.

Trois changements, un carnet

Cellule Type Geste
9 (code) fix réel subprocess.run(['python', str(count_script), '--json'], capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=180) — l'appel à count_code_sorry.py ne crash plus sur hôte cp1252 face à un payload UTF-8
0 (markdown) sweep #14442 ligne « Issue source : #12238 » retirée — même règle que la tranche 2a (#20026), la provenance d'issue n'est pas du parcours pédagogique
10 (markdown) alignement prose « le grep naif compte 32 » → 36 — valeur citée alignée sur la mesure fraîche de la cellule 9

Re-exécution (C.2)

  • wsl_papermill.py execute --kernel python3 --mode native --timeout 600 : 9/9 cellules, 0 erreur, 44,9 s (base 3.13.7 → head 3.13.14, même majeur.mineur).
  • execution_count 1-9 et outputs non vides sur les 9 cellules code.

Diagnostic dérive

CAUSE_FIXED (la dérive de sortie est la conséquence attendue du lake qui a grandi sur main, pas d'un défaut du carnet) :

  • (a) env/kernel : aucune — même kernel python3, même majeur.mineur.
  • Mesures fraîches contre le lake courant : Shapley.lean 2024 → 2028 lignes (cellule 8), 49 → 60 sources Lean analysees par le rapport de comptage, naive_sorry 32 → 36, distinct_code_sorry stable à 1, sorries réels localisés Folk.lean:127 → 544 (+ _en:144 → 560, le fichier a grandi, la preuve n'a pas bougé).
  • La prose de la cellule 10 qui citait « 32 » est alignée sur le 36 mesuré — jamais un byte-surgical sans re-execution (règle [#4208] Audit d'échantillonnage sémantique — claims↔outputs, env vierge, revue-domaine (≥5%/famille) #8052 : le nombre vient de la sortie fraîche).

Vérifications

  • Diff sémantique par cellule (comparaison des sources base ↔ head) : exactement les 3 changements du tableau, rien d'autre — le churn de 134/136 lignes du diff brut = renumérotation des outputs (stream splitté en 2 blocs sur la cellule 9) + language_info + papermill metadata (scrubbée par hook au commit).
  • Hooks pre-commit : tous verts, dont check-subprocess-encoding (le bloqueur d'origine) et H.3.
  • Aucune prose ne cite les anciennes valeurs résiduelles (« 2024 lignes » : 0 occurrence).
  • Twin parity : 15d n'a pas de jumeau enregistré (vérifié au pli Fix(gametheory,#14442): sweep intros tranche 2a -- residuel Python, 10 carnets #20026 — les 3 DRIFT rapportés sont Probas/Search, hors périmètre).

See #14442 · See #20026

🤖 Generated with Claude Code

…e source retiree

Cellule 9 : subprocess.run muni de encoding='utf-8', errors='replace'
(defaut preexistant sur main, bloque par le hook #12811) puis re-execution
complete 9/9, 0 erreur (native python 3.13.14, base 3.13.7 meme majeur.mineur).
Cellule 0 : ligne 'Issue source : #12238' retiree (sweep #14442 tranche 2).
Derive de sortie mesuree et attendue : lake grandi sur main (Shapley.lean
2024->2028 lignes, 49->60 fichiers, naive_sorry 32->36, distinct_code_sorry
stable a 1, Folk.lean:127->544) ; prose cellule 10 alignee sur la mesure fraiche.

See #14442

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

github-actions Bot commented Oct 9, 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 Oct 9, 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 Oct 9, 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 Oct 9, 2026

Copy link
Copy Markdown
Contributor

Notebook outputs-required (H.4 schema): PASS (every code cell carries an outputs: list)

@github-actions

github-actions Bot commented Oct 9, 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 Oct 9, 2026

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 9
  • 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 Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 9/9 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 5.1s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.5s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 5.4s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 5.1s
Search-01-StateSpace.ipynb ✅ SUCCESS 4.0s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 3.0s
RL-04-Bandits-Manchots-Python.ipynb ✅ SUCCESS 22.4s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 3.2s
GameTheory-13d-Optimistic-CFR-Python.ipynb ✅ SUCCESS 12.7s

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

@jsboige

jsboige commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2026:CoursIA-3
pr: 20027
head: 53c3648
complete: true
body: read
comments-reviewed: 7
reviews-reviewed: 0
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: d25a222cdbb4b5338deae0201bb11104efacff24bb15bce72fa285d2b37bc033
diff-files: 1
diff-additions: 132
diff-deletions: 134
checks: BLOCKED
b0: clear
scope: pass
domain: pass
verdict: BLOCKED
organ: check_adjoint_prevalidation.py
organ-command: python scripts/check_adjoint_prevalidation.py --derive-verdict 20027
organ-rc: 3
[/ADJOINT PREFLIGHT]

@jsboige

jsboige commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2026:CoursIA-3
pr: 20027
head: 53c3648
complete: true
body: read
comments-reviewed: 8
reviews-reviewed: 0
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: 38b9cf56f400ae68d386cb8258c24d6129aed188121a07ade6ddd740456b2968
diff-files: 1
diff-additions: 132
diff-deletions: 134
checks: latest-wins-green
b0: clear
scope: pass
domain: pass
verdict: READY
organ: check_adjoint_prevalidation.py
organ-command: python scripts/check_adjoint_prevalidation.py --derive-verdict 20027
organ-rc: 0
supersedes: 8
supersedes-why: auto -- covers BLOCKED dossier from jsboige (2026-10-09T06:20:19Z) at the same head; re-attestation derived by check_adjoint_prevalidation.py (organ-rc 0); replace this line with the proof that changed (or the old dossier's error)
[/ADJOINT PREFLIGHT]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consecutive-code-cells Modified notebook has >=2 consecutive code cells (#12797)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants