[DOC]: Preserve shared Sphinx inventories during release deployments
Reported by GPT-6.1 Sol High, at the user's request, following a review of generated release documentation.
Problem
A component release payload contains a top-level objects.inv copied from the release being built. Publishing CUDA 12 maintenance documentation therefore replaces the shared docs/cuda-bindings/objects.inv with the CUDA 12 inventory, even though the workflow deliberately preserves the shared latest/ documentation and version selectors.
The shared inventory can consequently describe a different API surface from the shared documentation it accompanies. Consumers using this shared inventory lose entries for the current CUDA 13 API surface.
Evidence
Audited release payload: gh-pages-jrp-cuda-bindings-12.9.11-2 at 61c95ca1574.
| Inventory snapshot | Total entries | cuda.bindings.nvml entries |
|---|---|---|
Shared gh-pages snapshot 2ea6251079c |
8,031 | 800 |
| CUDA 12.9.11 release payload | 4,078 | 0 |
In the release payload, docs/cuda-bindings/objects.inv is byte-for-byte identical to docs/cuda-bindings/12.9.11/objects.inv. The dry-run branch is isolated; these measurements demonstrate what would be deployed, not that this dry run overwrote production.
Cause
cuda_bindings_12/docs/build_docs.shcopiesbuild/html/latest/objects.invtobuild/html/objects.invafter temporarily populatinglatest/from the release being built.- The release path in
build-docs.ymlremoveslatest/,nv-versions.json, andversions.json, but leaves that top-level inventory in the payload. - Deployment overlays the payload onto
docs/withclean: false, so the retained inventory replaces the existing shared file. - The CUDA 13 build helper has the same inventory-copy behavior. The equivalent pattern also occurs in the other component build helpers and should be assessed consistently.
Reproduce
- Generate a dry-run deployment payload for
component=cuda-bindings,git-tag=v12.9.11. - Compare
docs/cuda-bindings/objects.invwithdocs/cuda-bindings/12.9.11/objects.inv; they are identical. - Compare the root inventory with the shared gh-pages snapshot above. Decode the Sphinx v2 inventory by skipping the first four newline-delimited header lines and zlib-decompressing the remainder.
- Observe that the maintenance payload would replace the shared inventory with a smaller, different API catalog while leaving the existing
latest/pages untouched.
Expected behavior and suggested scope
Versioned releases should publish their versioned inventories while preserving the shared root inventory alongside latest/ and the shared selectors. A normal main/latest deployment can continue updating the shared inventory.
Apply this policy consistently to both bindings majors, the component-release path, and the component=all release path; assess the other packages using the same helper pattern.
Validation should confirm that a maintenance release adds its versioned inventory without changing the existing shared inventory, while a main/latest deployment can still update it. This should be verified even after the missing CUDA 12 NVML documentation is fixed: two majors can legitimately expose different API catalogs.
Related: #3517 tracks the missing CUDA 12 NVML reference; preserving the shared inventory is a separate release-deployment concern.
No source changes are included in this report. No GPU or driver is required to inspect the generated output.
I'm picking this up as part of a wider "fix docs issues" sweep. codex suggests this "is a small fix with a clear pass/fail check."