test: CI-enforced docs IA guards (tests/test_docs_ia.py)#706
Merged
Conversation
Structural invariants protecting the #703 information architecture - all valid-Sphinx states the -W build cannot catch: 1. docs/index.rst root toctree = exactly the 5 section landing pages (a 6th entry regrows the navbar "More" dropdown). 2. Every tutorial notebook registered in docs/tutorials/index.rst with BOTH a short-labeled toctree entry (<=40 chars) and a grid card, in the SAME group section; duplicates anywhere in the file are counted. 3. Homepage "Supported Estimators" table 1:1 with the api/index.rst Estimators autosummary, compared by OBJECT IDENTITY (a same-named distinct class cannot satisfy parity; submodule/re-export aliases match). Full list-table row blocks are parsed, so multiline or empty first cells fail loudly. 4. No class documented only under :no-index: (dead :class: xrefs - the pre-#703 RDD failure mode): every :no-index:'d autoclass (any indentation, nested api/ dirs included) must resolve to the same object as a stub-generating (:toctree:) autosummary entry; committed class stubs may not carry :no-index: themselves. Parsers are directive-scoped (contiguous option blocks, :toctree:-gated autosummary, module-shadow-aware qualname resolution) with negative fixtures per failure shape; scope is explicitly bounded to the RST conventions this repo uses. Mutation-verified: seeded violations of each invariant fail. Wired into the docs-tests doc-snippets job + path filters; conventions documented in CONTRIBUTING.md ("Docs IA invariants"), CLAUDE.md, /docs-check 5b, and CHANGELOG. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tt9ZXdhHdGsBvRTkNWb39M
Overall assessment: ✅ Looks goodExecutive summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
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
tests/test_docs_ia.py: structural guards for the docs: restructure RTD site around 5 top-level sections (IA overhaul) #703 documentation information architecture, covering four invariants that are all valid-Sphinx states the-Wbuild cannot catch: (1) the rootdocs/index.rsttoctree stays exactly the 5 section landing pages (a 6th entry regrows the navbar "More" dropdown); (2) every tutorial notebook is registered indocs/tutorials/index.rstwith BOTH a short-labeled toctree entry (<= 40 chars) and a grid card, in the same group, with whole-file duplicate counting; (3) the homepage "Supported Estimators" table stays 1:1 with theapi/index.rstEstimators autosummary, compared by object identity (same-named distinct classes cannot satisfy parity; submodule/re-export aliases match); (4) no class is documented only under:no-index:- the dead-cross-reference failure mode the RDD classes had before docs: restructure RTD site around 5 top-level sections (IA overhaul) #703 - including committed class stubs.:toctree:-gated autosummary bodies, module-shadow-aware qualname resolution -diff_diff.tropthe package attribute is a function that shadows the module) with a negative fixture per failure shape; the module docstring bounds scope to the RST conventions this repo actually uses. Each invariant was mutation-verified against a seeded violation.doc-snippetsjob plustests/test_docs_ia.pypath triggers; the suite skips cleanly on isolated-install CI (no docs tree).:no-index:rules,/docs-checka runnable 5b section, and CHANGELOG an internal bullet.Methodology references (required if estimator / math changes)
Validation
tests/test_docs_ia.py(18 tests: 5 live invariants + 13 parser/negative fixtures), all passing; each invariant mutation-verified (seeded violations fail with actionable messages).Security / privacy
Generated with Claude Code