← Back to Pull requests

[docs] Add a shared intersphinx inventory for LLVM projects #239863

Open
unknown opened this pull request with 265 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 07, 2026 01:03 UTC
Author

The Intersphinx extension uses inventories to resolve cross-project references for documentation links. There are two main benefits to interspinx:

1. Released and vendored builds of LLVM docs can be configured to reference doc sites other than llvm.org, the live ToT docs.
2. Cross-reference links can actually be checked for validity at build time, so we get fewer broken links when renaming section headers

The standard, default operating model is for Sphinx to fetch the inventory from the base URL that you specify in conf.py, the Sphinx build configuration file. This PR uses that mode by default, but it is not hermetic, i.e. it hits the network, and links can break if the live .llvm.org documentation changes.

To properly build all documentation from source and validate all of our circular cross-project references, we need to build all documentation in two phases:

1. Inventory build phase to collect all labels
3. HTML & man page build phase that uses the inventories of every other project

I implemented this in utils/docs/hermetic_build/CMakeLists.txt. The hermetic build has to decompose into 4 separate CMake subbuilds, because we cannot build runtimes and tools in the same CMake build. The hermetic doc build has several downsides that make it cumbersome and unsuitable for local documentation editing:

Single doc targets depend on all docs inputs
LLDB has non-standard dependencies (SWIG) that are not available in all build environments
Nested builds are not ergnomic because subbuild output is either serialized or buffered

For developers, it makes more sense to just fetch the live ToT inventories from .llvm.org/ and use that for development. The consequence of a broken inventory reference is a doc build warning (or error) and a missing link in the rendered HTML, which is acceptable for local iteration.

This is part of #214861 (shared cross-project inventory). It is the first of three stacked PRs; review only the top commit of each.

LLM-aided

Diff: 265 lines (+198 / -67) across 3 files Reviewer: rnk Review duration: 36117m
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.39) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 265 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
42%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.334
Real PR Conversation Timeline
1 comments
"Review active on #239863"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 43.0% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.3% (MEDIUM) · Higher = larger blast radius
39.3%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 43.0% · Lower = rushed or shallow review
43.0%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 22.4% · Safe to merge
22.4%