Repository navigation
host: delete the planner items that only tests use (SL6.6d) - #1543
Merged
Pedro Henrique Penna (ppenna) merged 1 commit intoNov 12, 2026
Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
Pedro Henrique Penna (ppenna) merged 1 commit into
Conversation
Contributor
This pull request changes existing testsIt modifies or removes 14 existing test asset(s), listed below. Review each with care: a change to a test can hide a regression that the test caught. See doc/contribute.md#changes-to-existing-tests. Test code
Relocated unchanged: 0; added: 3. Compared the merge base |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the removal of unused filesystem-planner APIs.
No open issues 🎉
What changed in this PR
Removes five filesystem-planner items unused by NVX programs, preparing for the planner to become private to the CLI in SL6.5a2. The retained explicit-target planning behavior stays unchanged.
Changes:
- Deletes convention-based mapping helpers,
resolve_guest_path, and unused request-construction conveniences. - Updates tests to construct requests directly, retaining policy checks and Windows path-alias coverage.
- Updates documentation and Linux/Windows API snapshots to reflect the removals.
| File | Description |
|---|---|
nvx-rs/tests/security_checklist.rs |
Constructs export requests through a test-local helper. |
nvx-rs/src/lib.rs |
Removes the resolve_guest_path re-export; retains guest_path. |
nvx-rs/src/host/filesystem/tests.rs |
Replaces deleted helpers and consolidates path-alias coverage. |
nvx-rs/src/host/filesystem/mod.rs |
Deletes unused planner items and retains explicit-target validation. |
nvx-rs/src/host/filesystem/guest_path.rs |
Removes resolve_guest_path and its unused import. |
nvx-rs/src/host/cli/run/guest_tokens/tests.rs |
Builds the export request directly for boot-share checks. |
nvx-rs/README.md |
Documents caller-supplied targets and the retained path convention. |
nvx-rs/public-api/windows.txt |
Removes six API entries for the deleted items and re-exports. |
nvx-rs/public-api/linux.txt |
Records the same six API removals on Linux. |
Review effort: Balanced
This was referenced Nov 12, 2026
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/slim-sl6-7b-policy-private
branch
from
November 12, 2026 20:36
893419a to
484e0c7
Compare
Base automatically changed from
agents/slim-sl6-7b-policy-private
to
feature/nvx-refactor
November 12, 2026 20:58
SL6.5a2 (#1125) makes the export planner crate-private and gates it with cli. Five of its items have no caller in any NVX program, only in the public API and in tests, so the warning-denied build of the cli feature would find them dead once they are private. This deletes them first, so that SL6.5a2 stays visibility-only: - resolve_guest_path, with its re-exports at nvx:: and nvx::host::filesystem::, which gave the guest path of a host path once resolved, or as spelled when it did not resolve. No NVX program translates a host path that way. guest_path, the convention itself, stays public at both paths. - Target::Convention, with its branch of resolve_mapping, which derived a mapping's target from its resolved host path, and Mapping::convention, which mapped a list's paths there. NVX's callers, nvx-rs run and the sandbox's shares, give every target. resolve_mapping takes the target that the mapping gives, and checks it as before. - ExportRequest::new, and PathList::EMPTY, which only it used. The CLI builds its requests field by field. The docs of host::filesystem and of plan say that the caller gives each target, which guest_path may derive, and the README's filesystem section follows. The tests keep what they checked of the code that stays: - host::filesystem's tests place each path of their plan helper at the guest path that guest_path derives from the resolved host path, as the convention did, with a convention helper, and build their requests directly: plain_request holds what ExportRequest::new did. - resolved_guest_paths_canonicalize_temp_directory_case_aliases retires with resolve_guest_path. On Windows, spellings_of_one_object_share_its_guest_path now takes its case, the object's whole path in capitals, that of the temporary directory included, whose guest path as spelled is not the resolved path's: it plans to the object's one child, at the resolved path's guest path. - planned_boot_shares_keep_table_sources_targets_access_and_file_kind and the security checklist build their requests directly, the checklist through a helper that takes the owner, which the_caller_owner_is_refused_on_windows sets. The public API snapshots lose 6 lines on each platform, the five items with resolve_guest_path at both of its paths, and gain none. Part of #1122 (SL6.6d). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/slim-sl6-6d-planner-test-only
branch
from
November 12, 2026 21:01
3e29656 to
c6d9d60
Compare
Pedro Henrique Penna (ppenna)
marked this pull request as ready for review
November 12, 2026 21:02
Pedro Henrique Penna (ppenna)
merged commit Nov 12, 2026
d67a2d5
into
feature/nvx-refactor
85 checks passed
Pedro Henrique Penna (ppenna)
deleted the
agents/slim-sl6-6d-planner-test-only
branch
November 12, 2026 21:19
This was referenced Nov 12, 2026
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.
Leaving code only. This PR changes only code that this effort removes from NVX: five items of
nvx::host::filesystemthat no NVX program calls,resolve_guest_pathwith its re-exports atnvx::andnvx::host::filesystem::,Target::Conventionwith its branch ofresolve_mapping,Mapping::convention,ExportRequest::newandPathList::EMPTY, with the edits that remove references to them. Nothing that stays changes, and no later PR uses what it changes, so the size limits for kept code don't apply.Part of #1122 (SL6.6d, "the planner items that only tests use are gone", recorded on #1122). Parent #1087, umbrella #1076.
It was stacked on #1539 (SL6.7b), which merged, and its base is now
feature/nvx-refactor. SL6.5a2 (#1544, #1125) stacks on this one and makes the export planner private to the CLI, which would leave these five items dead; the note on #1125 records thatresolve_guest_pathgoes rather than becoming private.What and why
SL6.5a2 makes the export planner of
nvx::host::filesystemcrate-private and gated bycli. Five of its items have no caller in any NVX program, only in the public API and in tests, so the warning-denied build of theclifeature finds them dead once private: Clippy reportsresolve_guest_path, the variantConvention,Mapping::convention,PathList::EMPTYandExportRequest::newon Windows, Linux and macOS. As SL6.6b did for SL6.4 and SL6.6c for SL6.7b, this PR deletes them first, so that SL6.5a2 stays visibility-only. One commit,host: delete the planner items that only tests use(c6d9d604):resolve_guest_path, with its re-exports atnvx::andnvx::host::filesystem::, which gave the guest path of a host path once resolved, or as spelled when it did not resolve. No NVX program translates a host path that way.guest_path, the convention itself, stays public at both paths. The import ofcanonicalizethat only it used goes with it.Target::Convention, with its branch ofresolve_mapping, which derived a mapping's target from its resolved host path, andMapping::convention, which mapped a list's paths there. NVX's callers,nvx-rs runand the sandbox's shares, give every target asTarget::Guest.resolve_mappingnow takes the target from the mapping and checks it as theGuestbranch did, with the same messages, after the host path resolves, as before. The two messages that only the convention's branch made ("has no guest path; use an absolute local path", and "would cover the guest's …" without the target) go with it; no NVX program could reach them.ExportRequest::new, andPathList::EMPTY, which only it used. The CLI builds its requests field by field.host::filesystem's module docs andplan's say that the caller gives each target, whichguest_pathmay derive from a resolved host path, and the README'snvx::host::filesystemsection dropsresolve_guest_pathand the convention's targets.ExportRequest::new,Mapping::convention,PathList::EMPTY,Target::Convention, andresolve_guest_pathat both of its paths. Nothing is added.What NVX's programs do with host paths doesn't change: resolution, reserved targets, policy paths, aliases, OpenVMM's limits and the pins.
BOOT_CONTRACT_VERSIONandCONTROL_CONTRACT_REVISIONdon't change either.Size
Measured against
adfc481e2cb(feature/nvx-refactorwith SL6.7b), by #1076's rules: leaving code only, no limit. The measuring script counts 17 added or changed code lines: 16 inresolve_mapping, whose target checks lose thematcharound them and move left, and the root's re-export. Counted files: 3,src/host/filesystem/{mod, guest_path}.rsandsrc/lib.rs. 9 files change: +145 and −182 lines, tests, docs and snapshots included.Old tests of the area
host::filesystem::tests::resolved_guest_paths_canonicalize_temp_directory_case_aliases(Windows), withresolve_guest_path. Its case moves tospellings_of_one_object_share_its_guest_path, as the note on nvx-rs slimming 4.3.2: path rules are private to the CLI, and the export holds paths only #1125 promises (below).host::filesystem, the CLI's tests, and the integration and doc tests.Test changes
python scripts/check_test_changes.py --base adfc481e2cblists 14 changes to existing tests and 3 added helpers, hencetests-modified:nvx-rs/src/host/filesystem/tests.rs(10, and 2 added helpers):planmaps each path of aFilesystemPolicyat the guest path that the new helperconventiongives it,guest_pathof the resolved host path, asTarget::Conventiondid, in the same order and under the same list names, throughTarget::Guest, and builds its request directly. A path that doesn't resolve takes an empty target, which the planner never reads: it refuses such a path first, with the same message as before. So the 17 tests that plan aFilesystemPolicykeep every assertion; the one convention-only message that one of them could reach, for/usron Linux inunenforceable_policies_are_rejected, isn't asserted, only itsUnsupportedkind, which stays.plain_requestholds whatExportRequest::newdid, for the 7 tests that called it:explicit_targets_place_mappings_at_any_free_guest_path,policy_paths_hide_show_and_narrow_writes,narrowed_writes_pin_only_what_lies_in_writable_paths,the_caller_owner_reaches_openvmm_on_linux_hosts,read_write_mappings_to_which_writes_are_narrowed_stay_visible,denied_mapped_directories_inside_denied_ones_show_their_allowed_pathsandmapped_paths_resolve_to_utf8_paths.spellings_of_one_object_share_its_guest_pathtakes the retired test's Windows case, the temporary directory's case alias: the object's whole path in capitals, that of the temporary directory included, whose guest path as spelled differs from the resolved path's, as the retired test asserted and this one still does. Every spelling plans to the object's one child at its resolved path, with one read-only bind at the resolved path's guest path; it now also checks the child's count and root.resolved_guest_paths_canonicalize_temp_directory_case_aliases: retired (above).nvx-rs/src/host/cli/run/guest_tokens/tests.rs(1):planned_boot_shares_keep_table_sources_targets_access_and_file_kindbuilds its request directly, with the CLI's list names and the VMM owner, asExportRequest::newdid; its imports follow.nvx-rs/tests/security_checklist.rs(3, and 1 added helper):planplans through the new helperrequest, which builds the request directly with an owner, andthe_caller_owner_is_refused_on_windowsasks it for the caller owner, in place of setting the owner ofExportRequest::new's request; the imports follow. SL6.5a2 moves these export tests tohost::filesystem's unit tests.doc/acceptance-case-matrix.mdnames none of these tests or items, andcheck_matrix.pypasses.Validation
local_gates.py --files(fromdev) selectstest-changes,markdown-links,test-layout, thecheck-nvx-rssteps andnvx-cli; I ran them from this branch's action definitions, with Rust 1.95.0, locally on Windows and onnvx-mshv-test(Azure Linux 3, kernel 6.18, linux-mshv, virtual machine), in a temporary worktree. No NVX program called these items, so nothing changes what a VM shows, and no microVM scenario needs to run. Everything ran first on0da7043def2, on SL6.7b's earlier headede4ebe359f, and again on3e29656ec07, on893419a7c68, and passed. Then the guest and NVXC chains, SL6.6c and SL6.7b's restack landed under it, and the commit was rebased onto SL6.7b's last head484e0c7ff03asc6c3a9b66fb, with one conflict, in the imports oftests/security_checklist.rs, which had lostprocessbelow it; everything ran again there and passed. SL6.7b then merged asadfc481e2cb, with the same tree as484e0c7ff03, and the commit moved onto it asc6d9d6042b8, with the same tree asc6c3a9b66fb(git range-diff: context only). On that tree:cargo fmt --all --check-D warnings:--all-targets --all-features,--lib,--lib --no-default-features, andserde,cliandtestingalone--target x86_64-unknown-linux-gnu, and--all-targetswith default features--all-targets --no-default-features --features guest--target x86_64-unknown-linux-musl --no-default-features --features guest -D warningscheck-guest-binaries)cargo check --all-targets --all-features --target aarch64-apple-darwinhost/snapshot/tests.rs, is the base'scargo test --locked --all-featurescli113 passed, 2 ignored;security_checklist7 passed; every other integration and doc testcli123 passed;security_checklist6 passed; every other integration and doc testcargo test --locked,cargo build --locked --lib --no-default-features,cargo test --locked --lib --no-default-featuresRUSTDOCFLAGS=-D warnings cargo doc --locked --no-deps --all-featurescargo +1.89 check --locked --all-targets --all-featurespython scripts/public_api.pycheck_test_layout.py,check_matrix.py <worktree> 99d2022085fcli-gated (SL6.5a2's change),cargo clippy --lib --bins --features cli -D warningsreported exactly these five items, natively and forx86_64-unknown-linux-gnuandaarch64-apple-darwin; the other feature sets don't build the planner.CI run 43306214365 on
c6d9d6042b8passed: 33 jobs succeeded, among them the microVM scenarios on KVM, MSHV and WHP, and 9 were skipped as for every pull request (OpenVMM CI of the pinned revision, for the unchanged pin, the debug kernels, publishing and performance records).