Skip to content

host: compose published SL2.16 inputs - #1465

Closed
Enrique Saurez (esaurez) wants to merge 17 commits into
feature/nvx-refactorfrom
esaurez/sl216-inputs-411c6e97-20261110
Closed

Enrique Saurez (esaurez) wants to merge 17 commits into
feature/nvx-refactorfrom
esaurez/sl216-inputs-411c6e97-20261110

Conversation

@esaurez

Copy link
Copy Markdown
Contributor

Part of #1103 and #1076. Supporting input-composition Draft only; this does not implement production SL2.16 and is not ready to merge.

What and why

Compose the actual published launch/settings and snapshot-capture APIs so a separate SL2.16 consumer can use one coherent source. The direct base is #1434's existing branch, esaurez/issue1099-sl28b-20261110-6789d491.

Input Exact head Exact tree
#1434, first parent 4fdf55db0384354980a1267f64b5701d500969b8 2db5b7cfaa040d45ff217596b554037d13ccd641
#1455, ordinary-merge input 1148a7487995e02f3a39c6cf384f5d6d825f40ce f3991b84a2f23af306125a9467a9496c64b99519
This prepared source 0eaadb9c51d74e4de200710dc64df1f822bb9aa0 be3aa40ef1945b8acb65379d0341a33c3141cee8

Merge 929e4edc18a48ea8485fd377c910d05fc3e429d3 has exactly the two published inputs as its ordered parents. Its normal successor only applies the pinned formatter's import wrapping. OpenVMM stays at 14dc4116ec7e57567633c4b7b07892aca3a58522. No old private aggregate, obsolete input join or producer rewrite is used.

The four conflict paths are nvx-rs/README.md, host/config/mod.rs, host/vm.rs and host/vm/tests.rs. Reconciliation retains the existing resolved-NIC helper with the capture's deny-all rendering, the owned configuration/NIC and inherited-resource wrapper with the data-only capture context, and both getters and the complete ownership-transfer method. Only the return/destructuring tuple needs combined plumbing. The README says to clone the context before consuming Prepared.

The settings and command/spawn method bodies remain byte-identical to #1434. Capture-context and sparse-disk helpers remain byte-identical to #1455; create is its exact existing statement/field/tuple union with #1434. The fourteen other incoming changed blobs are exact #1455 blobs. All VM test/fixture function names form the exact producer union, with no rewritten bodies. Both checked public-API listings are the exact union, with no additional items.

This preserves strict Windows trusted-log-job refusal before child creation, complete resource/log/argument ownership, confirmed cleanup and retained error/exit identities. The strict snapshot reader, private artifacts, NIC/geometry/console compatibility, complete per-snapshot time contract and unchanged compatibility identity are inherited unchanged. Current resolved DNS/publication/proxy/NIC behavior is retained. The test-layout file is its automatic producer union: the capture removes three obsolete VM constant hooks while the incoming guest-init allowance is preserved; no architecture scanner or cycle waiver changes.

Size

Own conservative reconciliation: 5 added core lines (three wrapped import rows and two tuple-plumbing rows), 2 production resolution files, and 0 novel production behavior, control flow, APIs or test bodies. Comments, documentation and tests are excluded, using the repository Rust tokenizer.

For transparency, the complete diff from #1434 also contains the already-published producer work: 619 added / 193 removed core lines across 8 production paths, 21 tracked paths total. Those aggregate inherited counts are not reported as five newly authored lines, nor as 619 lines of new implementation in this task.

Test changes

The immediate-parent inventory reports 9 existing test-asset changes, 0 relocations and 45 additions, all inherited from the published sources. No test is retired or weakened by this composition:

  • host::template::store::tests imports the shared artifact inventory from host::snapshot.
  • cold_boot_arguments_refuse_capture_configurations is the producer's rewrite to capture_command_lines_require_one_init_sandbox_selector, reflecting the now-supported capture path while requiring the exact sandbox selector.
  • keys_read_back_from_their_canonical_encoding hashes the specified compatibility prefix; keys_of_machines_that_no_manifest_describes_are_refused still corrupts the invariant field before the time suffix.
  • cold_creation_is_inspectable_without_a_process_listener_or_capability_file retains its existing assertions and adds the producer's absent-capture-context assertion.
  • The obsolete OPENVMM, CAPTURE_IMAGE and CAPTURE_SCRATCH dead-code hooks disappear because capture now uses those constants; the layout allowance tightens accordingly.
  • snapshot-key-v1.txt includes the complete persisted time fields, retaining the producer's independent compatibility identities and malformed-vector oracles.

The separate origin/dev inventory is inherited workstream accounting, not an execution count or this task's own test scope.

Validation

These are actual checks of 0eaadb9c51d74e4de200710dc64df1f822bb9aa0 / be3aa40ef1945b8acb65379d0341a33c3141cee8, completed before publication: Linux at 2026-11-10T23:19:04Z, Windows at 2026-11-10T23:19:26Z. Both used real private Git source/native metadata, exact native source, Rust/Cargo 1.95.0, private mutable caches/targets and fresh physical/commit/disk admission. scripts/nvx.py verify passed before Cargo; Windows initialized MSVC in the same cmd.exe process as each Cargo command.

Passed on both hosts, with NVX_BUNDLE=skip:

cargo +1.95.0 check --locked --manifest-path nvx-rs/Cargo.toml --all-targets --all-features
cargo +1.95.0 check --locked --manifest-path nvx-rs/Cargo.toml --no-default-features --features host --example external-launch
cargo +1.95.0 check --locked --manifest-path tests/runtime-adapter/Cargo.toml --all-targets --features host

Crate/adapter formatting, warning-denied affected Clippy and the required minimal-library Clippy, test layout, Markdown links and both test inventories also passed. Linux generated and compared both platform API snapshots successfully. The selected Boot has only command_line and capture; the unchanged external example compiles against that actual shape without speculative fields.

Focused existing VM preparation/settings/command/capture tests: Linux 51 passed / 3 ignored; Windows 46 passed / 3 ignored. Focused configuration/capture-rendering tests: 42 passed / 0 ignored on each. Counts are per command; ignored helpers and the hardware cold-spawn case are not runtime passes.

The earlier 929e4edc attempt is retained as failed preparation: Linux cache copying stopped before Cargo on an unrelated cached native test symlink loop; Windows stopped at import formatting before compilation/tests. The registry-only private-cache correction and formatting successor above are the actual checked source. No failed attempt or historical producer result is relabeled as passing.

Known inherited failure and unrun work

The architecture gate still fails on both hosts, exit 101:

snapshot -> vm -> snapshot
snapshot -> vm: src/host/snapshot/capture.rs:18: crate::host::vm::OUTCOME
vm -> snapshot: crate::host::snapshot::CaptureContext

This is the selected #1455 producer's existing layering defect, not a pass, waiver or repair in this join. Its separate producer correction remains required. Compilation and focused passes do not establish full CI or conformance.

No whole feature/MSRV matrix, OpenVMM/kernel/guest build, VM boot, SL2.15 hardware gate, extra unchanged snapshot/time/privacy suite, manual native review or manual Copilot request was repeated solely for mechanical adoption. Historical producer reviews are not reviews of this head. No manual CI dispatch/rerun, Ready transition, merge, auto-merge or native-stack mutation is requested or performed.

Production SL2.16 remains separate: create(Some(snapshot)) still refuses the input. This PR adds no restore view/hard links, restore arguments or policy, ready-listener handoff through Launched/VmmCommand, restore example, lock/store/ledger/fallback or new framework. This ordinary dependent PR is not a native stack registration.

Enrique Saurez and others added 17 commits November 10, 2026 10:41
Prepare Fresh captures through the existing VM creation path with private sparse disks, checked geometry, platform-only arguments and a caller-persisted capture context. Leave capture completion and snapshot publication to their separate operations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 095bfb08-a5d0-4331-b2b2-dd76d2fbadd8
Keep the OpenVMM source excerpt in a test-only module so its function definition is included in item context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 095bfb08-a5d0-4331-b2b2-dd76d2fbadd8
Regenerate both platform snapshots for the opaque capture context and the prepared-launch accessor.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 095bfb08-a5d0-4331-b2b2-dd76d2fbadd8
The fixture directory is needed only for Linux physical-block metadata. Mark the parameter accordingly on the other supported hosts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 095bfb08-a5d0-4331-b2b2-dd76d2fbadd8
Preserve checked snapshot compatibility and the capture context; reconcile only shared imports and the module documentation rows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1d7e92b7-acbd-4068-8517-e07a795b608d
Reject absent, repeated or malformed sandbox selectors without hiding named forbidden-token diagnostics. Cover init IFS boundaries through each pure capture command-line entry point.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1d7e92b7-acbd-4068-8517-e07a795b608d
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1d7e92b7-acbd-4068-8517-e07a795b608d
Validate the proved-exited capture outcome, strict OpenVMM artifacts and checked capture context. Write retryable private key and description files without moving or cleaning VM-directory entries.

The Draft keeps SnapshotKey::time and its encoding/identity semantics pending the explicit user decision.

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

Copilot-Session: b718df7e-13ad-474d-b3c5-b0f93a7e18e6
Copilot-Session: bc910877-842b-4ceb-8b01-c50d4c0d7af9
Persist and strictly decode the complete per-snapshot time contract; hash only the unchanged compatibility prefix and reject key/manifest time mismatches. Keep the single Fresh encoding in place without a version bump or backward reader.

Apply owner-only artifact validation at the snapshot boundary while preserving the legacy template validator and its existing callers.

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

Copilot-Session: b718df7e-13ad-474d-b3c5-b0f93a7e18e6
Copilot-Session: bc910877-842b-4ceb-8b01-c50d4c0d7af9
Move checked launch values and owned resources into VmmCommand without reopening them. Add standard owned-handle conversions and the compiled external cold-launch consumer, retaining the current merged preparation and spawn behavior.

Expose the existing status-bearing launch wait for host-only callers and retain timeout, actual status and repeated-wait coverage. Public API snapshots will be generated during remote qualification.

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

Copilot-Session: 6789d491-7d13-4929-bc64-4edfec93ba60
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6a9302c-f126-4231-832e-22426190bd6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89997040-ff41-4516-a86a-d81422d5a79f
Initialize the merged cold-boot capture option explicitly for the external launcher. Record the platform public API snapshots generated from the private source checkpoint.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6789d491-7d13-4929-bc64-4edfec93ba60
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6a9302c-f126-4231-832e-22426190bd6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89997040-ff41-4516-a86a-d81422d5a79f
Expose the existing strict spawn path for caller-owned VM commands and use it in the external launcher, preserving the legacy spawn fallback. Exercise real Windows ACL, object-type and object-manager-link collisions before the process-creation window, and retain the permissive non-disk-log behavior only for ordinary spawns.

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

Copilot-Session: d5cb71c8-5f7f-4248-836b-4aae842c213d
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6a9302c-f126-4231-832e-22426190bd6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89997040-ff41-4516-a86a-d81422d5a79f
Preserve the complete owned-command and strict-log-job handoff while replaying the PR onto the current feature input. Treat a missing exit proof as a timeout and propagate the outcome reader error before checking for a missing report.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d5cb71c8-5f7f-4248-836b-4aae842c213d
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6a9302c-f126-4231-832e-22426190bd6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89997040-ff41-4516-a86a-d81422d5a79f
Expose the existing strict child termination and confirmed-wait operation for external callers. Use it on example setup errors, preserve both failure messages, and cover running and already-reaped children through the public host-only API.

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

Copilot-Session: d5cb71c8-5f7f-4248-836b-4aae842c213d
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6a9302c-f126-4231-832e-22426190bd6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89997040-ff41-4516-a86a-d81422d5a79f
Apply the repository rustfmt output from the pre-test formatting check without changing cleanup behavior or assertions.

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

Copilot-Session: d5cb71c8-5f7f-4248-836b-4aae842c213d
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6a9302c-f126-4231-832e-22426190bd6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89997040-ff41-4516-a86a-d81422d5a79f
Join the actual published SL2.8b/settings and SL2.14 sources for a
subsequent SL2.16 consumer. Retain the checked settings, owned launch
resources, capture context, strict snapshot reader and complete time
contract without implementing the restore consumer.

Resolve the adjacent configuration, preparation, test and documentation
additions as their producer union. The known snapshot-to-VM layering
cycle remains an inherited producer issue, not repaired by this join.

Part of microsoft/nvx issue 1103.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 411c6e97-5b7a-47c8-8c79-4317cf344d63
Apply the pinned formatter's import wrapping only. No producer body,
test expectation or API changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 411c6e97-5b7a-47c8-8c79-4317cf344d63
@esaurez Enrique Saurez (esaurez) added tests-modified Changes existing tests, test data, or test wiring feat-nvx-refactor labels 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 11 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 imports the imports of host::template::store::tests nvx-rs/src/host/template/store/tests.rs:5 nvx-rs/src/host/template/store/tests.rs:5
modified test fn cold_boot_arguments_refuse_capture_configurations in host::config::tests (renamed to capture_command_lines_require_one_init_sandbox_selector) nvx-rs/src/host/config/tests.rs:1123 nvx-rs/src/host/config/tests.rs:1208
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:1014 nvx-rs/src/host/platform/windows/tests.rs:1091
modified test fn keys_read_back_from_their_canonical_encoding in host::snapshot::key::tests nvx-rs/src/host/snapshot/key/tests.rs:661 nvx-rs/src/host/snapshot/key/tests.rs:720
modified test fn keys_of_machines_that_no_manifest_describes_are_refused in host::snapshot::key::tests nvx-rs/src/host/snapshot/key/tests.rs:800 nvx-rs/src/host/snapshot/key/tests.rs:859
modified test fn cold_creation_is_inspectable_without_a_process_listener_or_capability_file in host::vm::tests nvx-rs/src/host/vm/tests.rs:741 nvx-rs/src/host/vm/tests.rs:1160
modified test fn the_log_and_inherited_resources_stay_open_without_reopening_their_paths in host::vm::tests nvx-rs/src/host/vm/tests.rs:990 nvx-rs/src/host/vm/tests.rs:1410
removed hook the test hooks of const OPENVMM in host::vm nvx-rs/src/host/vm.rs:63
removed hook the test hooks of const CAPTURE_IMAGE in host::vm nvx-rs/src/host/vm.rs:81
removed hook the test hooks of const CAPTURE_SCRATCH in host::vm nvx-rs/src/host/vm.rs:87

Test data

Change What Before After
modified file nvx-rs/tests/vectors/snapshot-key-v1.txt nvx-rs/tests/vectors/snapshot-key-v1.txt nvx-rs/tests/vectors/snapshot-key-v1.txt

Relocated unchanged: 0; added: 53. Compared the merge base eba4c8b6a6a1 with 0eaadb9c51d7.

@ppenna

Copy link
Copy Markdown
Contributor

Closing as superseded: everything that this pull request joined is in feature/nvx-refactor at 5947e4e8.

Reopen this pull request if anything is missing.

@esaurez
Enrique Saurez (esaurez) deleted the esaurez/sl216-inputs-411c6e97-20261110 branch November 13, 2026 17:55
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