Skip to content

host: join CLI store and strict snapshot inputs - #1444

Closed
Enrique Saurez (esaurez) wants to merge 6 commits into
feature/nvx-refactorfrom
esaurez/issue1114-inputs-0c8e42ad-20261110
Closed

Enrique Saurez (esaurez) wants to merge 6 commits into
feature/nvx-refactorfrom
esaurez/issue1114-inputs-0c8e42ad-20261110

Conversation

@esaurez

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

Copy link
Copy Markdown
Contributor

Purpose and inputs

This is the explicit input join for issue 1114 / SL3.7a, not the named-snapshot implementation.

The ordinary two-parent merge preserves:

The base is PR #1440's actual published branch, esaurez/issue1102-sl212b-20261110-6789d491. PR #1433 is an explicit secondary dependency, not an invented linear ancestor. Native stack metadata remains coordinator-owned.

Scope

The merge is conflict-free: there are no hand-written resolutions. Relative to the reader, it adds exactly the CLI producer's six paths / 681 inserted lines. It neither replays the historical SL3.7a composed tree nor implements capture, restore, compatibility, or blockless drivers.

The named-store consumer is the separate Draft PR #1445 above this join, so its diff contains only its own slice.

Qualification

This exact joint tuple is independently locally qualified, and the coordinator accepted its receipts. Its own Linux 44-command and Windows 32-command applicable software matrices passed, including API/documentation/MSRV, CLI/store/locking, strict-reader privacy, and an actual isolated Linux root ownership-negative case (one passed, zero failed or ignored).

The initial Linux attempt failed because the recipe's temporary-directory prefix left too little room for Unix socket paths. Its failed logs are preserved. An explicitly authorized physical short-temp rerun passed all 44 commands on the unchanged commit; no source, assertion, ignore, deadline, or production socket limit changed.

A fresh native Opus 5.5 / max / long-context review verified the exact preserved-parent composition and the separate consumer's full test/helper bodies without blocking findings. These are this join's own receipts, not inherited producer or consumer test results.

This PR stays Draft. No full public CI run is admitted for this join, and Draft-skipped checks are not full proof. The first consumer is a software-only store/record slice with no claimed VM coverage.

Test changes

The comparison to the reader includes the secondary producer's new CLI launch-record tests and module wiring. The exact test-change inventory reports zero changes to existing tests and 16 added items; the repository's bot therefore removed the initially added tests-modified label. That automated result is preserved. No assertions, ignores, deadlines, or runtime prerequisites are weakened by the join. Independent joint validation and exact-source review passed; the consumer's separate receipts remain associated with its own head.

Related issue: #1114. This input join does not complete or close it.

Enrique Saurez and others added 6 commits November 10, 2026 01:05
Port the preserved SL2.10 implementation and coupled callers, API snapshots, docs and real-process tests onto feature c52c710 without changing legacy lifecycle policy.

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

Copilot-Session: 0c8e42ad-4102-451f-96f0-0a4ae0483d1a
Port the scoped SL3.2b donor cf485b7 onto verified feature c52c710 without its historical producer history. Persist prepared capability and outputs before spawn, the matching process before commit, and every SavedVm field in the private runtime record.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: eb3cc7e0-f51e-45ed-b911-c7b214740e05
Use the existing PID and atomic create-directory retry to retain unique fixture directories without a long diagnostic prefix. Keep the scenario name in creation errors. Capture and restore control sockets now fit approved data-volume temp roots without changing production limits, assertions, timeouts or skipped tests.

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

Copilot-Session: 0c8e42ad-4102-451f-96f0-0a4ae0483d1a
Apply the pinned rustfmt wrapping requested by the final-head review; fixture semantics and production source remain unchanged.

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

Copilot-Session: 0c8e42ad-4102-451f-96f0-0a4ae0483d1a
Validate the fixed snapshot layout, private regular files, bounded metadata and key/manifest agreement without reading snapshot.json. Retain the caller immutability contract and cover Linux/Windows refusal cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6789d491-7d13-4929-bc64-4edfec93ba60
Preserve reader 797d300 as the first parent
and CLI store 99d0045 as the second.
The input merge has no conflicts. Its own joint qualification remains pending.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0c8e42ad-4102-451f-96f0-0a4ae0483d1a
@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 removed the tests-modified Changes existing tests, test data, or test wiring label Nov 10, 2026
@esaurez
Enrique Saurez (esaurez) marked this pull request as ready for review November 10, 2026 15:55
@esaurez
Enrique Saurez (esaurez) marked this pull request as draft November 10, 2026 15:55
@esaurez
Enrique Saurez (esaurez) requested a balanced review from Copilot November 10, 2026 15:57

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 are reported for the launch-persistence changes.

No open issues 🎉

What changed in this PR

This PR joins the strict snapshot reader and CLI launch-store inputs needed for #1114. Relative to the reader branch, it adds launch persistence only; named-snapshot storage and capture/restore commands remain separate work.

Changes:

  • Add locked launch transitions that persist prepared state before spawn, record the process, and commit the saved VM.
  • Add fixed journal/runtime records and bounded private-file operations using existing atomic-write helpers.
  • Add tests for persistence, interrupted launches, failed transitions, malformed records, and file privacy.
File Description
nvx-rs/​src/​host/​cli/​store/​tests/​launch.rs Tests launch persistence, failure handling, and unsafe-file refusal.
nvx-rs/​src/​host/​cli/​store/​tests.rs Registers the launch test module.
nvx-rs/​src/​host/​cli/​store/​record.rs Defines journal/runtime records and their serialization.
nvx-rs/​src/​host/​cli/​store/​mod.rs Wires new modules and documents launch persistence.
nvx-rs/​src/​host/​cli/​store/​launch.rs Implements pre-spawn journaling, process recording, and commit.
nvx-rs/​src/​host/​cli/​store/​files.rs Adds bounded private-file reads, replacement, removal, and syncing.

Review effort: Balanced

@esaurez
Enrique Saurez (esaurez) force-pushed the esaurez/issue1102-sl212b-20261110-6789d491 branch from 797d300 to 4b29646 Compare November 10, 2026 17:15
Base automatically changed from esaurez/issue1102-sl212b-20261110-6789d491 to feature/nvx-refactor November 10, 2026 17:39
@github-actions github-actions Bot added the tests-modified Changes existing tests, test data, or test wiring label Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request changes existing tests

It modifies or removes 52 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 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 check_lifecycle in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:550 nvx-rs/tests/cli/lifecycle.rs:550
modified helper fn recycled_process_id in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:1425 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 check_vmm in supervisor (tests) nvx-rs/tests/supervisor.rs:1226 nvx-rs/tests/supervisor.rs:1234
modified helper fn new in common/mod (tests), impl Sandbox`` tests/runtime-adapter/tests/common/mod.rs:154 tests/runtime-adapter/tests/common/mod.rs:154
modified helper fn activate in vm_clone (tests), impl CloneControl for Early`` tests/runtime-adapter/tests/vm_clone.rs:2314 tests/runtime-adapter/tests/vm_clone.rs:2314
modified test fn every_kind_has_a_code_of_its_own_spelling in error::tests nvx-rs/src/error/tests.rs:50 nvx-rs/src/error/tests.rs:50
modified test fn a_launch_whose_vmm_exited_ends_while_a_process_spawned_in_its_window_holds_its_log in host::platform::windows::tests nvx-rs/src/host/platform/windows/tests.rs:1049 nvx-rs/src/host/platform/windows/tests.rs:1060
modified test fn hosts_without_pidfds_poll_and_never_signal in host::process::tests nvx-rs/src/host/process/tests.rs:259 nvx-rs/src/host/process/tests.rs:259
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 reports_are_summarized_without_free_form_fields in host::report::tests nvx-rs/src/host/report/tests.rs:4 nvx-rs/src/host/report/tests.rs:4
modified test fn a_clone_whose_launch_failed_before_it_began_launches_no_more_until_its_release in host::template::clone::tests::launch nvx-rs/src/host/template/clone/tests/launch.rs:1547 nvx-rs/src/host/template/clone/tests/launch.rs:1549
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:2299 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:2332 nvx-rs/src/host/template/clone/tests/launch.rs:2334
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:2623 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:2654 nvx-rs/src/host/template/store/leases/tests.rs:2656
modified test fn a_missing_boot_and_a_snapshot_are_refused_before_any_output_is_created in host::vm::tests nvx-rs/src/host/vm/tests.rs:492 nvx-rs/src/host/vm/tests.rs:492
modified test fn spawn_caller_helper in host::vm::tests nvx-rs/src/host/vm/tests.rs:1088 nvx-rs/src/host/vm/tests.rs:1089
modified test fn an_unrelated_process_started_in_the_library_spawn_window_gets_no_vm_claim in host::vm::tests nvx-rs/src/host/vm/tests.rs:1139 nvx-rs/src/host/vm/tests.rs:1141
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:1195 nvx-rs/src/host/vm/tests.rs:1198
modified test fn reattaching_returns_the_held_owned_child_and_authenticated_connection in host::vm::tests::reattach nvx-rs/src/host/vm/tests/reattach.rs:229 nvx-rs/src/host/vm/tests/reattach.rs:229
modified test fn a_prepared_launch_hands_the_vmm_its_checked_images_alone in checked_handoff (tests) nvx-rs/tests/checked_handoff.rs:487 nvx-rs/tests/checked_handoff.rs:487
modified test fn a_vmm_keeps_the_scratch_images_claim_once_its_launcher_is_gone in checked_handoff (tests) nvx-rs/tests/checked_handoff.rs:717 nvx-rs/tests/checked_handoff.rs:718
modified test fn a_stop_under_another_identity_never_ends_a_process_that_its_record_does_not_name in cli (tests) nvx-rs/tests/cli.rs:978 nvx-rs/tests/cli.rs:978
modified test fn stop_reports_its_timeout_and_leaves_the_vm_running in cli (tests) nvx-rs/tests/cli.rs:1139 nvx-rs/tests/cli.rs:1141
modified test fn a_sandbox_whose_openvmm_exited_reports_it_once_and_starts_again in cli (tests) nvx-rs/tests/cli.rs:1186 nvx-rs/tests/cli.rs:1190
modified test fn provision_and_deprovision_need_no_artifact_root in cli/download (tests) nvx-rs/tests/cli/download.rs:165 nvx-rs/tests/cli/download.rs:165
modified test fn lifecycle_of_a_sandbox_whose_upper_is_in_ram in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:636 nvx-rs/tests/cli/lifecycle.rs:637
modified test fn stops_keep_an_outcome_report_that_the_caller_reads_whatever_its_umask in cli/lifecycle (tests) nvx-rs/tests/cli/lifecycle.rs:718 nvx-rs/tests/cli/lifecycle.rs:720
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:458
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:498
modified test fn a_committed_launch_names_its_vm_for_another_build in store (tests) nvx-rs/tests/store.rs:497 nvx-rs/tests/store.rs:499
modified test fn long_stores_launch_with_a_short_working_directory in supervisor (tests) nvx-rs/tests/supervisor.rs:596 nvx-rs/tests/supervisor.rs:598
modified test fn a_child_that_exits_wakes_its_waiter in supervisor (tests) nvx-rs/tests/supervisor.rs:664 nvx-rs/tests/supervisor.rs:672
modified test fn a_process_that_is_not_a_child_wakes_its_waiters in supervisor (tests) nvx-rs/tests/supervisor.rs:691 nvx-rs/tests/supervisor.rs:699
modified test fn a_restarted_launcher_finds_its_vmm_again_and_ends_it in supervisor (tests) nvx-rs/tests/supervisor.rs:720 nvx-rs/tests/supervisor.rs:728
modified test fn a_reused_process_id_is_never_signaled in supervisor (tests) nvx-rs/tests/supervisor.rs:751 nvx-rs/tests/supervisor.rs:759
modified test fn references_that_name_no_process_are_never_opened in supervisor (tests) nvx-rs/tests/supervisor.rs:791 nvx-rs/tests/supervisor.rs:799
modified test fn an_unrecorded_vmm_that_serves_no_endpoint_is_never_signaled in supervisor (tests) nvx-rs/tests/supervisor.rs:851 nvx-rs/tests/supervisor.rs:859
modified test fn a_vmm_in_its_orchestrators_job_ends_with_it in supervisor (tests) nvx-rs/tests/supervisor.rs:1483 nvx-rs/tests/supervisor.rs:1491
modified test fn a_job_that_ends_its_vmm_wakes_the_waiters in supervisor (tests) nvx-rs/tests/supervisor.rs:1510 nvx-rs/tests/supervisor.rs:1518
modified test fn a_process_that_this_user_may_not_terminate_is_waited_for_but_never_signaled in supervisor (tests) nvx-rs/tests/supervisor.rs:1566 nvx-rs/tests/supervisor.rs:1574
modified test fn a_host_program_of_another_runtime_ends_the_clone_through_its_verified_identity in vm_clone (tests) tests/runtime-adapter/tests/vm_clone.rs:3882 tests/runtime-adapter/tests/vm_clone.rs:3882
modified test fn a_clone_whose_vm_exits_once_a_stop_found_it_fails_before_its_lease_is_released in vm_clone (tests) tests/runtime-adapter/tests/vm_clone.rs:3930 tests/runtime-adapter/tests/vm_clone.rs:3932

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

Test policy

Change What Before After
loosened allowlist entry nvx-rs/src/host/snapshot.rs (the seams allow 1 test hooks) scripts/test-layout-allowlist.json

Relocated unchanged: 0; added: 52. Compared the merge base c52c7101d4f6 with 4662351ccc22.

@esaurez

Copy link
Copy Markdown
Contributor Author

Superseded by merged #1433, #1440 and #1445. As the latter records, this input-only join had no independent logic: both producers are merged, and the named-store consumer was retargeted to feature/nvx-refactor without replaying the historical aggregate. The join's added patch matches the merged CLI-store source.

Closing only this redundant PR. Its branch and source at 4662351ccc22198ffe16b6935d157bee14a163c0 are retained; this does not complete #1114 or its remaining capture/restore work.

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