Repository navigation
Description
Parent: #1087, in #1076. Needs: #1121. Unblocks: #1123, #1124, #1125. No PR of this group merges before the API-ready commit.
Leaving code only. Every PR in this group changes only code that this workstream removes from NVX: the old config types, the old launch code, its one-shot launch and checked-file transfer, and the bundled feature, with the edits that remove references to it. Nothing that stays changes, and no later PR uses what these PRs change, so the size limits for kept code don't apply. Each PR still records its core lines and counted files, and its description opens with this note.
Goal. The old config types and the rest of host::launch, the old aggregate naming and boot rendering, NVX's old guest tokens, the one-shot foreground launch, the checked-file transfer and spawn_command are gone, with the crate-private code that those deletions leave unused. The shell /init stops reading OpenVMM's lifecycle tokens. The private OS layer keeps only the launch code that host::vm::spawn uses. bundled, its build script and its variables go; NVX_OPENVMM, NVX_AUTO_DOWNLOAD and NVX_RS keep their meaning.
Notes.
- Both PRs take more than 5 counted files. Deleting the old configs and launch code touches 9 files, and removing
bundled10, all of which only lose code. - Mixed mount modules stay until their last user. SL6.3 removes only the rendering functions;
plan_mounts,plan_mounts_withandpath_textstay for nvx-rs slimming 4.3.1: image staging, artifact discovery, the policy-file reader and the mount syntax are private to the CLI #1124. - The fake OpenVMM already owns its emulated tokens. nvx-rs slimming 3.1.4:
runuses the new interface and the CLI's own guest tokens #1109 removed its use of the old token constant before SL6.3 deletes it.
PRs, in order. Each PR has one goal, leaves dev green, and names in its description each old test of its area as kept, rewritten or retired, with each change that check_test_changes.py reports. Its tests follow the repository's test layout: a module's unit tests, and the code that only they use, sit in its tests.rs or tests/ and move with it. The estimates count core lines (code, not comments, docs or tests) and counted files; each PR records its measured values. Each PR does what its Scope says and no more: a case, input or layout that its Scope doesn't name, and whatever "Not in this PR" lists, is out of scope. Address every review comment within the scope, and ask before acting on one that asks for more.
-
SL6.3: The old config types are gone.
- Objective: The old configuration, launch model, one-shot foreground launcher and checked-file transfer are no longer used. They, the generic spawn helper, aggregate rendering and guest tokens are deleted, while VM spawning keeps its private synchronization and failed-spawn cleanup.
- Contents: Leaving code. Delete
LaunchSpec,SandboxPlan,SandboxLaunch,SandboxSettings,SandboxNetworkandCaptureClass, the parts ofhost::sandboxthat only they use,preparedincluded, the old aggregate naming and boot rendering (aggregate_child_name,aggregate_child_argument,mount_argument,BootShares,boot_shares,aggregate_share_tokens,aggregate_command_line_fragmentandexport_command_line_fragment;plan_mounts,plan_mounts_withand the sharedpath_textstay for SL6.7b), and NVX's guest tokens, which the CLI now renders, withWORKLOAD_ACCOUNT_TOKENand the workload limits. The rest ofhost::launchgoes too:WorkloadIdentity(DEFAULT,select),MAX_TIMEOUT,DEFAULT_MEMORY_MIB,DEFAULT_HOSTNAME,base_command_line,kernel_parameters_problem,timeout_problemandLaunchSpec::check_process_command_line;DEFAULT_GUEST_NETWORK,COMMAND_LINE_BUDGETand the Windows command-line helpers already live inhost::config. Whatdevadded on the old path goes too:VmmLaunch(withRESERVEandarguments) andLaunchSpec::vmm_launch,OPENVMM_COMMAND_LINE_RESERVE,SandboxPlan::check_adapter_launchandPreparedLaunch::adapter_arguments;VmConfig::check_command_linekeeps their guarantee. Delete the old one-shot foreground launch inplatform's Linux and Windows paths andhost::sys::process, WindowsLaunchedProcess::{wait_timeout, request_termination}, the checked-file handoff (Inherited::proc_path,ProcessHandle::close_inherited), the genericspawn_command, and the crate-private code that these deletions leave unused; the internal spawn lock and termination after a failed spawn stay. The shell/initstops reading OpenVMM's lifecycle tokens, and so stops handing a layered root that has one tonvx-init-agent. - Scope:
- Delete the old config types and their
host::sandboxcode, includingprepared; delete old aggregate and boot rendering, but keepplan_mounts,plan_mounts_withand sharedpath_textfor nvx-rs slimming 4.3.1: image staging, artifact discovery, the policy-file reader and the mount syntax are private to the CLI #1124. - Delete the remaining old
host::launchvalues and checks,VmmLaunch, its reserve and arguments, and the adapter launch checks; keep command-line helpers inhost::configandVmConfig::check_command_line. - Delete NVX's guest tokens,
WORKLOAD_ACCOUNT_TOKENand workload limits, and stop the old launch paths and shell/initfrom reading or passing the obsolete lifecycle and workload tokens. - Delete the Linux and Windows one-shot foreground launch paths, their
host::sys::processcode, and WindowsLaunchedProcess::{wait_timeout, request_termination}. - Delete
Inherited::proc_path,ProcessHandle::close_inherited,spawn_command, and crate-private code left unused; keep the internal spawn lock and termination after a failed spawn. - Retire the deleted paths' tests and remove the production seam entry for
sandbox/plan.rs; retained mount syntax, image staging, path rules, spawn-lock and failed-spawn tests stay.
- Delete the old config types and their
- Not in this PR:
- Rewriting, refactoring or improving retained mount planning, path handling, VM configuration or VM spawning.
- Re-homing deleted config, renderer, token, one-shot launch or checked-file APIs, or adding replacements.
- Deleting
plan_mounts,plan_mounts_withorpath_text; nvx-rs slimming 4.3.1: image staging, artifact discovery, the policy-file reader and the mount syntax are private to the CLI #1124 still needs them. - Changing
DEFAULT_GUEST_NETWORK,COMMAND_LINE_BUDGET, retained Windows command-line helpers, the private spawn lock or failed-spawn termination. - Incrementing a contract version; this workstream keeps the existing version.
- Approach: Delete the named config, rendering, foreground-launch, checked-file and generic-spawn items, remove their references, and retire their tests. Follow the compiler to delete crate-private code that becomes unused. Edit the shell init only to remove the three obsolete tokens and route. Keep retained mount, command-line, VM-spawn, spawn-lock and failed-spawn code at their current owners.
- Done when:
- The Test changes report lists the deleted config, launch, aggregate-rendering, checked-file, foreground-launch and generic-spawn cases as removed, and the description retires each one.
- The old launch paths pass neither
--microvm-lifecyclenor--microvm-workload-identity, and the shell/initno longer recognizes their three tokens. - The internal spawn-lock and failed-spawn termination tests still pass.
- Mount syntax, image-staging and path-rule tests remain.
- Needs: SL6.1, in nvx-rs slimming 4.2.2: the old clone path, template store and sandbox store are gone #1121.
- Estimate: 0 core lines (deletions), 9 counted files.
-
SL6.6a: The
bundledfeature is gone.- Objective: The
bundledfeature and its release-staging contract have no remaining user. The feature, build script, artifact manifest and private bundle variables are deleted from code and tooling without changing the retained discovery and download contracts. - Contents: Leaving code. CI's check action and mutants workflow,
crate_release.py, the guest build's inventory (build_constants.py) and the provenance inventory ofnvx.py'snvx-rs(nvx_rs.py'ssource_files(), which requires each file that it lists) stop building, checking or listingbundledand its build script. Delete the build script,links = "nvx",artifacts.jsonand its release check,NVX_BUNDLE_DIR,NVX_BUNDLE_HYPERVISOR,NVX_BUNDLE=skipandDEP_NVX_ARTIFACTS_DIR, from the manifest,lib.rs,contract.rs,host::artifactsand the CLI's downloads.contract::manifest_mismatches, whichdevadded, with the time ABI's and the restore packets' fields, stays incontract: the CLI's discovery and downloads check manifests with it. - Scope:
- Delete
nvx-rs/build.rs, thebundledfeature,links = "nvx",artifacts.jsonhandling and its release check. - Remove
NVX_BUNDLE_DIR,NVX_BUNDLE_HYPERVISOR,NVX_BUNDLE=skipandDEP_NVX_ARTIFACTS_DIRfrom the manifest,lib.rs,contract.rs,host::artifactsand the CLI downloads. - Remove
bundledand its build script from the check action, mutants workflow,scripts/nvx_tools/crate_release.py, the guest build inventory inscripts/nvx_tools/build_constants.py, and the provenance inventory inscripts/nvx_tools/nvx_rs.py(source_files()), which fails on a listed file that is missing. - Keep
NVX_OPENVMM,NVX_AUTO_DOWNLOAD,NVX_RSandcontract::manifest_mismatcheswith its time and restore fields.
- Delete
- Not in this PR:
- Rewriting, refactoring or improving retained artifact discovery, downloads or release tooling.
- Moving the bundle build script or artifact manifest elsewhere.
- Adding a replacement embedding, staging or bundle feature.
- Changing the meaning of
NVX_OPENVMM,NVX_AUTO_DOWNLOADorNVX_RS. - Deleting
contract::manifest_mismatches; retained discovery and downloads use it.
- Approach: Remove the feature and every fixed reference to its build script, manifest and four private variables from the listed inventories and consumers. Keep the retained environment variables and manifest comparison code untouched; do not redesign packaging or artifact discovery.
- Done when:
- Release checks no longer expect
artifacts.jsonor the deleted bundle variables. - CI, mutant, guest-build and provenance inventories no longer build, check or list
bundledornvx-rs/build.rs, andnvx.pystill records and checks the provenance of thenvx-rsthat it builds. - Image-staging and retained artifact tests still pass.
NVX_OPENVMM,NVX_AUTO_DOWNLOAD,NVX_RSandmanifest_mismatchesremain.
- Release checks no longer expect
- Needs: SL6.1, in nvx-rs slimming 4.2.2: the old clone path, template store and sandbox store are gone #1121.
- Estimate: 50 core lines, 10 counted files.
- Objective: The
Tests. Each PR retires the tests of what it deletes, including the old config, launch, one-shot, checked-file-transfer and bundle checks. After SL6.3, /init no longer recognizes the old lifecycle or workload tokens, and no layered root reaches the old init. Tests of the private spawn lock, failed-spawn termination, mount syntax, image staging and path rules stay. Release and guest-build inventories no longer expect bundled, its variables, artifacts.json or nvx-rs/build.rs.
Done when: every PR above has merged, with dev green.
Activity
esaurez commentedon Nov 10, 2026
Workstream source/progress checkpoint - 2026-11-10 UTC
Checked boxes below mean merged scope, not merely an implemented first iteration. Implementation branches are source checkpoints, not automatic qualification, Ready or merge approval. Some starting inputs are frozen/anonymous commits rather than standalone branches; their exact SHAs and known merged producer refs are recorded explicitly.
SL6.3 - no completed first-iteration handoff recorded. Inspect any preserved partial/prior work before implementing the issue's scope.
SL6.6a - no completed first-iteration handoff recorded. Inspect any preserved partial/prior work before implementing the issue's scope.
The original technical scope remains authoritative, supplemented only by any portable technical clarification in this issue. No machine-specific execution policy is part of this checkpoint.
ppenna commentedon Nov 11, 2026
A note for this group's review, before SL6.3 deletes the old checked-file transfer (
host::sandbox::prepared,Inherited::proc_path):The new launch paths already name their images by path. That covers
sandbox start(#1460),sandbox run(#1490), and the restored start in #1486.dev's launches instead hand OpenVMM the checked files:/proc/self/fd/Non Linux, final paths with held handles on Windows. So with the new paths, a file that takes an image's path after its binding check is the one OpenVMM opens. A Copilot review thread on #1491 pointed this out (r4542527832).The library's docs make callers keep images in a directory that only their own account can write (
host/sandbox/distro.rs,host/sandbox/scratch.rs,host/seal.rs). Under that precondition, no other account can replace a checked path, so the workstream's design holds. SL5.1a's security checklist (#1488) checks that precondition.Please confirm in SL6.3, or in the design docs of SL6.10b (#1130), that this is the intended model, since the descriptor handoff goes away for good there.
ppenna commentedon Nov 12, 2026
Note for SL6.3, from SL6.1 (#1121). After SL6.1,
host::supervisoris a transitional module that only re-exports the low-level spawn items:spawn,spawn_vm,VmmCommand,Launched,Inheritedandspawn_command. Code that stays reaches them only there:examples/external-launch.rs, which callsspawn_vm;tests/checked_handoff.rs;PreparedLaunchdoctest.SL6.3 deletes
spawn_commandand the checked-file handoff. Along with them, it should settle:external-launchexample launches OpenVMM;host::supervisormodule, and updating the case-matrix rows that namechecked_handoff.rs.host: delete the sandbox store, the instance layer and the supervision
host: delete the sandbox store, the instance layer and the supervision
host: delete the sandbox store, the instance layer and the supervision
ppenna commentedon Nov 12, 2026
Note for SL6.3, from SL6.1 (#1520). SL6.1 keeps 11 cases in
nvx-rs/tests/supervisor.rs. They test onlyhost::processand the transitionalsupervisor::spawn, and they are the only tests of:#1121's Tests rule keeps tests of code that stays. When SL6.3 removes the
host::supervisormodule, it should move these cases to the owner of that code rather than retire them, unless the code goes with it.ppenna commentedon Nov 12, 2026
SL6.3 design decisions (made for Pedro Henrique Penna (@ppenna)):
host::supervisorand theexternal-launchexample: the example gets its own minimal launcher onstd::process, andhost::supervisorgoes entirely. This matches SL2.8b, in which the caller supplies its own spawn, and leaves no public low-level spawn. The example's docs say what a production launcher adds: handle hygiene, a new session and umask on Linux, a job on Windows. The 11 kept cases oftests/supervisor.rs, and the 2 cases oftests/checked_handoff.rsthat test code that stays, move to their owners.run's export fragment and size limit, move offhost::sandboxin a preparatory kept-code slice, SL6.0f (nvx-rs slimming 4.2.1: the code that stays stops using what leaves #1120). SL6.3 then deletes the old types whole, and stays leaving-code-only.vm::spawn's private foreground mode stays:inherit_only,SpawnMode::Foregroundand WindowsLaunchedProcess::wait_timeout, whichrunandsandbox runuse. This follows the Goal: "the private OS layer keeps only the launch code thathost::vm::spawnuses".workload-identityandmanaged-lifecyclealso put the CLI's own tokens on--cmdline, and stay kept once/initstops reading OpenVMM's lifecycle tokens.checked_handoff.rsdrop the deleted coverage, andimages_replaced_after_the_checks_never_reach_the_vmretires under the by-path model.host: delete the sandbox store, the instance layer and the supervision
host: delete the sandbox store, the instance layer and the supervision
examples: take Transport from host::transport
host: make the platform layer private to the crate
guest: stop reading OpenVMM's lifecycle tokens in the shell init
51 remaining items
ppenna commentedon Nov 12, 2026
Added slice: SL6.6c, "the sandbox accessors that only tests use are gone" (leaving code only). Found while preparing SL6.7b (#1124).
Once SL6.7b makes
host::sandboxcrate-private, 12 items innvx-rs/src/host/sandbox/lose their only caller, the public API, in every feature set. Only tests use them:MountAccess::from_name,MountOwner::from_nameandMountKind::from_name, with their helpersetting_from_name. The CLI parses mounts with the*_withvariants.SandboxMount::{guest_target, access, policy, owner, kind, absolute, absolute_policy_paths}.SandboxOptions::new.Making them crate-private, as #1124 plans, would leave them dead, so SL6.6c deletes them first. Its tests compare whole
SandboxMountvalues or read its fields, call the variants that production code uses, and build the options with a test helper. SL6.7b then stays visibility-only, as SL6.4 did after SL6.6b.host: delete the artifact discovery that no NVX program uses
host: delete the binding and checked-file accessors that nothing reads
host: delete the artifact discovery that no NVX program uses
host: delete the binding and checked-file accessors that nothing reads
ppenna commentedon Nov 12, 2026
Added slice: SL6.6d, "the planner items that only tests use are gone" (leaving code only). Found while preparing SL6.5a2 (#1125).
Once SL6.5a2 makes the export planner crate-private and
cli-gated, five items have no caller in any NVX program in any feature set. Only unit and integration tests use them:resolve_guest_path, with its re-exports atnvx::andnvx::host::filesystem::;Target::Convention, with its branch ofresolve_mapping;Mapping::convention;ExportRequest::new;PathList::EMPTY, which onlyExportRequest::newuses.SL6.6d deletes them first. Its tests place each mapping at an explicit
Target::Guestpath, whichguest_pathderives from the resolved host path, and buildExportRequestvalues directly. The README's filesystem section and the API snapshots follow. SL6.5a2 then stays visibility-only, as SL6.4 did after SL6.6b and SL6.7b after SL6.6c.host: delete the sandbox accessors that only tests use
host: delete the planner items that only tests use
host: delete the sandbox accessors that only tests use
host: delete the sandbox accessors that only tests use
host: delete the planner items that only tests use
host: delete the planner items that only tests use
ppenna commentedon Nov 12, 2026
Completed on
feature/nvx-refactor. Every slice of this group has merged, including the three leaving-code slices added in comments here:/initfails closed when OpenVMM's identity tokens disagree withnvx_identity=.bundledfeature and its build script are gone.resolve_guest_pathincluded.The push CI run at
d67a2d5ab57, which contains all of them, passed: https://github.com/microsoft/nvx/actions/runs/43309050295