Repository navigation
host: make what every launch shares one value in host::runtime - #1268
Pedro Henrique Penna (ppenna) merged 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the shared runtime configuration and API relocation.
No open issues 🎉
What changed in this PR
Implements SL2.2 of #1097 by introducing host::runtime as the home for shared launch configuration, preparing the host APIs for later VM lifecycle work without changing launch behavior.
Changes:
- Adds
Runtime,LaunchOptions, andGuestPowerAction, withExitas the default shutdown action. - Moves runtime identities and hypervisor probing into the new module, preserving store identity re-exports while removing the old public probe path.
- Relocates identity tests, adds runtime defaults and probe coverage, and updates documentation and public API snapshots.
| File | Description |
|---|---|
nvx-rs/src/host/store/tests.rs |
Removes identity tests relocated to the runtime module. |
nvx-rs/src/host/store/mod.rs |
Retains IdentityCheck and re-exports moved identity types. |
nvx-rs/src/host/runtime/tests.rs |
Houses identity tests and adds default-options and unavailable-hypervisor checks. |
nvx-rs/src/host/runtime/mod.rs |
Defines shared runtime configuration and houses identities and probing. |
nvx-rs/src/host/platform/mod.rs |
Removes the public probe wrapper moved to runtime. |
nvx-rs/src/host/mod.rs |
Exposes and documents the runtime module. |
nvx-rs/src/host/artifacts/mod.rs |
Updates the documentation link to the relocated probe. |
nvx-rs/src/contract.rs |
Updates the documented runtime identity path. |
nvx-rs/README.md |
Documents the runtime module and shared launch options. |
nvx-rs/public-api/windows.txt |
Records the new runtime API and relocated probe on Windows. |
nvx-rs/public-api/linux.txt |
Records the same API changes on Linux. |
Review effort: Balanced
|
Scope update following the revised #1076/#1097 contract: SL2.1/#1267 is retired. New host APIs use the crate's This PR starts the value stack on The base is being updated to |
3e16d00 to
5ea566f
Compare
This pull request changes existing testsIt modifies or removes 2 existing test asset(s), listed below. Review each with care: a change to a test can hide a regression that the test caught. See doc/contribute.md#changes-to-existing-tests. Test code
Relocated unchanged: 2; added: 8. Compared the merge base |
Move RuntimeIdentity, ArtifactIdentity and IdentityPart from the store's identity module into host::runtime, preserving their validation, serialization and comparison semantics. Keep the existing store exports. Move the public hypervisor probe beside them without changing its platform implementations or failure classification. Add Runtime for the executable, kernel and initramfs paths, their identity, the hypervisor, optional CPU profile, Windows job breakaway and LaunchOptions. The launch options hold the guest shutdown action, Exit by default, and how long OpenVMM waits for the host to authenticate. The boot console remains a per-VM setting. Classify the existing runtime-mismatch code as ErrorKind::RuntimeMismatch instead of Other, retaining its spelling, messages and CLI status. Clarify Unsupported's existing malformed-value semantics and remove the error inventory's stale ordering promise without changing its order. Move the identity tests unchanged, cover the launch defaults and foreign hypervisor probe, extend the error-kind assertions, and update the documentation and public API snapshots. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: abef22e3-3caa-4e45-837b-652018e4ced0
5ea566f to
98bb4a4
Compare
ef70370
into
feature/nvx-refactor
Part of #1097.
What and why
SL2.2 puts what every launch shares in
nvx::host::runtime::Runtime:the OpenVMM, kernel and initramfs paths, their identity, the hypervisor,
an optional CPU profile, Windows job breakaway and
LaunchOptions.The options hold the guest shutdown action (
Exitby default,Haltor
Reset) and the timeout for the host to authenticate to OpenVMM.The boot console remains a per-VM setting.
RuntimeIdentity,ArtifactIdentity,IdentityPartandMAX_IDENTITY_LENmove with their existing validation and serialization.The store re-exports them for existing callers.
This intentionally removes the public
nvx::host::platform::probe_hypervisorpath. Its replacement isnvx::host::runtime::probe_hypervisor; the platform probes and theirfailure classification do not change.
This also intentionally reclassifies the existing
runtime-mismatchcode from
ErrorKind::Otherto the newErrorKind::RuntimeMismatch.That is a one-time alpha API change, not fully backward-compatible for
callers matching the old kind. The code's spelling, messages and CLI
exit status remain unchanged.
Unsupporteddocuments the malformedvalues that existing identity checks already refuse. The error inventory
documentation no longer promises an ordering that this classification
would contradict; the actual inventory order is unchanged.
No artifact files are read or hashed by the new values. This change adds
no launch orchestration, CPU-profile parser or new hypervisor detection.
The options are values only; argument rendering and its validation are
not implemented here.
Public API
Both API snapshots add
host::runtimeandErrorKind::RuntimeMismatch,and replace the old public probe path with its runtime-owned path.
Existing store identity paths remain available. The implementation patch
is unchanged by the rebase onto the pinned qualification base.
Existing tests
artifact_identities_are_printable_tokensand
runtime_identities_bind_this_crates_contractsmove from the storetests to the runtime tests with their existing assertions.
codes_determine_kindschecksthe intentional mismatch-kind remapping, and
every_kind_has_a_code_of_its_own_spellingcovers the new kind and itsconversions without changing the existing code spelling.
No existing test is retired.
Runtimefixture,and the moved probe's classification and message on a foreign backend.
The inventory against the new base reports two modified existing tests,
two unchanged relocations and eight added test-code items, including helpers.
The
tests-modifiedlabel is retained.Validation
Qualified head:
98bb4a43863d321cdc696ce498ed476d88322107.Pinned qualification base:
256ebe3dd9c23f20da94503b55d678d1193e392d.Tree:
ba9b8d99aa369dfd381a2ff59a22c03ad304214e.OpenVMM source pin:
9cec2b89245f41f2126f9a787c5e43a0d84b7154.All final qualifying commands ran at this head, and their test runners'
own summaries and counts were checked.
check-nvx-rscommands pass on Windows and Linux with Rust1.95.0 and MSRV 1.89, including every applicable runtime-adapter
configuration, artifact bundling with staging enabled, and documentation.
Linux also passes the API snapshots, macOS check, guest lint/tests,
canonical guest build, manifest verification and static-ELF checks.
validate-nvxcommands pass on both platforms. Windows usesnative CPython 3.14.9 and Git's
shon PATH: 1,810 tests with 67platform skips, the complete 84-test adversarial module with 11
platform skips, and four host-profile tests. The canceled-capture
shell test ran successfully.
all 84 adversarial tests and four host-profile tests. Those three Python
test commands ran in private process and mount namespaces with short
temporary paths, so the process checks do not scan other test sessions.
check-qualitycommands pass, including the 25Specula tests, shell lint/format and PowerShell syntax. This action is
Linux-only in CI, not an additional Windows gate.
comparison pass on both platforms. An independent read-only review of
this exact head found no blocking issue.
The earlier failed and interrupted attempts remain recorded and are not
counted as passes. The Windows adversarial module and Linux CLI action
were rerun completely, not as focused exceptions. No test assertion or
timeout was relaxed.
No VM run is required for this value-only leaf: it changes no guest
implementation, VMM argument, CLI VM path or runtime-adapter source.
Guest code never constructs the added error kind. The guest binaries
were nevertheless rebuilt and checked against this candidate's source.
No VM, CI or hardware acceptance result is claimed.