FIX Restore docs build validation - #2493
Closed
hannahwestra25 wants to merge 3 commits into
Closed
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
hannahwestra25
marked this pull request as ready for review
August 25, 2026 20:10
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8b8833c-24dc-44bf-980b-8273b0f7ef4f
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.
Root cause
Lazy package exports made the aggregate
pyritJSON contain both direct members and submodules._expand_module()stopped at the parent as soon as it saw direct API, so generation emitted onlyapi/pyrit.mdand failed TOC validation. Separately, the docs workflow always checked out each configured ref, so pull requests validated the base branch rather than their merge revision.Behavior change
github.base_refwithgithub.sha. Main PRs replacelatest; release PRs replace their release entry. Missing or unconfigured base refs fail explicitly.Validation
python -m pytest tests\unit\build_scripts\test_gen_api_md.py tests\unit\build_scripts\test_resolve_docs_matrix.py -q— 63 passedpython -m ruff check ...andpython -m ruff format --check ...— passedty check ...— passed (repository-config compatibility warnings only).github/workflows/docs.ymlwith PyYAMLpython -m build_scripts.pydoc2json pyrit --submodules -o doc\_api\pyrit_all.jsonpython -m build_scripts.gen_api_md— generated the expected 27 pages; TOC and orphan validation passed