Skip to content

host: prove recorded process exit when opening (SL2.10b) - #1438

Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
esaurez/issue1100-sl210b-0c8e42ad-20261110
Nov 10, 2026
Merged

Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
esaurez/issue1100-sl210b-0c8e42ad-20261110

Conversation

@esaurez

@esaurez Enrique Saurez (esaurez) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1100. Separate SL2.10b successor to #1432, based on its qualified
adeb1d4778229fd23b64c2be6cd762df352de382 stop producer.
The ultimate base remains feature/nvx-refactor at c52c7101.

Scope

Process::open returns io::Result<Opened>: either a held, identity-verified
Running(Process) or Exited(Exited), carrying opaque exit proof. The
existing boot, process ID, and start-time verification remains authoritative.
Permission and indeterminate failures remain errors, never exit proof.

Adapt the existing store and supervisor consumers without changing their
recovery policies. Also reconcile the current parent's VM verification and
verified-transport callers, which the historical donor did not contain:
preserve runtime-check ordering, peer identity checks, Exited/Io kinds,
NotFound and original I/O sources, and the crate's single public Error/Result.
No new dependency, error crate, process implementation, guest code, OpenVMM
pin, report schema, or background service is introduced.

Port only d1a64911 and API-snapshot-only 78c94958 from the preserved
7bca08c5..78c94958 donor range. Do not replay its historical parent chain.
The old donor refs and the separately qualified stop producer remain unchanged.

Measured slice: 26 changed paths, 286 insertions/121 deletions.
The six production files have 94 changed lines including documentation,
imports, and blank lines
; the two additional current callers are necessary
integration, not unrelated scope.

Existing tests

All 41 modified existing tests/helpers retain their premises, assertions,
deadlines, and hardware ignores. Changes replace optional-process assertions
with explicit Opened variants and retain verified waits:

Area Retained coverage
Process and platform tests Existing independently owned exit-handle test, byte counters, final-thread exit, and non-UTF-8 command names
Restore and clone/lease tests Held-process helpers, crash recovery, incomplete restore, durable failure records, leases, and verified cleanup
VM and transport tests Existing cold/spawn/caller-survival cases, real stop-child helper, and peer-refusal assertions
CLI/store/supervisor tests Restarted orchestrators, interrupted launches, runtime mismatch, recycled IDs, invalid/absent processes, and record ownership
Runtime-adapter tests Existing sandbox VMM helper, failed activation, and paused launch steps

Five new tests/helpers include the two focused real-child opening cases:
only the matching recorded identity is Running; another boot/start time is
proved exited without ending the live child; and a reaped child produces exit
proof. The current strict child guard is reused, while the existing exit-handle
test and newer snapshot-artifact helpers are preserved. The parent's compact,
atomic test-sandbox naming fix is unchanged.

Qualification status

Locally qualified scoped successor; still Draft and not merge-ready.
Exact candidate: 92ac710d5ed88e0d14c4f36b2a7aafa9f7573f13.

  • Completed: pinned 1.95.0 formatting for both standalone Rust crates,
    whitespace checks, and committed test-change inventory.
  • Passed: fresh worker-owned native Opus 5.5/max/long-context review of the exact
    adeb1d47..92ac710d slice, including every modified test/helper's full body
    and all five added items. The actual profile was independently verified from
    native configuration records.
  • Passed: all 43 applicable Linux and 33 Windows software commands, using fresh
    source/head/toolchain-specific targets. This includes the feature, five-mode
    Clippy, documentation, MSRV, native-source and standalone adapter matrices;
    Linux also checked both API snapshots, macOS, and fresh static guest binaries.
  • Passed: real opening checks (18 Linux, 12 Windows), one exact restarted-launcher
    case per platform, and three real-process stop cases per platform, all with
    zero failures or ignores.
  • Passed: seven exact real hardware cases per backend, MSHV and WHP, each with
    one pass and no failure or ignore: cold boot/shell/confirmed exit/report,
    four clone fatal paths, corrupt-layer assembly failure, and failed-mapping
    teardown. Cases ran serially and confirmed owned VMM teardown between cases.
  • Independent native/kernel/guest components retained their true origin and
    matched complete current effective inputs and copied bytes on each host.
    Final-head NVX CLI, test, and host-adapter executables were built afresh.
    A gitlink match alone did not qualify any guest image.
  • Pending: coordinator-admitted public CI and ultimate-chain reconciliation.
    KVM was not run; MSHV is not KVM coverage. Other ignored hardware tests and
    parent-head results are not counted as passes for this candidate.

The actual intended published parent is #1432. Shared-parent joins and native
stack metadata remain coordinator-owned; this Draft adds no artificial chain.

@esaurez Enrique Saurez (esaurez) added the tests-modified Changes existing tests, test data, or test wiring label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This pull request changes existing tests

It modifies or removes 41 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 held_process in host::restore::tests nvx-rs/src/host/restore/tests.rs:27 nvx-rs/src/host/restore/tests.rs:27
modified helper fn end_and_wait in host::template::clone::tests::launch, impl VmmDir`` nvx-rs/src/host/template/clone/tests/launch.rs:362 nvx-rs/src/host/template/clone/tests/launch.rs:362
modified helper fn wait_exit in host::template::clone::tests::launch, impl VmmDir`` nvx-rs/src/host/template/clone/tests/launch.rs:372 nvx-rs/src/host/template/clone/tests/launch.rs:372
modified helper fn drop in host::template::clone::tests::launch, impl Drop for VmmDir`` nvx-rs/src/host/template/clone/tests/launch.rs:412 nvx-rs/src/host/template/clone/tests/launch.rs:412
modified helper fn assert_vmm_ended in host::template::clone::tests::restore nvx-rs/src/host/template/clone/tests/restore.rs:422 nvx-rs/src/host/template/clone/tests/restore.rs:422
modified helper fn drop in host::template::store::leases::tests, impl Drop for VmmDir`` nvx-rs/src/host/template/store/leases/tests.rs:2459 nvx-rs/src/host/template/store/leases/tests.rs:2459
modified helper fn start in host::vm::tests, impl StopChild`` nvx-rs/src/host/vm/tests.rs:1305 nvx-rs/src/host/vm/tests.rs:1313
modified helper fn recorded_process in cli (tests) nvx-rs/tests/cli.rs:800 nvx-rs/tests/cli.rs:800
modified helper fn assert_runtime_record in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:142 nvx-rs/tests/cli/lifecycle.rs:142
modified helper fn recycled_process_id in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:1428 nvx-rs/tests/cli/lifecycle.rs:1428
modified helper fn kill in store (tests) nvx-rs/tests/store.rs:176 nvx-rs/tests/store.rs:176
modified helper fn drop in supervisor (tests), impl Drop for VmmDirectory`` nvx-rs/tests/supervisor.rs:449 nvx-rs/tests/supervisor.rs:449
modified helper fn open_running in supervisor (tests) nvx-rs/tests/supervisor.rs:574 nvx-rs/tests/supervisor.rs:574
modified helper fn assert_ended in supervisor (tests) nvx-rs/tests/supervisor.rs:582 nvx-rs/tests/supervisor.rs:583
modified helper fn drop in template_capture (tests), impl Drop for Orphan`` nvx-rs/tests/template_capture.rs:530 nvx-rs/tests/template_capture.rs:530
modified helper fn vmm in common/mod (tests), impl Sandbox`` tests/runtime-adapter/tests/common/mod.rs:409 tests/runtime-adapter/tests/common/mod.rs:409
modified helper fn refuses_early in vm_clone (tests) tests/runtime-adapter/tests/vm_clone.rs:2354 tests/runtime-adapter/tests/vm_clone.rs:2354
modified test fn exit_handles_are_independently_owned_and_exist_only_for_exit_events in host::process::tests nvx-rs/src/host/process/tests.rs:220 nvx-rs/src/host/process/tests.rs:235
modified test fn processes_count_the_bytes_that_their_read_calls_read in host::process::tests nvx-rs/src/host/process/tests.rs:325 nvx-rs/src/host/process/tests.rs:383
modified test fn a_process_runs_until_its_last_thread_exits in host::process::tests::linux nvx-rs/src/host/process/tests/linux.rs:112 nvx-rs/src/host/process/tests/linux.rs:112
modified test fn a_process_whose_command_name_is_not_utf8_can_be_examined in host::process::tests::linux nvx-rs/src/host/process/tests/linux.rs:166 nvx-rs/src/host/process/tests/linux.rs:167
modified test fn a_launch_whose_caller_crashes_once_its_vmm_started_ends_the_vmm_as_reattach_recovers_it in host::template::clone::tests::launch nvx-rs/src/host/template/clone/tests/launch.rs:2301 nvx-rs/src/host/template/clone/tests/launch.rs:2301
modified test fn a_restore_whose_caller_crashes_before_its_commit_ends_its_vmm_as_reattach_recovers_it in host::template::clone::tests::launch nvx-rs/src/host/template/clone/tests/launch.rs:2334 nvx-rs/src/host/template/clone/tests/launch.rs:2336
modified test fn a_reattach_that_cannot_record_a_failure_ends_and_forgets_nothing_of_the_clone in host::template::clone::tests::launch nvx-rs/src/host/template/clone/tests/launch.rs:3639 nvx-rs/src/host/template/clone/tests/launch.rs:3643
modified test fn a_reattach_makes_the_record_of_an_earlier_failure_durable_before_it_ends_the_launch in host::template::clone::tests::launch nvx-rs/src/host/template/clone/tests/launch.rs:3741 nvx-rs/src/host/template/clone/tests/launch.rs:3748
modified test fn a_launch_that_cannot_be_ended_keeps_its_records_and_its_lease_until_a_reattach_ends_it in host::template::clone::tests::restore nvx-rs/src/host/template/clone/tests/restore.rs:1175 nvx-rs/src/host/template/clone/tests/restore.rs:1175
modified test fn a_clone_that_crashes_after_its_spawn_keeps_its_lease_until_its_unrecorded_vmm_exits in host::template::store::leases::tests nvx-rs/src/host/template/store/leases/tests.rs:2625 nvx-rs/src/host/template/store/leases/tests.rs:2625
modified test fn a_clone_that_crashes_after_recording_its_vmm_keeps_its_lease_until_reattach_ends_it in host::template::store::leases::tests nvx-rs/src/host/template/store/leases/tests.rs:2656 nvx-rs/src/host/template/store/leases/tests.rs:2658
modified test fn another_process_serving_the_endpoint_is_refused in host::transport::tests nvx-rs/src/host/transport/tests.rs:142 nvx-rs/src/host/transport/tests.rs:142
modified test fn spawn_returns_the_same_outputs_and_capability_with_a_verified_process in host::vm::tests nvx-rs/src/host/vm/tests.rs:894 nvx-rs/src/host/vm/tests.rs:896
modified test fn a_library_vm_outlives_the_caller_that_spawned_it_without_retaining_its_output_pipe in host::vm::tests nvx-rs/src/host/vm/tests.rs:1055 nvx-rs/src/host/vm/tests.rs:1059
modified test fn current_cold_spawn_boots_a_guest_accepts_shell_input_and_exits_cleanly in host::vm::tests nvx-rs/src/host/vm/tests.rs:1197 nvx-rs/src/host/vm/tests.rs:1203
modified test fn a_start_that_was_interrupted_is_ended_under_another_identity_too in cli (tests) nvx-rs/tests/cli.rs:1028 nvx-rs/tests/cli.rs:1031
modified test fn a_start_that_ends_before_openvmm_opens_the_images_leaves_it_the_checked_ones in cli (tests) nvx-rs/tests/cli.rs:2018 nvx-rs/tests/cli.rs:2021
modified test fn a_restarted_orchestrator_reattaches_to_its_vm in fake_openvmm (tests) nvx-rs/tests/fake_openvmm.rs:370 nvx-rs/tests/fake_openvmm.rs:370
modified test fn outcome_reports_of_another_runtime_are_never_read in fake_openvmm (tests) nvx-rs/tests/fake_openvmm.rs:458 nvx-rs/tests/fake_openvmm.rs:459
modified test fn records_that_name_another_process_never_end_it in fake_openvmm (tests) nvx-rs/tests/fake_openvmm.rs:498 nvx-rs/tests/fake_openvmm.rs:500
modified test fn a_committed_launch_names_its_vm_for_another_build in store (tests) nvx-rs/tests/store.rs:499 nvx-rs/tests/store.rs:499
modified test fn a_reused_process_id_is_never_signaled in supervisor (tests) nvx-rs/tests/supervisor.rs:759 nvx-rs/tests/supervisor.rs:763
modified test fn references_that_name_no_process_are_never_opened in supervisor (tests) nvx-rs/tests/supervisor.rs:799 nvx-rs/tests/supervisor.rs:803
modified test fn the_hook_pauses_a_launch_at_each_of_its_steps in vm_steps (tests) tests/runtime-adapter/tests/vm_steps.rs:177 tests/runtime-adapter/tests/vm_steps.rs:177

Relocated unchanged: 0; added: 5. Compared the merge base 887dc51b11e0 with b5f66d7b60f3.

@esaurez
Enrique Saurez (esaurez) marked this pull request as ready for review November 10, 2026 14:09
@esaurez
Enrique Saurez (esaurez) marked this pull request as draft November 10, 2026 14:09
Base automatically changed from esaurez/issue1100-sl210-0c8e42ad-20261110 to feature/nvx-refactor November 10, 2026 14:52
@esaurez
Enrique Saurez (esaurez) requested a balanced review from Copilot November 10, 2026 15:10

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

There are no active review issues for the typed process-opening lifecycle changes.

No open issues 🎉

What changed in this PR

Extends NVX’s verified process lifecycle so a restarted caller can distinguish a matching process from a recorded process that has exited. This implements SL2.10b from #1100 on top of #1432’s confirmed-stop support.

Changes:

  • Introduces Opened::{Running, Exited} while preserving process identity checks and error propagation.
  • Adapts store, supervisor, VM, transport, and test callers without changing legacy recovery policies.
  • Adds real-child opening coverage and updates documentation and API snapshots; the supplied diff also includes the parent’s stop/report changes.
File Description
tests/​runtime-adapter/​tests/​vm_steps.rs Matches the running VMM explicitly during paused launches.
tests/​runtime-adapter/​tests/​vm_clone.rs Adapts clone checks to typed opening and exit proof.
tests/​runtime-adapter/​tests/​common/​mod.rs Adapts VMM lookup and shortens sandbox fixture paths.
tests/​runtime-adapter/​src/​bin/​runtime-adapter-host.rs Handles typed waits and fallible report reads.
nvx-rs/​tests/​template_capture.rs Adapts orphan cleanup to Opened::Running.
nvx-rs/​tests/​supervisor.rs Preserves lifecycle assertions with typed process results.
nvx-rs/​tests/​store.rs Adapts process recovery and cleanup assertions.
nvx-rs/​tests/​fake_openvmm.rs Updates restart and identity-safety checks.
nvx-rs/​tests/​cli/​lifecycle.rs Adapts recorded-process and exit assertions.
nvx-rs/​tests/​cli/​download.rs Copies the Unix executable through an owned subprocess.
nvx-rs/​tests/​cli.rs Updates process lookup and lifecycle assertions.
nvx-rs/​tests/​checked_handoff.rs Requires exit proof after handoff scenarios.
nvx-rs/​src/​host/​vm/​tests/​reattach.rs Checks typed exit proof after reattachment.
nvx-rs/​src/​host/​vm/​tests.rs Adapts opening checks and tests confirmed-stop outcomes.
nvx-rs/​src/​host/​vm.rs Adapts saved-process verification and adds confirmed stop.
nvx-rs/​src/​host/​transport/​tests.rs Preserves peer-refusal process-survival checks.
nvx-rs/​src/​host/​transport.rs Handles explicit exit results before connecting.
nvx-rs/​src/​host/​template/​store/​leases/​tests.rs Adapts lease recovery and cleanup checks.
nvx-rs/​src/​host/​template/​clone/​tests/​restore.rs Updates restore process-state assertions.
nvx-rs/​src/​host/​template/​clone/​tests/​launch.rs Adapts launch recovery, cleanup, and report checks.
nvx-rs/​src/​host/​template/​clone/​records.rs Preserves best-effort report handling.
nvx-rs/​src/​host/​supervisor/​reattach.rs Maps typed opening results into existing recovery logic.
nvx-rs/​src/​host/​store/​vmm.rs Preserves optional live-process lookup.
nvx-rs/​src/​host/​store/​locked.rs Adapts identified-launch recovery to Opened.
nvx-rs/​src/​host/​restore/​tests.rs Updates the held-process fixture.
nvx-rs/​src/​host/​report/​tests.rs Distinguishes missing, malformed, and unreadable reports.
nvx-rs/​src/​host/​report.rs Returns report-read errors separately from missing reports.
nvx-rs/​src/​host/​process/​tests/​linux.rs Preserves final-thread and non-UTF-8 identity coverage.
nvx-rs/​src/​host/​process/​tests.rs Adds recorded-child identity and reaped-child exit coverage.
nvx-rs/​src/​host/​process.rs Defines typed opening results and opaque exit proof.
nvx-rs/​src/​host/​platform/​windows/​tests.rs Adds a wait-only handle fixture and adapts exit checks.
nvx-rs/​src/​host/​instance/​locked.rs Retains the legacy best-effort report policy.
nvx-rs/​src/​error/​tests.rs Includes StillRunning in error-code coverage.
nvx-rs/​src/​error.rs Adds the StillRunning kind and code mappings.
nvx-rs/​README.md Documents opening, exit proof, stop, and report behavior.
nvx-rs/​public-api/​windows.txt Records the Windows public API additions.
nvx-rs/​public-api/​linux.txt Records the Linux public API additions.
doc/​usage.md Documents the still-running error code.

Review effort: Balanced

Return Running or opaque exit proof after checking the recorded identity.
Preserve indeterminate errors and current VM/transport verification policies.
Keep the existing exit-handle and recovery tests alongside opening proof cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0c8e42ad-4102-451f-96f0-0a4ae0483d1a

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 change introducing distinct running-process and exited-process results.

No open issues 🎉

Review effort: Balanced

@esaurez
Enrique Saurez (esaurez) marked this pull request as ready for review November 10, 2026 15:45
@ppenna
Pedro Henrique Penna (ppenna) merged commit 2d68390 into feature/nvx-refactor Nov 10, 2026
106 of 107 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the esaurez/issue1100-sl210b-0c8e42ad-20261110 branch November 10, 2026 16:34
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.

3 participants