Skip to content

fix-audit-407-r2: restore inventory + cross-refs for 19 :no-index: orphan classes#442

Merged
igerber merged 4 commits into
mainfrom
fix-audit-407-r2
May 15, 2026
Merged

fix-audit-407-r2: restore inventory + cross-refs for 19 :no-index: orphan classes#442
igerber merged 4 commits into
mainfrom
fix-audit-407-r2

Conversation

@igerber
Copy link
Copy Markdown
Owner

@igerber igerber commented May 15, 2026

Summary

Holistic-audit fix-PR for #407 (docs: add :no-index: to page-level autoclass directives (PR 2 of 2)). Pilot worktree at /tmp/pilot-407-wt cherry-picked #407 onto its pre-merge base and ran iterative codex review (R0..R3 with gpt-5.4 + xhigh reasoning) until clean.

#407 added :no-index: to 78 page-level autoclass directives. The directive is correct for classes that also have a generated _autosummary stub (so the stub serves as the canonical inventory target). For 19 classes there was no autosummary entry anywhere in docs/api/index.rst, so :no-index: orphaned them — the class loses its only inventory registration, and any :class: cross-reference to it silently fails to resolve in the rendered HTML.

This PR adds the missing autosummary entries to docs/api/index.rst and commits the 19 auto-generated stubs (per repo convention; 111 stubs were already tracked).

Classes restored (organized by index.rst section):

  • Panel Profiling (existing block): PanelProfile, OutcomeShape, TreatmentDoseShape, Alert
  • Reporting (new block): BusinessReport, BusinessContext, DiagnosticReport, DiagnosticReportResults
  • Boundary Local-Linear Estimators (new block): LocalLinearFit, BandwidthResult, BiasCorrectedFit
  • Estimators + Results Classes (existing blocks): StaggeredTripleDifference, StaggeredTripleDiffResults, TWFEWeightsResult
  • HAD Pretest Workflow (new block): HADPretestReport, QUGTestResults, StuteTestResults, YatchewTestResults, StuteJointResult

Cross-refs explicitly repaired:

  • docs/api/index.rst:108:class:~diff_diff.PanelProfile``
  • docs/api/profile.rst:7,21:class:Alert/:class:OutcomeShape / :class:TreatmentDoseShape``
  • docs/choosing_estimator.rst:19:class:~diff_diff.StaggeredTripleDifference``
  • docs/api/had.rst:163:class:~diff_diff.HADPretestReport``

Build verification:

Verified locally via make -C docs clean && make -C docs html SPHINXOPTS="-W":

No methodology impact — pure inventory/navigation restoration.

Test plan

  • CI green

igerber and others added 4 commits May 15, 2026 07:51
PR #407 added :no-index: to page-level autoclass directives, which is
correct for classes that also have a generated _autosummary stub. For
9 classes there was no stub, so :no-index: orphaned them: the class
loses its only inventory entry and any :class: cross-reference
(e.g. index.rst:108 :class:`~diff_diff.PanelProfile`, profile.rst:7,21
:class:`Alert` / :class:`OutcomeShape` / :class:`TreatmentDoseShape`)
silently fails to resolve.

Add the missing classes to the canonical autosummary list in index.rst:

- Panel Profiling (existing block): PanelProfile, OutcomeShape,
  TreatmentDoseShape, Alert
- Reporting (new block): BusinessReport, BusinessContext,
  DiagnosticReport, DiagnosticReportResults
- Boundary Local-Linear Estimators (new block): LocalLinearFit,
  BandwidthResult, BiasCorrectedFit

Stubs auto-generate via autosummary_generate_overwrite (default True);
the existing custom class.rst template (added in PR #410) emits
:no-members: so the new stubs do not introduce duplicate-object
warnings with the page-level autoclass directives that retain
:no-index:.

Verified locally on main with `make -C docs html SPHINXOPTS="-W"`:
build succeeds, 11 new _autosummary stubs generated, and the
:class:`~diff_diff.PanelProfile` cross-ref in api/index.rst renders
with href="_autosummary/diff_diff.PanelProfile.html".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
R1 codex review surfaced 8 more :no-index: orphans that R0 missed:

- staggered.rst:140,151 — StaggeredTripleDifference,
  StaggeredTripleDiffResults (cross-ref in
  docs/choosing_estimator.rst:19 was orphaned)
- chaisemartin_dhaultfoeuille.rst:173 — TWFEWeightsResult
- had.rst:167,182,188,194,209 — HADPretestReport (cross-ref in
  docs/api/had.rst:163 was orphaned), QUGTestResults,
  StuteTestResults, YatchewTestResults, StuteJointResult

Add to canonical autosummary blocks in docs/api/index.rst:
- Estimators: StaggeredTripleDifference
- Results Classes: StaggeredTripleDiffResults, TWFEWeightsResult
- New HAD Pretest Workflow section: HADPretestReport,
  QUGTestResults, StuteTestResults, YatchewTestResults,
  StuteJointResult

Verified locally with `make -C docs html SPHINXOPTS="-W"`: build
succeeds, 8 new _autosummary stubs generated, cross-refs to
StaggeredTripleDifference (from choosing_estimator.rst) and
HADPretestReport (from api/had.rst) now resolve.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
R2 codex flagged two methodology mis-attributions in the prose I added:

1. HAD Pretest Workflow: cited "Baker et al. 2025" but the actual
   workflow is Section 4 of de Chaisemartin, Ciccia, D'Haultfoeuille
   & Knau (2026), per docs/api/had.rst:9-10, diff_diff/had_pretests.py:1-3,
   and docs/methodology/REGISTRY.md:2480-2489.

2. Boundary Local-Linear Estimators: said "used by the continuous-DiD
   boundary estimator" but per docs/api/local_linear.rst:8-11 and
   diff_diff/had.py:49-53 these are the nonparametric building blocks
   for HeterogeneousAdoptionDiD's continuous-dose fit paths
   (continuous_at_zero, continuous_near_d_lower), not ContinuousDiD.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The autosummary directives added in the prior 3 commits expand at
build time into stubs at docs/api/_autosummary/diff_diff.<Class>.rst
via autosummary_generate_overwrite=True (default).

The repo convention is to commit these stubs (111 already tracked);
commit the 19 new ones for the orphan classes restored to the
inventory:

- Panel Profiling: Alert, OutcomeShape, PanelProfile, TreatmentDoseShape
- Reporting: BusinessContext, BusinessReport, DiagnosticReport,
  DiagnosticReportResults
- Boundary Local-Linear: BandwidthResult, BiasCorrectedFit, LocalLinearFit
- Estimators / Results: StaggeredTripleDifference,
  StaggeredTripleDiffResults, TWFEWeightsResult
- HAD Pretest Workflow: HADPretestReport, QUGTestResults,
  StuteJointResult, StuteTestResults, YatchewTestResults

Stubs use the custom class.rst template added in PR #410 (auto-emits
:no-members:), so they register the canonical inventory target
without triggering duplicate-object warnings against the page-level
autoclass directives that retain :no-index:.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Overall Assessment

✅ Looks good — no unmitigated P0/P1 findings. The inventory/autosummary repair appears sound; the only issue I found is a P2 documentation regression around methodology-link navigation and TODO tracking.

Executive Summary

  • Cross-checked the touched methodology prose against docs/methodology/REGISTRY.md:L474-L666, docs/methodology/REGISTRY.md:L1424-L1694, and docs/methodology/REPORTING.md:L56-L143; no undocumented estimator or inference deviation was introduced.
  • The new autosummary coverage in docs/api/index.rst:L20-L249 is internally consistent, and I found no remaining top-level :no-index: orphan classes after this change.
  • Severity: P2 The PR replaces live methodology references with plain inline file paths in the reporting docs/tutorials, even though the Markdown methodology files still are not rendered as Sphinx pages.
  • The same PR also removes the Testing/Docs TODO that had been tracking that unresolved rendering/navigation gap, so the debt becomes untracked rather than fixed.
  • No code quality, performance, maintainability, or security issues beyond that docs item.
  • Review note: this was a static diff review; I did not run Sphinx/tests in this environment.

Methodology

Code Quality

  • No findings.

Performance

  • No findings.

Maintainability

  • No findings beyond the documentation-link regression below.

Tech Debt

  • No separate findings beyond the removed tracking item below.

Security

  • No findings.

Documentation/Tests

@igerber igerber added the ready-for-ci Triggers CI test workflows label May 15, 2026
@igerber igerber merged commit 170b284 into main May 15, 2026
11 of 12 checks passed
@igerber igerber deleted the fix-audit-407-r2 branch May 15, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ci Triggers CI test workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant