docs: keep bundle examples self-contained - #780
Draft
AlexanderLanin wants to merge 10 commits into
Draft
Conversation
AlexanderLanin
requested review from
MaximilianSoerenPollak,
a-zw,
dcalavrezo-qorix and
nradakovic
as code owners
August 31, 2026 14:05
Contributor
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
AlexanderLanin
marked this pull request as draft
August 31, 2026 14:06
Contributor
|
Documentation preview for this pull request is available at: |
AlexanderLanin
force-pushed
the
fix/778-self-contained-docs-bundle
branch
from
August 31, 2026 15:46
d0e58f6 to
0d7d245
Compare
AlexanderLanin
marked this pull request as ready for review
August 31, 2026 18:58
AlexanderLanin
force-pushed
the
fix/778-self-contained-docs-bundle
branch
from
September 1, 2026 06:47
102ef45 to
b10f565
Compare
AlexanderLanin
changed the base branch from
main
to
fix/781-bazel-package-mount-boundaries
September 1, 2026 06:51
AlexanderLanin
marked this pull request as draft
September 1, 2026 08:06
AlexanderLanin
force-pushed
the
fix/778-self-contained-docs-bundle
branch
from
September 1, 2026 08:29
b10f565 to
102ef45
Compare
AlexanderLanin
changed the base branch from
fix/781-bazel-package-mount-boundaries
to
main
September 1, 2026 08:29
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.
Fixes #778
The documentation examples intentionally use the test BUILD files as their source of truth. The original literalinclude paths remain unchanged; no copied .inc snapshots are introduced.
The public bundle carries those files through a separate data-only docs_bundle child, composed at a private mount path. The docs() macro stages non-document payloads from composed data-only children below the sandboxed Sphinx source tree, so each file label is declared only on its owning child bundle. Data stays attached to the manifest entry that declares it, preserving the per-entry propagation fix from #779.
A source entry composed with a data-only child carries explicit path_check = "off" because sphinx-mounts 0.1.x cannot express a per-file path-check exception for intentionally declared non-document supporting files outside source_dir. Ordinary mounts remain strict (path_check = "error"). Pure data entries only create mounts for document files; BUILD and other supporting payloads remain bundle inputs without exposing neighboring documents.
This is an intentionally narrow compatibility bridge. Upstream issue useblocks/sphinx-mounts#43 tracks a per-mount allowlist for explicitly declared external dependencies. When that is available, this source-entry-level path_check exception can be replaced by the exact declared files.
Regression coverage includes an external Bzlmod consumer that mounts the public bundle and verifies the rendered original literalinclude, plus a sandboxed needs_json build from a subpackage. The Sphinx action remains sandboxed; the consumer test limits local execution to the known local_path_override sourcelink helper workaround.
Checks: