Skip to content

docs: point the plugin inventory reference at the module that exists - #448

Merged
chrisknvidia merged 4 commits into
NVIDIA:mainfrom
lxcxjxhx:docs/plugin-inventory-module-ref
Nov 11, 2026
Merged

chrisknvidia merged 4 commits into
NVIDIA:mainfrom
lxcxjxhx:docs/plugin-inventory-module-ref

Conversation

@lxcxjxhx

Copy link
Copy Markdown
Contributor

What

Three docstrings cite skillevaluator.plugin_components. That module was never created — the inventory lives in skillevaluator.plugin_inventory.

The timeline says why: the citations landed in #250 (2026-10-29), and #257 (2026-10-30) composed the inventory under the plugin_inventory name. The references were written one day before the implementation picked a different filename, and nothing went back to update them.

Result today: a reader following the pointer finds no such module, and grep plugin_components in the package returns only those three docstrings.

Scope

Two of the three are :mod: roles, where the intended target is unambiguous:

File Before After
plugin_mcp.py:13 :mod:\skillevaluator.plugin_components`` :mod:\skillevaluator.plugin_inventory``
plugin_paths.py:16 同上 同上

Deliberately not included: plugin_manifest.py:280 cites :func:\~skillevaluator.plugin_components.build_plugin_inventory`. That function does not exist either, and the sentence describes it as taking an additional` argument — while the inventory module's entry point is

def plugin_inventory_for_root(
    path: Path, *, allowed_private_hosts: Iterable[str] = (), hook_allowed_urls: Iterable[str] = ()
) -> PluginInventory | None:

No additional, different parameters, different return. Replacing the reference there means deciding what the paragraph was describing, which is a guess I would rather not make inside a docs fix. Happy to take it separately.

How it was found

Resolved Sphinx cross-reference roles (:class: / :func: / :mod: …) in docstrings against the symbols the package actually defines, then checked dotted targets on the filesystem.

The first version of that check only compared symbol names, and in another repository it reported harbor.upload.db_client as missing — a module that exists at src/harbor/upload/db_client.py. Adding a filesystem resolution step for dotted targets removed that false-positive class; what is left here are references whose module genuinely is not present.

Verification

$ python pr-work/_tools/doc_xref_check.py src        # before
cross-references scanned: 337; targets not defined here: 6

$ ...                                                # after
cross-references scanned: 337; targets not defined here: 5   # the 3 plugin_components hits are gone

The remaining 5 are unrelated: a third-party rich role and a few identifiers named in prose that are not API symbols.

Comment-only change, two lines, no behaviour affected.

Three docstrings cite `skillevaluator.plugin_components`, which was never created. The
inventory lives in `skillevaluator.plugin_inventory`: the citations landed in NVIDIA#250
(2026-10-29) one day before NVIDIA#257 (2026-10-30) composed the inventory under the
`plugin_inventory` name, so the references describe a module that the implementation
replaced before either shipped.

Two of the three are `:mod:` roles, where the fix is unambiguous, so those change here:

- `plugin_mcp.py:13`
- `plugin_paths.py:16`

The third, `plugin_manifest.py:280`, points at `build_plugin_inventory` — a *function*
that also does not exist. Its sentence describes that function taking an `additional`
argument, while `plugin_inventory_for_root` takes `(path, *, allowed_private_hosts,
hook_allowed_urls)`, so picking a replacement means guessing what the paragraph meant.
Left alone rather than guessed at; say the word and I will take it separately once the
intended signature is clear.

Found by resolving Sphinx cross-reference roles in docstrings against the symbols the
package actually defines, then checking dotted targets on the filesystem — the first
version of that check reported `harbor.upload.db_client` as missing in another repo,
which is how I learned to resolve module paths rather than symbol names.

Signed-off-by: lxcxjxhx <[email protected]>

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants