Repository navigation
fix(notebooks): assign valid string id to cells with "id": null (nbformat 4.5) - #8325
Merged
Merged
Conversation
…rmat 4.5) 5 notebooks carried one cell with an explicit "id": null — invalid under nbformat 4.5, which requires a string cell identifier. nbformat.validate() raises on these cells, which silently skipped the whole notebook in the batch H.3 validator (scripts/notebook_tools/validate_pr_notebooks.py): e.g. Infer-2's 27 cells were not under validation coverage. Assign a unique string id "fixed-id-null" to the lone null-id cell in each notebook — consistent with the notebook convention (every other cell already carries a string id: Infer-2 85/85, Infer-11 56/56, Infer-12 19/19, PyMC-11 35/35, QC-research 31/31). Byte-stable: one literal replacement per file; no source or output touched. Verified: - nbformat.validate() PASSES on all 5 (was raising before). - Batch H.3 validator now INCLUDES all 5 and PASSes (Infer-2 27 cells, Infer-11 56, Infer-12 19, PyMC-11 35, QC-research 31). Scope: nbformat-schema defect only. No code cell source or output changed. Co-Authored-By: Claude-Code <noreply@anthropic.com>
Contributor
Notebook PR Validation: PASS
Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns) |
Contributor
Golden-Set Execution (H.7 P3)✅ 8/8 notebooks passed (certified reproducible)
Pinned lockfile: |
jsboige
reviewed
Jul 24, 2026
jsboige
left a comment
Owner
There was a problem hiding this comment.
[Hermes] ✅ Diff: 5x id: null -> id: fixed-id-null sur cellules markdown ## References (Infer-2/11/12, PyMC-11, QC research). Fix mecanique conforme nbformat 4.5. CI golden-set 8/8 PASS, H.1/H.3 valides. Aucune fuite, pas de contenu semantique touche. LGTM.
jsboige
added a commit
that referenced
this pull request
Jul 24, 2026
…clear fleet-red gate) (#8372) The Twin parity audit gate (#8185 = BLOCKING) was fleet-RED on every open PR because 15 registered twin pairs drifted on origin/main: merged PRs that modify a registered twin notebook (citations, Prong-B enrichment, determinism seed, metadata.cost rollout, nbformat cell-id fix) did not rebaseline their last_audit.{python,csharp}_sha, so the recorded SHA lagged the merged blob. G.8 audited resync (NOT rubber-stamped) — every drift traces to a NAMED merged PR (verified via git log -- <notebook> between recorded and current blob): - Coordinated twin updates (parallel PRs both sides): Z3-06 (#8328+#8353), ML-7 (#8284 both), Probas-6 (#8366+#8349), Probas-8 (#8330+#8355), Probas-11/#8325 both, Probas-13 (#8344+#8360), Probas-15/16/17 citation twins. - Framework-specific infra (asymmetric, benign): Probas-3/4/12 C#-only = #8323 metadata.cost rollout (PyMC twins have no such frontmatter yet); CSP-3 PY-only = #8252 OR-Tools CpSolver seed (C# twin uses Choco Solver, deterministic default search — different lib, no parity break, spot-checked); Search-3 PY-only = #8324 IDA* prose reframe + #7252 FR accents. Independently re-confirms the G.1 firsthand claim (jsboige c.03:58, po-2023 c.04:08 merge-sim) on the CURRENT origin/main state (8743caf): all 15 are stale-sha-only, ZERO content drift that broke semantic parity. Surgical method (NOT check_twin_parity.py --update): --update yaml.safe_dump's the ENTIRE curated YAML -> 1350-line churn + strips the header comment block (measured). Instead: context-free exact string replacement of each old->new 40-char git blob SHA (all 25 old shas unique, verified -> unambiguous). Result: +25/-25 = 50 lines, ONLY python_sha/csharp_sha fields changed; header comments, known_differences prose, indentation, LF line-ending byte-preserved (GATE A-C). Proof: check_twin_parity.py --check -> OK=39 DRIFT=0 exit 0 (CI-green). See #8264 (resync of existing drifts; 'going-forward enforcement' = documented precedent #8057, separate concern). See #8057, #8185. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
5 notebooks each carried one cell with an explicit
"id": null— invalid under nbformat 4.5, which requires a string cell identifier.Consequence (the real bug):
nbformat.validate()raises on anullcell id, which silently skipped the whole notebook in the batch H.3 validator (scripts/notebook_tools/validate_pr_notebooks.py). Infer-2's 27 cells (and the others) were not under validation coverage at all.The fix
Assign a unique string id
"fixed-id-null"to the lone null-id cell in each notebook — consistent with the notebook convention (every other cell already carries a string id):Probas/Infer/Infer-2-Gaussian-MixturesProbas/Infer/Infer-11-Topic-ModelsProbas/Infer/Infer-12-Modeles-HierarchiquesProbas/PyMC/PyMC-11-Topic-ModelsQuantConnect/projects/LongShortHarvest-QC/researchByte-stable: one literal replacement per file (
"id": null,→"id": "fixed-id-null",). No source or output touched — pure nbformat-schema metadata.Verification
nbformat.validate()now PASSES on all 5 (was raisingValidationErrorbefore).validate_pr_notebooks.py) now INCLUDES all 5 and PASSes — restoring coverage that was silently missing:iduniqueness: no duplicate within any notebook;fixed-id-nullappears exactly once each.Diff scope
5 files, +5/−5 (one line per file). The discovered vein came out of the Infer-2 cost-FM investigation (#8323): Infer-2 was dropped from that PR precisely because its pre-existing
id:nullcell skipped it in batch validation. This PR fixes the underlying defect so Infer-2 (and the 4 others) are covered going forward.Scope guard
nbformat-schema defect only. No
Closes #N(no tracking issue); this is correctness hygiene discovered incidentally.