fix: allow explicit root bundle source allowlists - #853
Open
AlexanderLanin wants to merge 1 commit into
Open
AlexanderLanin wants to merge 1 commit into
AlexanderLanin wants to merge 1 commit into
Conversation
AlexanderLanin
requested review from
MaximilianSoerenPollak,
a-zw,
dcalavrezo-qorix and
nradakovic
as code owners
September 22, 2026 19:56
Contributor
|
Documentation preview for this pull request is available at: |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The root-bundle behavior needs integration-level regression coverage before approval.
Review effort: Balanced
Findings: None
What changed in this PR
Restricts explicit root documentation bundles to declared source files, preventing Sphinx from discovering undeclared siblings.
Changes:
- Adds root-bundle
include_patternsallowlisting. - Validates sources are within the Sphinx source directory.
- Adds allowlist configuration coverage.
| File | Description |
|---|---|
src/extensions/score_mounts/tests/test_data_mounts.py |
Tests allowlist configuration, but lacks standalone discovery coverage. |
src/extensions/score_mounts/__init__.py |
Implements root source allowlisting and validation; related maintainer documentation needs updating. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
A documentation bundle may intentionally expose only a selected set of source files. For example:
If
isolated/undeclared.rstexists next to it, that file is not part of the bundle and should not be read by its standalone Sphinx build. Before this change, Sphinx could also discover such undeclared sibling files from the shared source directory. That meant a bundle could contain documentation that was not declared in itsBUILDfile, leading to unexpected pages and incorrect bundle ownership.With this change, the declared
index.rstis included and the undeclared sibling is ignored. From a documentation author’s perspective,docs_bundle(srcs = [...])now behaves as an exact source-file selection.The implementation:
include_patternsallowlist to root bundles with explicitsrcs;