Repository navigation
runtime-adapter: fix its broken doc links and build its docs in CI - #1002
Merged
Pedro Henrique Penna (ppenna) merged 3 commits intoOct 29, 2026
Merged
Conversation
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps fails for the runtime adapter in each of its configurations, protocol-only, host-only, and guest-only, on three intra-doc links in src/exec.rs: [`Runner`] in the module's documentation and in GuestMessage's, and [`Runner::next_message`] in GuestMessage::from_runner's (#999). The links name Runner as if src/exec.rs imported it, but its code uses only nvx::exec::runner, the module, and only src/worker/executions.rs imports Runner, so rustdoc resolves none of them. They have failed since 3322870 (#784) added the execution messages. Point them at nvx::exec::Runner, as the adapter's other links to items of nvx, such as the variants of nvx::ErrorKind, already do. Importing Runner into src/exec.rs instead would warn as an unused import, since its code doesn't use it. nvx::exec holds the execution engine in every configuration of nvx, so the links resolve in each of the adapter's. The adapter's documentation now builds with warnings denied in its protocol-only and host-only configurations; the guest-only one still fails on links to private items, which the next commit fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
With the links to Runner resolved, the adapter's guest-only configuration still fails RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --features guest --target x86_64-unknown-linux-musl: the documentation of the public module worker::mapping links to WRITTEN_FILE and WRITTEN, constants private to it, so rustdoc's private_intra_doc_links lint fires, and the links would lead nowhere in the public documentation. They have done so since 47f8bcd (#878) added the map probe. State their values instead: a new file `written`, which holds `runtime-adapter`, as the README's table of probes words the same row, and as the module's documentation already names the export's mount point and the directory outside the root rather than linking to EXPORT and OUTSIDE. Making the constants public would add them to the adapter's API only to serve the links. The adapter's documentation now builds with warnings denied in all three of its configurations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
check-nvx-rs builds nvx-rs's documentation with RUSTDOCFLAGS=-D warnings, but not the runtime adapter's, so links in the adapter's documentation that rustdoc couldn't resolve, or that led to private items, reached dev unnoticed: those to nvx's Runner since #784, and those to the map probe's constants since #878. They surfaced only when the documentation was built by hand while validating #955 (#999). The previous two commits fix them. Each of the adapter's three configuration steps now builds its documentation with cargo doc --locked --no-deps, with the step's features and target, after its tests and before the check with nvx's minimum Rust version, the order of nvx-rs's own steps. RUSTDOCFLAGS denies warnings for that command alone: set for the whole step, as nvx-rs's documentation step sets it, it would also reach the doctests that cargo test compiles with rustdoc. The guest-only step, which runs on Linux, documents the musl target that it already adds. test_nvx_rs_checks_the_runtime_adapter_in_each_configuration now requires the command in each configuration's step; against the action without it, the test fails for all three. doc/ci.md and doc/contribute.md list the check, and the adapter's README gives its commands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the rustdoc-link fixes and added documentation checks.
No open issues 🎉
What changed in this PR
Fixes #999 by repairing the runtime adapter’s rustdoc links and adding documentation checks to the existing Rust CI action. Runtime behavior is unchanged.
Changes:
- Qualifies links to
Runnerand replaces links to private mapping constants with their documented values. - Builds documentation with warnings denied for protocol-only, host-only, and guest-only configurations.
- Extends the CI regression test and updates contributor documentation and local validation commands.
| File | Description |
|---|---|
tests/runtime-adapter/src/worker/mapping.rs |
Replaces private-item documentation links with literal values. |
tests/runtime-adapter/src/exec.rs |
Qualifies three rustdoc links to Runner. |
tests/runtime-adapter/README.md |
Adds documentation validation commands. |
scripts/test_nvx_tools.py |
Requires documentation checks in all three configuration steps. |
doc/contribute.md |
Lists rustdoc among the adapter’s required checks. |
doc/ci.md |
Documents the new adapter documentation checks. |
.github/actions/check-nvx-rs/action.yml |
Builds adapter documentation with command-scoped warning denial. |
Review effort: Balanced
Pedro Henrique Penna (ppenna)
deleted the
nvx-issue-fix/999-runner-doc-links
branch
October 29, 2026 14:01
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 #999.
Fixes #1003.
RUSTDOCFLAGS="-D warnings" cargo doc --no-depsfails for the runtime adapter in every one of its configurations, and CI never builds the adapter's documentation, so nothing caught it. This fixes the links that break it and adds the check tocheck-nvx-rs.Problem and root cause
Runner, in all three configurations.tests/runtime-adapter/src/exec.rslinks[`Runner`]in its module documentation and inGuestMessage's, and[`Runner::next_message`]inGuestMessage::from_runner's, but its code imports only the modulenvx::exec::runner; onlysrc/worker/executions.rsimportsRunner. They have failed since 3322870 (tests: run executions in the runtime adapter through the shared engine #784).worker::mappinglinks to its private constantsWRITTEN_FILEandWRITTEN, which rustdoc'sprivate_intra_doc_linkslint reports, since 47f8bcd (tests: map the host's mapping tables in the adapter's VMs #878). runtime-adapter: rustdoc fails on unresolved links to Runner in src/exec.rs #999 doesn't list them because only--features guest --target x86_64-unknown-linux-muslbuilds that module; runtime-adapter: rustdoc fails on private-item links in src/worker/mapping.rs #1003, filed since, reports them.check-nvx-rsbuildsnvx-rs's documentation with warnings denied, but not the adapter's.Reproduced on Windows at BASE
e24fd5757, intests/runtime-adapterwithRUSTDOCFLAGS="-D warnings":cargo doc --locked --no-deps ...exec.rs:3,:483,:502--features host--features guest --target x86_64-unknown-linux-muslworker/mapping.rs:14Change
20df05abaruntime-adaptertests/runtime-adapter/src/exec.rsnvx::exec::Runner, as the adapter's other links tonvx's items, such as[`ErrorKind::Io`](nvx::ErrorKind::Io), already do.nvx::execholds the execution engine in every configuration ofnvx, so they resolve in each of the adapter's. ImportingRunnerinstead would warn as an unused import.e91b8fc2bruntime-adaptertests/runtime-adapter/src/worker/mapping.rsmapprobe's file and contents,writtenandruntime-adapter, instead of linking to the private constants, in the words of the README's table of probes, and as the module already names its other constants' values.9de096597ci.github/actions/check-nvx-rs/action.yml,scripts/test_nvx_tools.py,doc/ci.md,doc/contribute.md,tests/runtime-adapter/README.mdRUSTDOCFLAGS="-D warnings" cargo doc --locked --no-depswith its features and target, after its tests and before the MSRV check.RUSTDOCFLAGSis set for that command alone, so that it doesn't reach the doctests thatcargo testcompiles.test_nvx_rs_checks_the_runtime_adapter_in_each_configurationrequires the command in each step, and fails for all three against the action without it. The docs list the check, and the README gives its commands.Two choices that the issue left open, decided conservatively:
devthe same way.Validation
BASE:
devate24fd5757.devhas since moved to24c037003, bydata:commits only, which touch none of these files.Local, on Windows:
git rebase -x:cargo fmt --all --checkand the protocol-only and host-only documentation with warnings denied intests/runtime-adapter, the narrow test above, andpython scripts/check_markdown_links.py, all clean. The guest-only documentation passes frome91b8fc2bon, whose adapter sources the last commit leaves unchanged;20df05abaleaves it failing on the private links, as its message says.check-nvx-rs, extracted from the action and run in Git Bash with the pinned toolchain (1.95.0) and the MSRV (1.89): fmt, Clippy, build, tests (protocol-only 47 passed; host-only 103 passed, 58 VM tests ignored), documentation, and the MSRV check, all clean.x86_64-unknown-linux-musl, all clean.RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps --features guest --target x86_64-unknown-linux-muslintests/runtime-adapter, run again on 2026-10-29: atdev24c037003it fails with the five errors above, includingsrc/worker/mapping.rs:14forWRITTEN_FILEandWRITTEN; at head9de096597it passes without a warning.check-quality: Ruff lint and format, Pyright for Linux and Windows (0 errors), and the Markdown link check.validate-nvx:compileall,test_adversarial.py,test_hosts.py, and the help commands pass. The unittest list ran 1431 tests with 18 failures, all inscripts/test_setup_azure.py, which fails identically at BASE on this machine: itsbashis WSL's launcher, which can't read the tests' Windows temporary paths. The list passes on Linux, below.Hosts:
nvx-kvm-testx86_64-unknown-linux-muslnvx-kvm-testvalidate-nvxunittest list on LinuxCI, run 40836542861, attempt 1, at head
9de0965975c3776423153b0a16cd85e7145426ea: passed, withRequired status check.nvx-rs / ubuntu-latestran the new documentation command in all three of the adapter's configurations, andnvx-rs / windows-latestin the protocol-only and host-only ones, each without a warning. The Ubuntu job also ran the guest-only step's Clippy and MSRV check, which the host's toolchains lack, so they ran on Windows for the same target before.Follow-ups
scripts/test_setup_azure.pyfails on a Windows machine whosebashonPATHis WSL's launcher rather than Git Bash, as it does at BASE; CI's Windows runners use Git Bash. Not changed here.