docs(api): regenerate stale Python API reference pages - #13035
Merged
Conversation
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>
Contributor
WalkthroughThe generated Python API reference updates public symbol counts, adds model-taint and frontend API entries, and refreshes source links after declaration shifts. ChangesPython API reference
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
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>
nealvaidya
approved these changes
Aug 11, 2026
dagil-nvidia
enabled auto-merge (squash)
August 11, 2026 21:09
Collaborator
|
/ok to test 9d070fa |
Contributor
|
/ok to test 9d070fa |
Contributor
This was referenced Aug 11, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Fern Docs publish job gates on
gen_python_api.py --check, which was failing onmainbecause the generated Python API reference pages had drifted from the currentdynamo.*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)README.mdx,_core.mdx,common.mdx,frontend.mdx,llm.mdxunderdocs/fern/pages/reference/api/python/dynamo.*public symbols 362 to 365) to match current sourcegen_python_api.pyproduces2. Make symbol ordering deterministic (
cb12b01554)discover_modulesorted symbols by(kind, name)only, so same-named symbols exported from different submodules (dynamo.frontend.prepostanddynamo.frontend.sglang_prepostboth exposebuild_tool_call_guided_decodingandpreprocess_chat_request) fell back to griffe's member iteration order--checkwith no underlying source changequalnameas a tiebreaker, andtest_discovered_symbols_are_deterministically_orderednow asserts on(kind, name, qualname)so the tiebreaker cannot silently regressThe
frontend.mdxreordering in this PR is that deterministic order (prepostbeforesglang_prepost): regenerating after the sort-key fix reports every pageunchanged, so the ordering is normalized once here and pinned from now on.Verification
gen_python_api.py --checkexits 0 after regeneration (all outputs unchanged)gen_rust_api.py --checkandgen_kubernetes_api.py --checkpass, so the Python pages were the only stale outputstest_gen_python_api.pypassgriffe==2.1.0; output byte-stable across interpreter versions.gitattributesmainso the regenerated pages reflect current sourceRelated 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.mdxfiles are fully generated output and need no line-by-line review.