Summary
run_api_docs can throw while checking a documented object that is reexported through more than one module. The failure occurs before it can decide whether the object has a docstring:
Constant binding was imported from multiple modules
The throw originates in SciMLTesting's _has_docstring binding-based lookup.
Reproduction
On OrdinaryDiffEq.jl master 5265a6c54232db89d6e57e7a2c69f5f20d55a172, Julia 1.12.6, the exact QA groups for StochasticDiffEqLowOrder, StochasticDiffEqRODE, StochasticDiffEqWeak, and StochasticDiffEqMilstein all reproduce this failure. For example:
ENV["GROUP"] = "StochasticDiffEqLowOrder_QA"
using Pkg
Pkg.test()
The affected surface includes aliases such as SDEAlgTypes, SDEIntegrator, and SDEOptions. Their owning objects already have docstrings, but constructing Docs.Binding(pkg, name) through a package that receives the same binding from multiple reexport paths is ambiguous and throws.
Expected behavior
run_api_docs should recognize the documentation attached to the object and continue checking the package. A duplicate reexport should not crash the documentation audit.
Suggested fix
Have _has_docstring first resolve getproperty(pkg, name) and query the object's documentation (for example, Docs.doc(object)) before falling back to a package/name Docs.Binding. Add a regression fixture in which one documented object is reexported into the checked module through two modules.
This should preserve strict docs enforcement; disabling api_docs or swallowing the error would hide real missing documentation.
Summary
run_api_docscan throw while checking a documented object that is reexported through more than one module. The failure occurs before it can decide whether the object has a docstring:The throw originates in SciMLTesting's
_has_docstringbinding-based lookup.Reproduction
On OrdinaryDiffEq.jl master
5265a6c54232db89d6e57e7a2c69f5f20d55a172, Julia 1.12.6, the exact QA groups forStochasticDiffEqLowOrder,StochasticDiffEqRODE,StochasticDiffEqWeak, andStochasticDiffEqMilsteinall reproduce this failure. For example:The affected surface includes aliases such as
SDEAlgTypes,SDEIntegrator, andSDEOptions. Their owning objects already have docstrings, but constructingDocs.Binding(pkg, name)through a package that receives the same binding from multiple reexport paths is ambiguous and throws.Expected behavior
run_api_docsshould recognize the documentation attached to the object and continue checking the package. A duplicate reexport should not crash the documentation audit.Suggested fix
Have
_has_docstringfirst resolvegetproperty(pkg, name)and query the object's documentation (for example,Docs.doc(object)) before falling back to a package/nameDocs.Binding. Add a regression fixture in which one documented object is reexported into the checked module through two modules.This should preserve strict docs enforcement; disabling
api_docsor swallowing the error would hide real missing documentation.