Skip to content

runtime-adapter: fix its broken doc links and build its docs in CI - #1002

Merged
Pedro Henrique Penna (ppenna) merged 3 commits into
devfrom
nvx-issue-fix/999-runner-doc-links
Oct 29, 2026
Merged

Pedro Henrique Penna (ppenna) merged 3 commits into
devfrom
nvx-issue-fix/999-runner-doc-links

Conversation

@ppenna

@ppenna Pedro Henrique Penna (ppenna) commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #999.
Fixes #1003.

RUSTDOCFLAGS="-D warnings" cargo doc --no-deps fails 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 to check-nvx-rs.

Problem and root cause

Reproduced on Windows at BASE e24fd5757, in tests/runtime-adapter with RUSTDOCFLAGS="-D warnings":

Configuration cargo doc --locked --no-deps ... BASE Head
protocol-only (no options) 3 errors: exec.rs:3, :483, :502 passes
host-only --features host the same 3 errors passes
guest-only --features guest --target x86_64-unknown-linux-musl the same 3, and 2 in worker/mapping.rs:14 passes

Change

Commit Files Change
20df05aba runtime-adapter tests/runtime-adapter/src/exec.rs Points the three links at nvx::exec::Runner, as the adapter's other links to nvx's items, such as [`ErrorKind::Io`](nvx::ErrorKind::Io), already do. nvx::exec holds the execution engine in every configuration of nvx, so they resolve in each of the adapter's. Importing Runner instead would warn as an unused import.
e91b8fc2b runtime-adapter tests/runtime-adapter/src/worker/mapping.rs States the map probe's file and contents, written and runtime-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.
9de096597 ci .github/actions/check-nvx-rs/action.yml, scripts/test_nvx_tools.py, doc/ci.md, doc/contribute.md, tests/runtime-adapter/README.md Each of the adapter's three configuration steps runs RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps with its features and target, after its tests and before the MSRV check. RUSTDOCFLAGS is set for that command alone, so that it doesn't reach the doctests that cargo test compiles. test_nvx_rs_checks_the_runtime_adapter_in_each_configuration requires 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:

  • The issue said to consider the CI check. It is this fix's regression test: without it, the next unresolved link reaches dev the same way.
  • The private links are reworded rather than made public, which would add the constants to the adapter's API only to serve the documentation.

Validation

BASE: dev at e24fd5757. dev has since moved to 24c037003, by data: commits only, which touch none of these files.

Local, on Windows:

  • Each commit, with git rebase -x: cargo fmt --all --check and the protocol-only and host-only documentation with warnings denied in tests/runtime-adapter, the narrow test above, and python scripts/check_markdown_links.py, all clean. The guest-only documentation passes from e91b8fc2b on, whose adapter sources the last commit leaves unchanged; 20df05aba leaves it failing on the private links, as its message says.
  • The protocol-only and host-only steps of 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.
  • The guest-only step's Clippy, documentation, and MSRV check for x86_64-unknown-linux-musl, all clean.
  • runtime-adapter: rustdoc fails on private-item links in src/worker/mapping.rs #1003's command, RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps --features guest --target x86_64-unknown-linux-musl in tests/runtime-adapter, run again on 2026-10-29: at dev 24c037003 it fails with the five errors above, including src/worker/mapping.rs:14 for WRITTEN_FILE and WRITTEN; at head 9de096597 it 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 in scripts/test_setup_azure.py, which fails identically at BASE on this machine: its bash is WSL's launcher, which can't read the tests' Windows temporary paths. The list passes on Linux, below.

Hosts:

Profile Backend Host type Test Result
nvx-kvm-test kvm (no VM booted) virtual-machine The guest-only step's build, tests, and documentation with warnings denied, for x86_64-unknown-linux-musl Pass: 67, 61, and 8 tests passed
nvx-kvm-test kvm (no VM booted) virtual-machine The validate-nvx unittest list on Linux Pass: 1431 tests, 30 skipped

CI, run 40836542861, attempt 1, at head 9de0965975c3776423153b0a16cd85e7145426ea: passed, with Required status check.

  • nvx-rs / ubuntu-latest ran the new documentation command in all three of the adapter's configurations, and nvx-rs / windows-latest in 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.
  • The NVX microVM jobs that the change classification selects for an adapter change passed on Linux/KVM, Linux/MSHV, and Windows/WHP, the runtime adapter's VM suites included. The adapter's changes are documentation comments only, so no VM was booted for this pull request outside CI.

Follow-ups

  • scripts/test_setup_azure.py fails on a Windows machine whose bash on PATH is WSL's launcher rather than Git Bash, as it does at BASE; CI's Windows runners use Git Bash. Not changed here.

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>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 07:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 Runner and 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

@ppenna
Pedro Henrique Penna (ppenna) merged commit dd09289 into dev Oct 29, 2026
42 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the nvx-issue-fix/999-runner-doc-links branch October 29, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants