Skip to content

host: delete the sandbox store, the instance layer and the supervision (SL6.1) - #1520

Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
agents/slim-sl6-1-sandbox-store
Nov 12, 2026
Merged

Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
agents/slim-sl6-1-sandbox-store

Conversation

@ppenna

@ppenna Pedro Henrique Penna (ppenna) commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Leaving code only. This PR changes only code that this effort removes from NVX: the sandbox store (host::store), the instance layer (host::instance), the supervisor's store-coupled launch, wait, stop and reattach, and the last store identities, activation::Identity, StoreGeneration and TemplateReference, with the crate-private code that only they used and 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.

Beyond what leaves, the modules that it edits only lose crate-private items that only the deleted code used, as the compiler's dead-code check finds them. They also gate by cli what only the CLI's own store uses now, and make SpawnLock and lock_spawns crate-private for host::vm::spawn's lock, with the rustdoc, README and test assertions that named them. Those modules are host::platform, host::snapshot, host::runtime, host::sandbox, host::spawn, host::cli and activation. host::supervisor stays as a transitional re-export, below.

Part of #1121 (SL6.1, "The sandbox store and its supervisor are gone"). Parent #1087, umbrella #1076.

Rebased on feature/nvx-refactor at a732c108, where every PR that it needed has merged: #1507 (SL6.2b), #1513 (SL6.2a), #1501 (SL3.10c), #1503 (SL3.10d), #1518 (SL6.0d) and #1519 (SL6.0e). It is one commit, ba716d48.

What and why

With the old clone path and the template store gone (SL6.2b, SL6.2a), and the code that stays off them (SL6.0a to SL6.0e), nothing uses the sandbox store, the instance layer that ran a VM in a store of its own, or the supervisor's store-coupled launch, wait, stop and reattach. This PR does SL6.1's Scope, in one commit:

  • host::instance and host::store go whole: nvx-rs/src/host/instance/ (Instance, Found, Running, Started, Stopped, WorkloadOutcome, its files and locked state) and nvx-rs/src/host/store/ (SandboxStore, LockedStore, LaunchId, the runtime and launch records, the caller's files, the store's names, leases, locks and lifecycle), with their tests.rs files.

  • host::supervisor loses all supervision: launch.rs, reattach.rs, vmm.rs and tests.rs, with launch, Starting, reattach, Reattached, Vmm, StopOutcome and Stopped. The public SpawnLock and lock_spawns become crate-private in host::platform::inherit, where host::vm::spawn's private lock and spawn_command still take them.

  • The last store identities go: activation::Identity, StoreGeneration and TemplateReference, with the snapshot key's conversions between KeyIdentity and activation::Identity.

  • The public API snapshots lose 236 items on each platform: 129 of host::store, 60 of host::instance, 37 of host::supervisor and 10 of activation. None is added.

  • The crate-private code that only the store, the instance and the supervision used goes with them, as the dead-code check of CI's warning-denied builds of each feature set finds it on Linux and Windows. That is platform::control_endpoint and endpoint_server_pid on every host, and Directory's open_file, search, search_dir and open_dir, with Linux's open_dir_with.

  • What only the CLI's own store uses now is gated by cli on every host, as nvx-rs slimming workstream: make nvx a library of mechanisms and value types #1076's rule for crate-private items gated "by the features of their users" asks and as SL6.2a did for rename_no_replace:

    • endpoint_server_pid_until, is_deleted, file_id, opened_file_id, opened_file_identity, Directory, and the log claim's claim_log, log_claim_held and serves_launch;
    • Linux's log_claim module and restore_private_file_mode;
    • Windows' log_job_processes, check_store_dir and delete_opened, and its re-exports of opened_file_id and create_store_dir, whose functions its own VM directories and log jobs still use;
    • the handle that a log job's name holds (LogJobName::Users) expects to be dead without cli, since only the CLI's claim checks query the job's processes.

    vm::spawn's support, the log claims of platform/{linux,windows}/log_claim.rs and the private spawn lock don't change.

  • The docs stop naming what left:

    • rustdoc: the crate's example, now a cold boot and a stop through host::vm, and its module list; the host module's; and the docs of the runtime, the spawn, the process inheritance, PreparedLaunch and the CLI's store;
    • Cargo.toml's comment on the host feature;
    • nvx-rs/README.md: the layout, the module table (the rows of host::store and host::instance go, and host::supervisor's says what is left), the runtime, VM, snapshot, supervisor, launch, CLI-sandbox and state-directory sections, the example, the errors and the tests. The sections of nvx::host::store and nvx::host::instance go;
    • doc/run.md's sandbox-store rules and doc/project-structure.md's crate summary.
  • The case matrix retires the doc tests nvx-rs/src/host/store/mod.rs - host::store (line 72), (line 104) and nvx-rs/src/host/supervisor/mod.rs - host::supervisor (line 32). It rewrites nvx-rs/src/lib.rs - (line 58) as nvx-rs/src/lib.rs - (line 61), the cold boot and stop through host::vm, and turns its row from kept to rewritten, as the orchestrator decided for Pedro Henrique Penna (@ppenna). The README's Example row notes the same, and the Docs summary now counts 36 doc tests: 28 kept, 2 rewritten, 6 retired.

Deviation from #1121: host::supervisor stays as a transitional re-export

#1121's Scope deletes host/supervisor/ whole, with tests/supervisor.rs. But code that stays came to use the low-level spawn items, which are public only through host::supervisor, after the plan was written: nvx-rs/examples/external-launch.rs (b2a70a3a, 2026-11-10) launches a caller's vm::VmmCommand with supervisor::spawn_vm, and tests/checked_handoff.rs and the doc test of PreparedLaunch spawn through it too. As the orchestrator decided for Pedro Henrique Penna (@ppenna), and as it records on #1121 and #1122, nvx-rs/src/host/supervisor/mod.rs stays only as the transitional public path of these items. It re-exports spawn, spawn_vm, VmmCommand, Launched, Inherited and spawn_command, has no code of its own, and supervises nothing. Its module doc says so, and names SL6.3 (#1122), which deletes spawn_command and the checked-file handoff and settles the example's launcher. This keeps the Approach's intent, no supervision facade. It adds no public API and changes no code that stays.

For the same reason, tests/supervisor.rs keeps the cases of what stays, as #1121's Tests ask ("Each PR retires the tests of what it deletes. … Every other test passes unchanged"). Its cases of host::process and of the low-level spawn that host::supervisor still exports stay unchanged:

  • the wait, reference and permission tests of host::process;
  • the inheritance test while other threads spawn;
  • the working-directory limit of a Windows spawn;
  • the spawn of a VMM that breaks away from its launcher's job, and of one that ends with it.

They are the only tests that spawn with breakaway_from_job or check the 258-unit working directory, which a code review flagged. Its cases of a launch through a sandbox store, with their orchestrator fixture, retire (below). The orchestrator may prefer to retire the whole file, as the Scope's wording says: that is one commit away.

Every removed test, and its fate

python scripts/check_test_changes.py --base origin/feature/nvx-refactor reports 345 changes to existing tests. They are 143 removed tests, 21 modified tests, 16 modified helpers, the imports of 8 test modules, and the removed helpers, modules, imports and attributes of the deleted test files, with the 10 record fixtures of tests/fixtures/store/. All 143 removed tests retire, since what they check leaves NVX. None is named in the case matrix, as coverage or otherwise (git grep of each name):

  • the unit tests of the sandbox store (66: host::store::tests, host::store::caller::tests, host::store::lifecycle::tests and its Windows module), the instance (8) and the supervisor's launch, reattach, wait and stop (24), and the 17 cases of tests/store.rs;
  • the 12 cases of tests/fake_openvmm.rs, the instance's integration cases. The fake OpenVMM's own cases moved to tests/fake_openvmm_behavior.rs in nvx-rs slimming 4.2.1: the code that stays stops using what leaves #1120 and stay;
  • the 12 cases of tests/supervisor.rs that launch, reattach to or stop a VMM through a sandbox store, with their orchestrator_fixture. long_stores_launch_with_a_short_working_directory launched through a store whose path is too long for a working directory, and working_directory_limits_include_trailing_separators keeps checking the limit of the spawn. a_vmm_that_breaks_away_survives_its_orchestrators_job and a_vmm_in_its_orchestrators_job_ends_with_it reattached through the store, and a_restarted_launcher_finds_its_vmm_again_and_ends_it and a_job_that_ends_its_vmm_wakes_the_waiters keep checking both behaviors of the spawn;
  • activation::tests::a_store_generation_is_a_nonzero_number_in_the_order_of_publication, the test of StoreGeneration;
  • host::snapshot::key::tests::a_key_identity_is_the_identity_that_names_a_clones_template, the test of KeyIdentity's conversions to and from activation::Identity;
  • host::cli::store::tests::the_lock_and_the_files_are_those_of_the_sandbox_store_of_nvx, which checked that the CLI's store shares the sandbox store's lock and file names; the CLI's store keeps them;
  • host::platform::windows::tests::a_launch_whose_vmm_exited_ends_while_a_process_spawned_in_its_window_holds_its_log, which launched through the store.

The doc tests nvx-rs/src/host/store/mod.rs - host::store (line 72), (line 104) and nvx-rs/src/host/supervisor/mod.rs - host::supervisor (line 32), which the report doesn't list, retire too, and nvx-rs/src/lib.rs - (line 58) becomes (line 61), as the case matrix's Docs rows say.

nvx-rs/src/activation/tests.rs (activation::tests): 1

a_store_generation_is_a_nonzero_number_in_the_order_of_publication

nvx-rs/src/host/cli/store/tests.rs (host::cli::store::tests): 1

the_lock_and_the_files_are_those_of_the_sandbox_store_of_nvx

nvx-rs/src/host/instance/tests.rs (host::instance::tests): 3

interrupted_writes_leave_temporary_files_that_only_their_removal_takes, readiness_failures_explain_images_without_workload_accounts, session_failures_have_the_codes_of_their_kinds_but_a_closed_endpoint

nvx-rs/src/host/instance/tests.rs (host::instance::tests::store): 5

instances_that_record_no_vm_need_no_runtime_identity, stopped_instances_are_removed_with_the_callers_files, records_of_the_earlier_format_fail_naming_it, launches_are_checked_before_the_instance_exists, working_directory_limits_are_checked_before_instance_launches

nvx-rs/src/host/platform/windows/tests.rs (host::platform::windows::tests): 1

a_launch_whose_vmm_exited_ends_while_a_process_spawned_in_its_window_holds_its_log

nvx-rs/src/host/snapshot/key/tests.rs (host::snapshot::key::tests): 1

a_key_identity_is_the_identity_that_names_a_clones_template

nvx-rs/src/host/store/caller/tests.rs (host::store::caller::tests): 6

declarations_keep_their_names, names_that_leave_the_directory_are_refused_on_every_host, names_that_a_file_system_could_take_for_others_are_refused, names_that_collide_are_refused_whatever_their_case, store_temporaries_name_one_of_the_stores_files_and_a_number, report_staging_files_have_the_names_that_tempfile_gives_them

nvx-rs/src/host/store/lifecycle/tests.rs (host::store::lifecycle::tests): 29

transition_role, lifecycle_locks_exclude_other_holders_until_released, released_locks_leave_no_lock_file_in_unprovisioned_directories, a_holder_removes_only_its_own_lock_file_on_release, directories_that_others_may_access_are_refused, stale_directories_hold_no_sandbox_and_keep_no_lock_file, a_removal_removes_the_store_the_callers_files_and_the_directory, a_removal_refuses_foreign_entries_and_keeps_them, a_removal_is_refused_while_a_vm_or_a_launch_is_recorded, a_removal_makes_the_absence_of_the_clones_files_durable_before_it_removes_anything_else, a_removal_that_cannot_make_the_absence_of_the_clones_files_durable_keeps_the_sandbox, a_removal_unbinds_the_sandbox_whose_lock_it_holds_whatever_its_path_names_meanwhile, a_removal_through_a_path_that_names_another_sandbox_meanwhile_removes_nothing, lingering_lock_files_keep_the_directory_until_they_go, a_lingering_removal_reports_what_appears_in_the_directory, a_lingering_removal_finds_the_configuration_record_by_its_path, a_removal_that_another_finishes_succeeds_and_keeps_what_replaced_the_directory, a_lingering_removal_keeps_an_empty_directory_that_replaced_its_own, only_the_directory_that_the_path_still_names_is_removed, directories_are_identified_as_their_seals_identify_them, a_removal_needs_the_configuration_record, a_provision_creates_again_a_directory_that_a_removal_deletes_while_it_is_created, locks_whose_lock_file_keeps_being_replaced_keep_their_deadline, a_provision_that_waits_through_a_removal_provisions_the_sandbox_again, transitions_that_wait_through_a_removal_find_the_sandbox_gone, a_transition_that_waits_for_a_holder_that_provisions_nothing_finds_no_sandbox, transitions_in_other_processes_that_wait_through_a_removal_find_the_sandbox_gone, provisions_in_other_processes_that_race_a_removal_provision_the_sandbox_again, refused_removals_keep_the_directory_for_transitions_in_other_processes

nvx-rs/src/host/store/lifecycle/tests.rs (host::store::lifecycle::tests::windows): 7

locks_wait_for_a_removed_lock_file_that_a_handle_keeps, provisions_wait_for_a_removed_directory_that_a_handle_keeps, a_removal_takes_a_binding_whose_deletion_is_pending_for_removed_and_waits_until_it_goes, a_removal_takes_the_clone_files_whose_deletion_is_pending_for_removed, locks_refuse_a_lock_file_that_refuses_access_for_good, a_transition_whose_lock_file_lingers_waits_until_it_goes, transitions_in_other_processes_wait_for_a_lingering_lock_file

nvx-rs/src/host/store/tests.rs (host::store::tests): 24

records_keep_their_json_form, records_of_other_formats_fail_clearly, records_with_invalid_fields_are_malformed, the_lock_excludes_other_holders, a_lock_file_replaced_while_waiting_locks_nothing, a_lock_file_that_is_not_a_regular_file_fails_at_once, a_lock_file_that_is_a_link_fails_at_once, records_and_capabilities_that_are_not_regular_files_fail_at_once, entries_that_are_links_or_not_regular_files_are_refused_as_the_platform_refuses_them, failures_to_read_the_records_and_the_capability_name_them, the_store_is_private_to_the_current_user, stores_belong_to_the_current_user_with_mode_700, the_store_is_private_to_the_current_user, a_caller_that_keeps_the_console_keeps_it_across_launches, stores_open_only_existing_directories, a_launch_writes_its_marker_before_its_vmm_runs, launches_check_their_inputs, an_abandoned_launch_that_spawned_nothing_has_exited, a_recorded_vmm_that_cannot_be_held_has_exited_once_its_log_is_released, a_journal_that_its_runtime_record_supersedes_is_removed, report_staging_files_go_once_nothing_of_their_launch_runs, a_store_whose_directory_went_reports_it_missing_as_it_clears_a_runtime, launch_identities_are_fresh_hexadecimal, an_endpoint_server_counts_only_while_the_endpoint_names_it_once_held

nvx-rs/src/host/supervisor/tests.rs (host::supervisor::tests): 24

a_vmm_that_heeds_the_graceful_step_stops_gracefully, without_the_forced_step_a_stop_times_out_and_never_signals, a_requested_forced_step_that_ends_the_vmm_reports_forced, a_failed_graceful_step_is_kept_and_not_waited_out, a_vmm_that_exited_already_skips_the_graceful_step, undetermined_states_and_failed_terminations_are_errors, a_termination_takes_the_forced_step_alone, terminations_whose_effect_cannot_be_determined_are_errors, a_sandbox_without_a_record_has_no_vm, a_live_vmm_of_the_same_runtime_is_held, a_live_vmm_of_another_runtime_is_mismatched, records_of_exited_vmms_are_cleared, a_vmm_that_cannot_be_examined_is_indeterminate_and_keeps_its_record, an_interrupted_launch_that_cannot_be_ended_is_indeterminate, reattach_refuses_an_invalid_runtime, stops_check_their_store_and_forced_bound_before_anything_else, a_launch_whose_command_fails_ends_before_anything_runs, a_launch_whose_caller_cannot_record_its_failure_keeps_its_journal_for_recovery, a_reattach_whose_caller_cannot_record_an_exit_keeps_the_record_until_one_can, a_launch_whose_vmm_cannot_start_ends, a_forced_teardown_that_fails_keeps_the_record_until_one_ends_the_vmm, only_a_stop_unless_exited_keeps_the_record_of_a_vmm_that_had_exited, a_stop_unless_exited_stops_a_running_vmm_as_a_stop_does, a_stop_keeps_the_record_of_another_vmm_under_the_same_launch_identity

nvx-rs/tests/fake_openvmm.rs (fake_openvmm (tests)): 12

instances_start_run_workloads_and_stop, timeouts_are_checked_before_they_are_used, launches_beyond_the_process_command_line_limit_are_refused, cancellation_ends_a_running_workload, unresponsive_guests_are_terminated, a_vm_whose_capability_is_lost_is_still_stopped, guests_without_required_features_are_refused, launches_that_exit_fail_to_start, orchestrator_role, a_restarted_orchestrator_reattaches_to_its_vm, outcome_reports_of_another_runtime_are_never_read, records_that_name_another_process_never_end_it

nvx-rs/tests/store.rs (store (tests)): 17

orchestrator_role, vmm_role, restrictive_umask_role, a_restrictive_umask_leaves_the_store_usable, a_crash_before_the_spawn_leaves_a_released_claim, the_log_claim_proves_that_an_unrecorded_vmm_exited, a_crash_before_the_endpoint_ends_the_recorded_vmm, recovery_never_signals_a_process_that_the_journal_does_not_name, a_committed_launch_names_its_vm_for_another_build, an_abandoned_launch_ends_its_recorded_vmm, an_unrecorded_vmm_is_verified_through_its_endpoint_and_log, an_endpoint_served_without_the_claimed_log_is_not_signaled, another_build_with_the_same_runtime_identity_reattaches, another_runtime_identity_is_mismatched, journals_of_each_launch_step_load, unsupported_and_corrupt_records_fail_clearly, a_dropped_lock_is_free_while_a_spawning_process_holds_its_descriptor

nvx-rs/tests/supervisor.rs (supervisor (tests)): 12

orchestrator_fixture, long_stores_launch_with_a_short_working_directory, a_launch_that_crashes_before_its_spawn_is_ended_on_reattach, an_unrecorded_vmm_that_serves_no_endpoint_is_never_signaled, an_unrecorded_vmm_that_serves_its_endpoint_is_ended_on_reattach, a_launch_that_crashes_before_it_commits_ends_its_recorded_vmm_on_reattach, a_committed_vmm_outlives_its_orchestrator_and_stops_gracefully, a_vmm_of_another_runtime_is_ended_only_by_its_termination, records_of_reused_ids_and_earlier_boots_name_vmms_that_exited, a_vmm_that_breaks_away_survives_its_orchestrators_job, a_vmm_in_its_orchestrators_job_ends_with_it, a_vmm_of_another_runtime_that_cannot_be_terminated_keeps_its_record

Size

Measured against a732c108, by #1076's rules:

  • Core lines: 3 changed, 0 new. Each is a re-export list that loses a deleted item: the endpoint re-exports of platform's Linux and Windows modules (control_endpoint, endpoint_server_pid), and host::supervisor's re-export of platform::inherit (SpawnLock, lock_spawns). The other 97 added or changed code lines don't count. They are the 58 lines that gate items by cli, with the 7-line cfg_attr of LogJobName::Users; the 35 import and re-export lines that this gating forces; and the 2 that make SpawnLock and lock_spawns crate-private.

  • Counted files: 16, where the estimate says 3. All of them only lose code, re-exports or doc references:

    • activation/mod.rs, host/mod.rs, host/snapshot/key.rs and host/supervisor/mod.rs;
    • host/platform/{linux/{endpoint,identity,mod},other,windows/{endpoint,identity,mod}}.rs;
    • five that change only rustdoc: lib.rs, host/runtime/mod.rs, host/sandbox/prepared.rs, host/spawn.rs and host/cli/store/mod.rs.

    host/platform/inherit.rs, which only makes items crate-private, and host/platform/{linux,windows}/private.rs and windows/log_claim.rs, which only gate items by cli with the import edits that this forces, don't count. Neither do the 35 files that it only deletes.

BOOT_CONTRACT_VERSION and CONTROL_CONTRACT_REVISION don't change.

Left as is

  • spawn_command, host::vm::spawn's private lock and the spawn support that vm::spawn uses, and the log claims of platform/{linux,windows}/log_claim.rs, as SL6.1's Scope keeps them. SL6.3 (nvx-rs slimming 4.2.3: the old configs, the old launch code and bundled are gone #1122) deletes spawn_command and the checked-file handoff.
  • The error code sandbox-leased, whose last producer, the sandbox store's refusal of a leased sandbox's launch, leaves. Its docs, and those of foreign-files, still name the template store: nvx-rs slimming 4.3.3: the error codes are private #1126 deletes the codes that nothing produces once ErrorCode becomes crate-private, as SL6.2a left template-ineligible and template-tombstoned.
  • doc/modules, the module diagrams, which still show host::instance, host::store and the supervisor's modules: CI's nightly module-diagrams workflow draws them again.
  • The crate's intro in the README, which still speaks of the "supervision of NVX microVMs": host::vm creates, spawns, reattaches to and stops them.

Not in this PR

Rewriting, refactoring or improving retained VM, platform or process code; re-homing the store, instance or supervisor APIs under new module names; replacement leases, identities, supervision or persistent host state; deleting spawn_command (SL6.3); changing the private VM spawn lock or the platform log claims.

Validation

Rebased on a732c108 as ba716d48. The rebase applied without conflicts, and the commit's own changes are those of 5bffcd7f but for one line of context: #1523's connect_child_endpoint in platform::linux's re-exports of the CLI's endpoint functions. On ba716d48: locally on Windows, cargo fmt --all --check, Clippy -D warnings with --all-targets --all-features, --lib, --lib --bins --features cli and --lib --no-default-features, natively and for --target x86_64-unknown-linux-gnu, public_api.py, RUSTDOCFLAGS=-D warnings cargo doc and SL5.2's matrix check passed. On nvx-mshv-test, with the CI artifacts and OpenVMM build of the tables below, every check of check-nvx-rs passed: cargo fmt --check; the six Clippy sets; cargo test --all-features (97 suites, 2359 tests, 66 ignored) and cargo test (16 suites, 974 tests, 18 ignored); the build and tests without default features (282); the bundled-artifact check (21); cargo doc with -D warnings; public_api.py; the MSRV and macOS checks; check-guest-binaries (91 suites, 1305 tests, 47 ignored), then build-guest-binaries and test-guest-binaries (33); and check_test_layout.py. So did the public sandbox set (8) and managed-lifecycle, on MSHV.

The tables below ran on 5bffcd7f, the head before the rebase, with Rust 1.95.0 and NVX_BUNDLE=skip. The checks ran locally on Windows, and in temporary worktrees on nvx-mshv-test (Azure Linux 3, kernel 6.18, linux-mshv, virtual machine) and nvx-kvm-test (Azure Linux 3, kernel 6.6, linux-kvm, virtual machine). The gates are those that local_gates.py --files selects for the change, run from this branch's actions. The runtime adapter's gates, which it also selects, no longer exist since #1499. The Windows gates and the default suites ran on 58295ea6, whose tree differs from this head only by the review's doc fixes and the kept cases of tests/supervisor.rs; the checks that those reach ran again on 5bffcd7f, as the tables say, and the Linux gates ran on it:

Check Windows, locally Linux, nvx-mshv-test
cargo fmt --all --check passed passed
Clippy -D warnings: --all-targets --all-features, --lib, --lib --no-default-features, --lib --no-default-features --features serde, --lib --bins --features cli, --lib --bins --no-default-features --features testing passed; on 5bffcd7f, --all-targets --all-features and --all-targets passed
Clippy -D warnings for --target x86_64-unknown-linux-gnu: --all-targets --all-features, --lib, --all-targets, --lib --bins --features cli, --lib --no-default-features --features guest passed; on 5bffcd7f, --all-targets --all-features and --all-targets
cargo check --locked --all-targets --all-features --target aarch64-apple-darwin passed passed
cargo test --locked --all-features passed; on 5bffcd7f, tests/supervisor.rs: 11, and its 2 fixtures ignored passed: 97 suites, 2359 tests, 66 ignored
cargo test --locked passed; on 5bffcd7f, tests/supervisor.rs: 11 passed: 16 suites, 974 tests, 18 ignored
cargo build --locked --lib --no-default-features, cargo test --locked --lib --no-default-features passed passed: 282
The bundled-artifact check, cargo test --locked --lib --features bundled artifacts with a synthetic release passed: 21
RUSTDOCFLAGS=-D warnings cargo doc --locked --no-deps --all-features, and the crate's doc test, nvx-rs/src/lib.rs - (line 61) passed passed
python scripts/public_api.py (both snapshots) updated with --update, then passed passed
cargo +1.89 check --locked --all-targets --all-features (MSRV) passed passed
python3 scripts/nvx.py check-guest-binaries --toolchain 1.95.0 passed: 91 suites, 1305 tests, 47 ignored
build-guest-binaries, then test-guest-binaries passed: 33
python scripts/check_test_layout.py passed passed
python scripts/check_markdown_links.py passed
The case matrix, with SL5.2's check (check_matrix.py) passed, but for the five retired Docs rows whose doc tests name the files that this stack deletes (host/store/mod.rs twice, and the template rows of #1507 and #1513), as the check exempts only SL5.2's deletions

On nvx-kvm-test, tests/supervisor.rs passed with --all-features and with the default features: 7, and its 2 fixtures ignored. Its Windows cases passed locally. The Linux runs started every test with the default signal dispositions, as CI does. A first run inherited an ignored SIGINT from a background launcher and failed the CLI's interrupt tests. Those tests passed once their dispositions were the default.

The microVM scenarios ran with the static musl nvx-rs that CI runs, CI run 43149037772's guest artifacts (5b3fab2c, the same guest inputs) and that run's OpenVMM build of the pin (14dc4116), with its provenance:

Scenarios nvx-kvm-test nvx-mshv-test WHP, locally
The default Alpine suite, --shard 1/2 and --shard 2/2 (on 58295ea6, whose runtime code is this head's) passed passed
The public set: managed-exec-config, sandbox-lifecycle, sandbox-proxy-only, sandbox-ram-upper, sandbox-gpt-layer, vm-lifecycle, snapshot-core and snapshot-tiers passed: 8 passed: 8 passed: 8

The shards include managed-lifecycle and the same-host restores, which spawn VMs through vm::spawn and its private lock. On WHP, the run used that CI run's Windows OpenVMM, 7abd8c8d, of the same pin, on Windows 11.

Left to CI: the default suites on WHP, the debug-kernel, Ubuntu and Azure Linux suites, and the benchmarks.

A code-review agent reviewed the whole diff. This head folds in its valid findings:

  • the README linked to the deleted src/host/store/mod.rs, and doc/run.md and doc/project-structure.md still described the sandbox store, the instance and the supervision;
  • the crate's example called its stop graceful while its callback sends no request;
  • deleting tests/supervisor.rs whole would have lost the only tests of a spawn with breakaway_from_job and of the working-directory limit, which led to keeping its cases of what stays.

It found no change in the behavior of host::vm, host::sandbox or host::snapshot with or without cli, and nothing in the public API, the test layout or the transitional module's docs.

Changes to existing tests (tests-modified)

Besides the removals above, each change drops or replaces what used a deleted item, or follows the cli gate of what it calls:

  • activation::tests::the_limits_keep_their_values and opaque_values_keep_their_bytes_and_display_them_in_hexadecimal drop their checks of Identity, which leaves. Their checks of the other types stay.
  • host::platform::linux::tests::a_full_control_backlog_never_replaces_the_callers_probe_deadline and host::platform::windows::endpoint::tests::a_busy_control_pipe_never_replaces_the_callers_probe_deadline compile only with cli, as endpoint_server_pid_until now does. They call it with Instant::now() + 5 s, where they called the deleted endpoint_server_pid, which passed it that deadline.
  • host::platform::tests::the_stores_tell_files_apart_by_the_identities_that_their_seals_hold compiles only with cli, as the file identities that it checks now do.
  • Seven Windows tests in host::platform::windows::tests compile only with cli, as the log claims that they check now do: a_process_spawned_under_the_spawn_lock_does_not_inherit_a_vmms_log, a_process_spawned_without_the_spawn_lock_in_a_window_holds_the_vmms_log, a_process_spawned_in_the_window_of_a_vmm_in_its_logs_job_holds_the_log_but_not_its_claim, a_job_that_is_not_the_users_under_the_name_of_a_logs_job_is_not_the_logs, an_object_of_another_type_under_the_name_of_a_logs_job_is_not_the_logs, what_a_link_under_the_name_of_a_logs_job_leads_to_is_not_the_logs and a_vmm_never_starts_outside_a_job_that_a_claim_check_takes_for_its_logs. So do their helpers HeldSpawn and its functions, claim_released_within and held_open.
  • host::platform::windows::tests::a_vmm_whose_log_is_no_file_of_a_disk_volume_starts_without_a_job keeps its one claim check only with cli. So do host::platform::windows::private::tests::private_directories_support_long_paths and host::vm_directory::tests::existing_vm_directories_that_grant_others_or_inherit_are_refused_and_left_unchanged with their checks of check_store_dir. Everything else in them runs as before.
  • host::vm::tests::an_unrelated_process_started_in_the_library_spawn_window_gets_no_vm_claim (Windows) compiles only with cli, as log_claim_held, which it checks, now does.
  • host::platform::windows::endpoint::tests::a_duplicated_transport_keeps_the_verified_connection_without_reconnecting and host::platform::windows::tests::a_restore_ready_client_that_closed_before_its_connection_was_accepted_is_read_to_its_end name their pipes with a random suffix of their own, host::tests::unique_suffix(). Before, they took one from LaunchId::generate or control_endpoint, which leave. So do the helpers StaleServer::new and host::transport::tests::endpoint.
  • host_modules::the_graph_holds_well_known_dependencies_of_the_sources checks the edges vm -> spawn, supervisor -> spawn and spawn -> platform in place of instance -> store, supervisor -> store and store -> spawn, and keeps cli -> sandbox.
  • supervisor::processes_can_be_shared_between_threads no longer checks Vmm, which leaves. supervisor::a_process_that_this_user_may_not_query_has_an_unknown_state keeps its check that Process::open fails with PermissionDenied and leaves the process running, and drops its second half, which reattached a sandbox store to that process.
  • The helper host::tests::released, with its constants, compiles on Windows or with cli, where its callers do. The snapshot fixture SnapshotFixture::new and the CLI's Windows lifecycle helper unprovisioned create their private directories with vm::create_private_dir, where they used the sandbox store's.
  • The imports of activation::tests, host::cli::store::tests, host::platform::{tests, linux::tests, windows::tests}, host::tests, the CLI's Windows lifecycle tests and tests/supervisor.rs follow these changes.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

This pull request changes existing tests

It modifies or removes 345 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

Change What Before After
modified helper fn new in host::platform::windows::endpoint::tests, impl StaleServer`` nvx-rs/src/host/platform/windows/endpoint/tests.rs:68 nvx-rs/src/host/platform/windows/endpoint/tests.rs:68
modified helper struct HeldSpawn in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:584 nvx-rs/src/host/platform/windows/tests.rs:593
modified helper impl HeldSpawn in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:595 nvx-rs/src/host/platform/windows/tests.rs:605
modified helper fn start in host::platform::windows::tests, impl HeldSpawn`` (it now compiles where feature = "cli" and `feature = "host"` and `test` and `windows` hold, not where `feature = "host"` and `test` and `windows` did) nvx-rs/src/host/platform/windows/tests.rs:598 nvx-rs/src/host/platform/windows/tests.rs:608
modified helper fn start_in_job in host::platform::windows::tests, impl HeldSpawn`` (it now compiles where feature = "cli" and `feature = "host"` and `test` and `windows` hold, not where `feature = "host"` and `test` and `windows` did) nvx-rs/src/host/platform/windows/tests.rs:607 nvx-rs/src/host/platform/windows/tests.rs:617
modified helper fn start_with in host::platform::windows::tests, impl HeldSpawn`` (it now compiles where feature = "cli" and `feature = "host"` and `test` and `windows` hold, not where `feature = "host"` and `test` and `windows` did) nvx-rs/src/host/platform/windows/tests.rs:615 nvx-rs/src/host/platform/windows/tests.rs:625
modified helper fn stand_in in host::platform::windows::tests, impl HeldSpawn`` (it now compiles where feature = "cli" and `feature = "host"` and `test` and `windows` hold, not where `feature = "host"` and `test` and `windows` did) nvx-rs/src/host/platform/windows/tests.rs:665 nvx-rs/src/host/platform/windows/tests.rs:675
modified helper fn finish in host::platform::windows::tests, impl HeldSpawn`` (it now compiles where feature = "cli" and `feature = "host"` and `test` and `windows` hold, not where `feature = "host"` and `test` and `windows` did) nvx-rs/src/host/platform/windows/tests.rs:673 nvx-rs/src/host/platform/windows/tests.rs:683
modified helper fn claim_released_within in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:685 nvx-rs/src/host/platform/windows/tests.rs:696
modified helper fn held_open in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:1125 nvx-rs/src/host/platform/windows/tests.rs:1145
modified helper fn new in host::snapshot::tests, impl SnapshotFixture`` nvx-rs/src/host/snapshot/tests.rs:1012 nvx-rs/src/host/snapshot/tests.rs:1012
modified helper const RELEASE_WAIT in host::tests (moved, and it now compiles where any ( windows , feature = "cli" ) and feature = "host" and test hold, not where feature = "host" and test did) nvx-rs/src/host/tests.rs:13 nvx-rs/src/host/tests.rs:16
modified helper const RELEASE_RETRY_INTERVAL in host::tests (moved, and it now compiles where any ( windows , feature = "cli" ) and feature = "host" and test hold, not where feature = "host" and test did) nvx-rs/src/host/tests.rs:17 nvx-rs/src/host/tests.rs:21
modified helper fn released in host::tests (moved, and it now compiles where any ( windows , feature = "cli" ) and feature = "host" and test hold, not where feature = "host" and test did) nvx-rs/src/host/tests.rs:21 nvx-rs/src/host/tests.rs:26
modified helper fn endpoint in host::transport::tests nvx-rs/src/host/transport/tests.rs:23 nvx-rs/src/host/transport/tests.rs:23
modified helper fn unprovisioned in cli/lifecycle/windows (tests) nvx-rs/tests/cli/lifecycle.rs:1822 nvx-rs/tests/cli/lifecycle.rs:1821
modified imports the imports of activation::tests nvx-rs/src/activation/tests.rs:3 nvx-rs/src/activation/tests.rs:3
modified imports the imports of host::cli::store::tests nvx-rs/src/host/cli/store/tests.rs:1 nvx-rs/src/host/cli/store/tests.rs:1
modified imports the imports of host::platform::linux::tests nvx-rs/src/host/platform/linux/tests.rs:1 nvx-rs/src/host/platform/linux/tests.rs:1
modified imports the imports of host::platform::tests nvx-rs/src/host/platform/tests.rs:2 nvx-rs/src/host/platform/tests.rs:2
modified imports the imports of host::platform::windows::tests nvx-rs/src/host/platform/windows/tests.rs:1 nvx-rs/src/host/platform/windows/tests.rs:1
modified imports the imports of host::tests nvx-rs/src/host/tests.rs:4 nvx-rs/src/host/tests.rs:4
modified imports the imports of cli/lifecycle/windows (tests) nvx-rs/tests/cli/lifecycle.rs:1801 nvx-rs/tests/cli/lifecycle.rs:1801
modified imports the imports of supervisor (tests) nvx-rs/tests/supervisor.rs:18 nvx-rs/tests/supervisor.rs:16
modified test fn the_limits_keep_their_values in activation::tests nvx-rs/src/activation/tests.rs:100 nvx-rs/src/activation/tests.rs:99
modified test fn opaque_values_keep_their_bytes_and_display_them_in_hexadecimal in activation::tests nvx-rs/src/activation/tests.rs:350 nvx-rs/src/activation/tests.rs:348
modified test fn a_full_control_backlog_never_replaces_the_callers_probe_deadline in host::platform::linux::tests (moved, and it now compiles where feature = "cli" and feature = "host" and target_os = "linux" and test hold, not where feature = "host" and target_os = "linux" and test did) nvx-rs/src/host/platform/linux/tests.rs:17 nvx-rs/src/host/platform/linux/tests.rs:20
modified test fn the_stores_tell_files_apart_by_the_identities_that_their_seals_hold in host::platform::tests (moved, and it now compiles where any ( target_os = "linux" , windows ) and feature = "cli" and feature = "host" and test hold, not where any ( target_os = "linux" , windows ) and feature = "host" and test did) nvx-rs/src/host/platform/tests.rs:180 nvx-rs/src/host/platform/tests.rs:180
modified test fn a_busy_control_pipe_never_replaces_the_callers_probe_deadline in host::platform::windows::endpoint::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/endpoint/tests.rs:341 nvx-rs/src/host/platform/windows/endpoint/tests.rs:342
modified test fn a_duplicated_transport_keeps_the_verified_connection_without_reconnecting in host::platform::windows::endpoint::tests nvx-rs/src/host/platform/windows/endpoint/tests.rs:382 nvx-rs/src/host/platform/windows/endpoint/tests.rs:383
modified test fn private_directories_support_long_paths in host::platform::windows::private::tests nvx-rs/src/host/platform/windows/private/tests.rs:17 nvx-rs/src/host/platform/windows/private/tests.rs:17
modified test fn a_restore_ready_client_that_closed_before_its_connection_was_accepted_is_read_to_its_end in host::platform::windows::tests nvx-rs/src/host/platform/windows/tests.rs:119 nvx-rs/src/host/platform/windows/tests.rs:123
modified test fn a_process_spawned_under_the_spawn_lock_does_not_inherit_a_vmms_log in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:699 nvx-rs/src/host/platform/windows/tests.rs:711
modified test fn a_process_spawned_without_the_spawn_lock_in_a_window_holds_the_vmms_log in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:728 nvx-rs/src/host/platform/windows/tests.rs:741
modified test fn a_process_spawned_in_the_window_of_a_vmm_in_its_logs_job_holds_the_log_but_not_its_claim in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:749 nvx-rs/src/host/platform/windows/tests.rs:763
modified test fn a_job_that_is_not_the_users_under_the_name_of_a_logs_job_is_not_the_logs in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:830 nvx-rs/src/host/platform/windows/tests.rs:845
modified test fn an_object_of_another_type_under_the_name_of_a_logs_job_is_not_the_logs in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:853 nvx-rs/src/host/platform/windows/tests.rs:869
modified test fn what_a_link_under_the_name_of_a_logs_job_leads_to_is_not_the_logs in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:1009 nvx-rs/src/host/platform/windows/tests.rs:1026
modified test fn a_vmm_never_starts_outside_a_job_that_a_claim_check_takes_for_its_logs in host::platform::windows::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/platform/windows/tests.rs:1064 nvx-rs/src/host/platform/windows/tests.rs:1082
modified test fn a_vmm_whose_log_is_no_file_of_a_disk_volume_starts_without_a_job in host::platform::windows::tests nvx-rs/src/host/platform/windows/tests.rs:1079 nvx-rs/src/host/platform/windows/tests.rs:1097
modified test fn an_unrelated_process_started_in_the_library_spawn_window_gets_no_vm_claim in host::vm::tests (moved, and it now compiles where feature = "cli" and feature = "host" and test and windows hold, not where feature = "host" and test and windows did) nvx-rs/src/host/vm/tests.rs:2137 nvx-rs/src/host/vm/tests.rs:2137
modified test fn existing_vm_directories_that_grant_others_or_inherit_are_refused_and_left_unchanged in host::vm_directory::tests nvx-rs/src/host/vm_directory/tests.rs:178 nvx-rs/src/host/vm_directory/tests.rs:178
modified test fn the_graph_holds_well_known_dependencies_of_the_sources in host_modules (tests) nvx-rs/tests/host_modules.rs:3302 nvx-rs/tests/host_modules.rs:3302
modified test fn processes_can_be_shared_between_threads in supervisor (tests) nvx-rs/tests/supervisor.rs:592 nvx-rs/tests/supervisor.rs:367
modified test fn a_process_that_this_user_may_not_query_has_an_unknown_state in supervisor (tests) nvx-rs/tests/supervisor.rs:1545 nvx-rs/tests/supervisor.rs:927
removed attributes the inner attributes of host::instance::tests nvx-rs/src/host/instance/tests.rs:1
removed attributes the inner attributes of host::instance::tests::store nvx-rs/src/host/instance/tests.rs:90
removed attributes the inner attributes of host::store::caller::tests nvx-rs/src/host/store/caller/tests.rs:1
removed attributes the inner attributes of host::store::lifecycle::tests nvx-rs/src/host/store/lifecycle/tests.rs:1
removed attributes the inner attributes of host::store::lifecycle::tests::windows nvx-rs/src/host/store/lifecycle/tests.rs:1041

... and 285 more, which the job's summary lists.

Test data

Change What Before After
removed file nvx-rs/tests/fixtures/store/invalid/launch-instance-format-3.json nvx-rs/tests/fixtures/store/invalid/launch-instance-format-3.json
removed file nvx-rs/tests/fixtures/store/invalid/launch-without-log.json nvx-rs/tests/fixtures/store/invalid/launch-without-log.json
removed file nvx-rs/tests/fixtures/store/invalid/runtime-cli-format-1.json nvx-rs/tests/fixtures/store/invalid/runtime-cli-format-1.json
removed file nvx-rs/tests/fixtures/store/invalid/runtime-format-5.json nvx-rs/tests/fixtures/store/invalid/runtime-format-5.json
removed file nvx-rs/tests/fixtures/store/invalid/runtime-instance-format-3.json nvx-rs/tests/fixtures/store/invalid/runtime-instance-format-3.json
removed file nvx-rs/tests/fixtures/store/invalid/runtime-truncated.json nvx-rs/tests/fixtures/store/invalid/runtime-truncated.json
removed file nvx-rs/tests/fixtures/store/invalid/runtime-unknown-field.json nvx-rs/tests/fixtures/store/invalid/runtime-unknown-field.json
removed file nvx-rs/tests/fixtures/store/launch-prepared.json nvx-rs/tests/fixtures/store/launch-prepared.json
removed file nvx-rs/tests/fixtures/store/launch-spawned.json nvx-rs/tests/fixtures/store/launch-spawned.json
removed file nvx-rs/tests/fixtures/store/runtime.json nvx-rs/tests/fixtures/store/runtime.json

Relocated unchanged: 0; added: 1. Compared the merge base a732c108b8a0 with ba716d48821a.

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 were identified for the removal of the legacy store and instance layers.

No open issues 🎉

What changed in this PR

Implements SL6.1 of the NVX library-slimming workstream: removes the sandbox store, instance layer, store-coupled supervision, and remaining store identities. Low-level VM spawning remains available through transitional exports. The supplied diff also includes prerequisite changes carried on the temporary stack.

Changes:

  • Deletes obsolete persistence and supervision code, associated fixtures, and tests.
  • Preserves retained VM mechanisms while making spawn locking crate-private and gating CLI-only platform helpers.
  • Updates documentation, dependency assertions, and the acceptance matrix to reflect the removals.
File Description
scripts/​test_microvm_tests.py Updates simulated sandbox records to format 10.
scripts/​nvx_tools/​sandbox_ram_upper_tests.py Expects configuration format 10.
nvx-rs/​tests/​vectors/​README.md Documents retained vector consumers after template removal.
nvx-rs/​tests/​openvmm_vectors.rs Corrects documentation of allowlist-test ownership.
nvx-rs/​tests/​managed_lifecycle.rs Removes instance references and generates test capabilities directly.
nvx-rs/​tests/​host_modules.rs Checks retained module dependency edges.
nvx-rs/​tests/​fixtures/​store/​runtime.json Deletes the legacy runtime-record fixture.
nvx-rs/​tests/​fixtures/​store/​launch-spawned.json Deletes the spawned-launch fixture.
nvx-rs/​tests/​fixtures/​store/​launch-prepared.json Deletes the prepared-launch fixture.
nvx-rs/​tests/​fixtures/​store/​invalid/​runtime-unknown-field.json Deletes the unknown-field rejection fixture.
nvx-rs/​tests/​fixtures/​store/​invalid/​runtime-truncated.json Deletes the truncated-record fixture.
nvx-rs/​tests/​fixtures/​store/​invalid/​runtime-instance-format-3.json Deletes the old instance-runtime fixture.
nvx-rs/​tests/​fixtures/​store/​invalid/​runtime-format-5.json Deletes the unsupported runtime-format fixture.
nvx-rs/​tests/​fixtures/​store/​invalid/​runtime-cli-format-1.json Deletes the old CLI-runtime fixture.
nvx-rs/​tests/​fixtures/​store/​invalid/​launch-without-log.json Deletes the missing-log launch fixture.
nvx-rs/​tests/​fixtures/​store/​invalid/​launch-instance-format-3.json Deletes the old instance-launch fixture.
nvx-rs/​tests/​cli/​formats.rs Tests format 10 and rejection of earlier configurations.
nvx-rs/​src/​host/​vm/​tests.rs Gates the Windows claim-query test by cli.
nvx-rs/​src/​host/​vm.rs Takes ownership of private capability generation.
nvx-rs/​src/​host/​vm_directory/​tests.rs Removes obsolete checks and gates CLI-only assertions.
nvx-rs/​src/​host/​transport/​tests.rs Names test pipes without store identities.
nvx-rs/​src/​host/​tests.rs Adds random test suffixes and gates shared wait helpers.
nvx-rs/​src/​host/​template/​clone/​record.rs Deletes legacy clone activation-record construction.
nvx-rs/​src/​host/​template/​clone/​launch/​tests.rs Deletes the obsolete clone-launch test hook.
nvx-rs/​src/​host/​sys/​mod.rs Gates Linux rename support by cli.
nvx-rs/​src/​host/​store/​vmm.rs Deletes store-managed process recovery helpers.
nvx-rs/​src/​host/​store/​regular.rs Deletes obsolete store file-reading adapters.
nvx-rs/​src/​host/​spawn.rs Removes store-coupled guidance from spawn documentation.
nvx-rs/​src/​host/​snapshot/​tests.rs Uses retained platform and VM-directory helpers.
nvx-rs/​src/​host/​snapshot/​manifest.rs Removes the private template-manifest alias.
nvx-rs/​src/​host/​snapshot/​key/​tests.rs Removes deleted identity, alias, and helper checks.
nvx-rs/​src/​host/​snapshot/​key.rs Removes store-identity conversions and obsolete helpers.
nvx-rs/​src/​host/​snapshot/​capture.rs Uses platform file helpers directly.
nvx-rs/​src/​host/​snapshot.rs Removes an unused capture-helper re-export.
nvx-rs/​src/​host/​seal/​windows/​tests.rs Retires the removed volume-path helper’s test.
nvx-rs/​src/​host/​seal/​windows.rs Deletes volume-GUID path support used by removed code.
nvx-rs/​src/​host/​seal.rs Removes the private volume-path wrapper.
nvx-rs/​src/​host/​sandbox/​scratch.rs Removes a dead accessor and obsolete documentation reference.
nvx-rs/​src/​host/​sandbox/​prepared.rs Documents process ownership without Starting.
nvx-rs/​src/​host/​sandbox/​plan.rs Deletes the unused legacy DNS helper.
nvx-rs/​src/​host/​sandbox/​geometry.rs Removes documentation of the deleted template re-export.
nvx-rs/​src/​host/​sandbox/​distro.rs Removes a dead accessor and obsolete documentation reference.
nvx-rs/​src/​host/​runtime/​mod.rs Documents runtime identity through caller-owned saved VMs.
nvx-rs/​src/​host/​restore/​tests/​live_init.rs Uses snapshot metadata and directly generated capabilities.
nvx-rs/​src/​host/​platform/​windows/​private/​tests.rs Gates CLI-only directory and rename checks.
nvx-rs/​src/​host/​platform/​windows/​mod.rs Removes obsolete exports and gates CLI-only helpers.
nvx-rs/​src/​host/​platform/​windows/​log_claim.rs Gates claim queries while retaining spawn job support.
nvx-rs/​src/​host/​platform/​windows/​endpoint/​tests.rs Replaces store-based names and gates endpoint-owner tests.
nvx-rs/​src/​host/​platform/​windows/​endpoint.rs Deletes obsolete endpoint helpers and gates owner lookup.
nvx-rs/​src/​host/​platform/​tests.rs Covers retained file helpers and adjusts feature-specific tests.
nvx-rs/​src/​host/​platform/​other.rs Removes obsolete stubs and gates CLI-only primitives.
nvx-rs/​src/​host/​platform/​linux/​tests.rs Uses retained endpoint APIs and matching feature gates.
nvx-rs/​src/​host/​platform/​linux/​private.rs Removes unused privacy helpers and gates CLI operations.
nvx-rs/​src/​host/​platform/​linux/​mod.rs Gates log claims and removes obsolete re-exports.
nvx-rs/​src/​host/​platform/​linux/​endpoint.rs Removes legacy endpoint wrappers and retains verified receive.
nvx-rs/​src/​host/​platform/​inherit.rs Makes spawn locking crate-private and updates inheritance guidance.
nvx-rs/​src/​host/​mod.rs Removes deleted modules and updates host-layer documentation.
nvx-rs/​src/​host/​instance/​files.rs Deletes instance-owned persistence helpers.
nvx-rs/​src/​host/​cli/​store/​tests.rs Retires interoperability checks with the deleted library store.
nvx-rs/​src/​host/​cli/​store/​mod.rs Removes documentation of shared library-store locking.
nvx-rs/​src/​host/​cli/​store/​files.rs Routes persistence through platform helpers.
nvx-rs/​src/​host/​cli/​snapshots/​tests.rs Uses the retained private-write helper.
nvx-rs/​src/​host/​cli/​snapshots/​capture/​tests.rs Creates capture fixtures through platform helpers.
nvx-rs/​src/​host/​cli/​snapshots/​capture.rs Creates geometry files without the old store.
nvx-rs/​src/​host/​cli/​snapshots.rs Syncs snapshot publication through platform helpers.
nvx-rs/​src/​host/​cli/​sandbox/​state/​tests.rs Builds records without legacy launch objects.
nvx-rs/​src/​host/​cli/​sandbox/​options.rs Produces NetworkConfig instead of legacy sandbox networking.
nvx-rs/​src/​host/​cli/​sandbox/​lifecycle/​tests.rs Uses the CLI-owned stop outcome.
nvx-rs/​src/​host/​cli/​sandbox/​lifecycle/​stop.rs Defines the CLI’s private stop-outcome type.
nvx-rs/​src/​host/​cli/​sandbox/​lifecycle/​start/​tests/​restore.rs Updates restore fixtures to CLI-owned configuration.
nvx-rs/​src/​host/​cli/​sandbox/​lifecycle/​start/​tests.rs Tests launch checks without legacy launch objects.
nvx-rs/​src/​host/​cli/​sandbox/​lifecycle/​mod.rs Provisions from explicit images and CLI record options.
nvx-rs/​src/​host/​cli/​sandbox/​lifecycle/​directory.rs Creates state directories through the CLI’s own store.
nvx-rs/​src/​host/​cli/​run.rs Consumes NetworkConfig directly.
nvx-rs/​src/​contract.rs Documents the snapshot key’s retained public path.
nvx-rs/​src/​activation/​tests.rs Retires checks for deleted store identities.
nvx-rs/​src/​activation/​mod.rs Deletes Identity, StoreGeneration, and TemplateReference.
nvx-rs/​Cargo.toml Updates the host-feature comment; feature behavior is unchanged.
doc/​run.md Documents format 10 and CLI-owned store rules.
doc/​project-structure.md Updates the crate and test-layout descriptions.
doc/​design/​5.3-snapshot-protocol.md Removes the template store’s capture-deadline example.
doc/​design/​1.5-compatibility-and-versioning-model.md Describes key compatibility without the deleted template store.
doc/​acceptance-case-matrix.md Records retired and rewritten examples and updated test references.

Review effort: Balanced

With the old clone path and the template store gone (SL6.2b, SL6.2a),
and the code that stays off them (SL6.0a to SL6.0e), nothing uses the
sandbox store, the instance layer that ran a VM in a store of its own,
or the supervisor's store-coupled launch, wait, stop and reattach.
host::instance and host::store leave whole, and host::supervisor loses
launch, reattach, Vmm, Starting, Reattached, StopOutcome and Stopped,
with its public SpawnLock and lock_spawns, which become crate-private
in host::platform::inherit for host::vm::spawn's lock. The last store
identity types, activation::Identity, StoreGeneration and
TemplateReference, leave with the snapshot key's conversions to and
from Identity. The public API snapshots lose 236 items on each
platform.

host::supervisor stays, with no code of its own, as the transitional
public path of the low-level spawn items that code which stays uses:
it re-exports spawn, spawn_vm, VmmCommand, Launched, Inherited and
spawn_command. The external-launch example, which launches a caller's
vm::VmmCommand with supervisor::spawn_vm (b2a70a3, 2026-11-10),
checked_handoff's tests and PreparedLaunch's doc test came after the
plan of #1121, which deletes the whole module. SL6.3 (#1122) deletes
spawn_command and the checked-file handoff, and settles the example's
launcher; the module says so.

The crate-private code that only the store, the instance and the
supervision used leaves with them, as the dead-code check of each
feature set finds it on Linux and Windows: platform::control_endpoint
and endpoint_server_pid on every host, and Directory's open_file,
search, search_dir and open_dir, with Linux's open_dir_with. What only
the CLI's own store uses now is gated by its cli feature on every host:
endpoint_server_pid_until, is_deleted, file_id, opened_file_id,
opened_file_identity, Directory, and the log claim's claim_log,
log_claim_held and serves_launch, with Linux's log_claim module and
restore_private_file_mode, and Windows' log_job_processes,
check_store_dir and delete_opened, and its re-exports of
opened_file_id and create_store_dir, which its own VM directories
still use; the handle that a log job's name holds expects to be dead
without cli, since only the CLI's claim checks query it.

The tests of what leaves go with it: tests/store.rs, with the store's
record fixtures, and tests/fake_openvmm.rs, the instance's cases; the
cases of tests/supervisor.rs that launch, reattach to or stop a VMM
through a sandbox store, with their orchestrator fixture; the store's,
the instance's and the supervisor's unit tests; the store and
supervisor doc tests; StoreGeneration's and the key identity's
conversion tests; the Windows test of a store launch whose VMM exited;
and the CLI store's test that it shares the sandbox store's lock and
file names. The cases of tests/supervisor.rs that test what stays,
host::process and the low-level spawn that host::supervisor still
exports, stay unchanged, but for two that drop their checks of what
leaves: one no longer checks that a Vmm is Send and Sync, and one no
longer reattaches a sandbox to the process that it may not query. Two
activation tests drop their checks of Identity, and the host-module
test checks the edges vm -> spawn, supervisor -> spawn and
spawn -> platform in place of those to the store. The tests of what
the cli feature now gates are gated with it, two of them calling
endpoint_server_pid_until where they called endpoint_server_pid; the
Windows tests name their pipes with a random suffix of their own in
place of a LaunchId or control_endpoint, and the snapshot fixture and
the CLI's Windows lifecycle test create their private directories with
vm::create_private_dir.

The docs stop naming what left: the crate's example, now a cold boot
and a stop through host::vm, and its module list; the host module's;
the runtime, spawn, process-inheritance, prepared-launch and CLI-store
rustdoc; Cargo.toml's host feature; the nvx README's layout, module
table, runtime, VM, snapshot, supervisor, launch, CLI sandbox, state
directory, example, error and test sections; and the store rules of
doc/run.md and the crate's summary in doc/project-structure.md. The
case matrix retires the store's and the supervisor's doc tests and
rewrites the crate's.

Part of #1121 (SL6.1).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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 were identified for the legacy store and instance-layer removal.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat-nvx-refactor tests-modified Changes existing tests, test data, or test wiring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants