Skip to content

docs(api): regenerate stale Python API reference pages - #13035

Merged
dagil-nvidia merged 6 commits into
mainfrom
ypandey/regen-python-api-docs
Aug 11, 2026
Merged

docs(api): regenerate stale Python API reference pages#13035
dagil-nvidia merged 6 commits into
mainfrom
ypandey/regen-python-api-docs

Conversation

@ynpandey-nv

@ynpandey-nv ynpandey-nv commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

The Fern Docs publish job gates on gen_python_api.py --check, which was failing on main because the generated Python API reference pages had drifted from the current dynamo.* source. That check runs before the sync/publish steps in the "Preview or publish docs" job, so the failure skipped the actual publish, blocking all docs updates from reaching docs.nvidia.com (including newly merged recipe pages).

This PR unblocks publishing and fixes the underlying ordering instability that made the generated pages churn.

1. Regenerate the stale pages (8794fe7680)

  • Regenerated README.mdx, _core.mdx, common.mdx, frontend.mdx, llm.mdx under docs/fern/pages/reference/api/python/
  • Symbol counts refreshed (total dynamo.* public symbols 362 to 365) to match current source
  • No hand edits; output is exactly what gen_python_api.py produces

2. Make symbol ordering deterministic (cb12b01554)

  • discover_module sorted symbols by (kind, name) only, so same-named symbols exported from different submodules (dynamo.frontend.prepost and dynamo.frontend.sglang_prepost both expose build_tool_call_guided_decoding and preprocess_chat_request) fell back to griffe's member iteration order
  • That produced no-op page churn and could fail --check with no underlying source change
  • Added qualname as a tiebreaker, and test_discovered_symbols_are_deterministically_ordered now asserts on (kind, name, qualname) so the tiebreaker cannot silently regress

The frontend.mdx reordering in this PR is that deterministic order (prepost before sglang_prepost): regenerating after the sort-key fix reports every page unchanged, so the ordering is normalized once here and pinned from now on.

Verification

  • gen_python_api.py --check exits 0 after regeneration (all outputs unchanged)
  • gen_rust_api.py --check and gen_kubernetes_api.py --check pass, so the Python pages were the only stale outputs
  • Ordering and anchor-uniqueness tests in test_gen_python_api.py pass
  • Generated with the pinned griffe==2.1.0; output byte-stable across interpreter versions
  • Files committed with LF endings per .gitattributes
  • Branch synced to latest main so the regenerated pages reflect current source

Related Issues

No related issue; this is a docs-infrastructure fix found while investigating why newly merged recipe docs were not appearing on docs.nvidia.com.

Where to start reviewing

Start with docs/fern/scripts/api_discovery.py (the one-line sort-key change plus comment). The five .mdx files are fully generated output and need no line-by-line review.

The Fern Docs publish job gates on gen_python_api.py --check, which was failing on main because the generated Python API reference pages had drifted from the current dynamo.* source. This blocked the publish/sync step for all docs. Regenerated with the pinned griffe==2.1.0 so the check passes and docs publishing is unblocked.

Signed-off-by: Yogendra Pandey <ypandey@nvidia.com>
@ynpandey-nv
ynpandey-nv requested a review from a team as a code owner August 11, 2026 18:52
@copy-pr-bot

copy-pr-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added docs documentation Improvements or additions to documentation labels Aug 11, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread docs/fern/pages/reference/api/python/frontend.mdx
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The generated Python API reference updates public symbol counts, adds model-taint and frontend API entries, and refreshes source links after declaration shifts.

Changes

Python API reference

Layer / File(s) Summary
Model-taint API documentation
docs/fern/pages/reference/api/python/README.mdx, docs/fern/pages/reference/api/python/_core.mdx, docs/fern/pages/reference/api/python/common.mdx, docs/fern/pages/reference/api/python/llm.mdx
Updated public symbol counts and documented register_model_taint_route and update_model_taints.
Frontend API entries
docs/fern/pages/reference/api/python/frontend.mdx
Added vLLM and SGLang build_tool_call_guided_decoding entries and the vLLM preprocess_chat_request entry.
Generated source-link refresh
docs/fern/pages/reference/api/python/_core.mdx, docs/fern/pages/reference/api/python/llm.mdx
Updated generated source links for shifted declarations across core, routing, media, engine, and frontend APIs.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main change: regenerating stale Python API reference documentation pages.
Description check ✅ Passed The description includes all required sections: Overview/Summary, Details, Where to start reviewing, and Related Issues with the 'NOT linked to issue' path confirmed.

Comment @coderabbitai help to get the list of available commands.

ynpandey-nv and others added 3 commits August 11, 2026 14:22
Symbols were sorted by (kind, name) only, so same-named symbols exported from different submodules (dynamo.frontend.prepost and dynamo.frontend.sglang_prepost both expose build_tool_call_guided_decoding and preprocess_chat_request) fell back to griffe's member iteration order. That reshuffled the generated pages between runs and could fail the --check gate with no underlying source change. Adding qualname as a tiebreaker pins the order.

Signed-off-by: Yogendra Pandey <ypandey@nvidia.com>
@dagil-nvidia
dagil-nvidia enabled auto-merge (squash) August 11, 2026 21:09
@dagil-nvidia

Copy link
Copy Markdown
Collaborator

/ok to test 9d070fa

@nealvaidya

Copy link
Copy Markdown
Contributor

/ok to test 9d070fa

@dagil-nvidia
dagil-nvidia merged commit b4f66ad into main Aug 11, 2026
102 checks passed
@dagil-nvidia
dagil-nvidia deleted the ypandey/regen-python-api-docs branch August 11, 2026 21:11
@github-actions

Copy link
Copy Markdown
Contributor

dagil-nvidia added a commit that referenced this pull request Aug 12, 2026
…elf-heal

Two gaps found pressure-testing this, both of which matter more now that the
publish gate is staying blocking rather than being relaxed.

Blast radius. The happy path pushes to main unreviewed, so an unbounded diff
is the one way this job can do real damage: a merge that moves a documented
symbol touches a handful of pages, but a BROKEN generator rewrites all of
them. Real regenerations for scale -- #12985 was 4 files, #13035 was 6 -- so
the cap is 20 files or 2000 lines. Over that, the direct push is skipped
entirely and the change goes to a branch for review.

Silent failure. The job previously exited 0 after falling back to a branch.
With the gate blocking, a fallback is not a nuisance, it is a publish outage:
main carries stale references and docs.nvidia.com will not update until
someone opens that PR. A green run hides exactly that, which is how
update-events.yml failed 100 times without anyone noticing. The job now fails
on the fallback path and routes through notify-slack.yml, the same notifier
nightly and post-merge already use.

Deliberate asymmetry: pushing to main is a success, falling back is a
failure. Both leave the tree correct; only one leaves the publish blocked.

Validation: YAML parses, both jobs resolve, every run: block passes bash -n.
Signed-off-by: Dan Gil <dagil@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation Improvements or additions to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants