Repository navigation
host: drive a restore to Ready without I/O or a clock - #1347
Merged
Pedro Henrique Penna (ppenna) merged 4 commits intoNov 8, 2026
Merged
Pedro Henrique Penna (ppenna) merged 4 commits into
Pedro Henrique Penna (ppenna) merged 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the caller-driven restore state machine.
No open issues 🎉
What changed in this PR
Adds a caller-driven RestoreMachine that sequences snapshot restoration through Ready without performing I/O or reading a clock. This advances #1103 using activation record v2 while leaving the existing peer-verified listener unchanged.
Changes:
- Adds restore inputs, actions, phases and errors, with canonical activation retries and transaction validation.
- Adds six transition tests covering retries, ordering, failure details and terminal inputs.
- Documents the caller-owned lifecycle and records 47 new public API items on Linux and Windows.
| File | Description |
|---|---|
nvx-rs/src/host/restore/tests.rs |
Adds pure state-machine transition tests and helpers. |
nvx-rs/src/host/restore.rs |
Implements restore sequencing, retry actions and failure reporting. |
nvx-rs/src/host/mod.rs |
Updates the restore module’s documentation summary. |
nvx-rs/README.md |
Documents machine usage and caller responsibilities. |
nvx-rs/public-api/windows.txt |
Records the new restore API on Windows. |
nvx-rs/public-api/linux.txt |
Records the new restore API on Linux. |
Review effort: Balanced
Base automatically changed from
esaurez/slim-2.3.1-sl2.5b-20261105
to
feature/nvx-refactor
November 7, 2026 20:45
Keep canonical activation bytes and transaction checks across caller-owned sessions. Expose pending-phase failures without clocks, I/O, workload startup or process cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0a09ec47-3362-44a4-9762-1524f868a434
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0a09ec47-3362-44a4-9762-1524f868a434
Record the restore-machine surface on Linux and Windows and resolve the parser documentation link after importing it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0a09ec47-3362-44a4-9762-1524f868a434
Exercise completed activation writes and loss before an activation action is taken. Keep the original failure source separate from the restore message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0a09ec47-3362-44a4-9762-1524f868a434
Pedro Henrique Penna (ppenna)
force-pushed
the
esaurez/slim-2.3.3-sl2.18a-20261107
branch
from
November 7, 2026 20:45
ddb5336 to
a876ab5
Compare
Enrique Saurez (esaurez)
marked this pull request as ready for review
November 7, 2026 22:32
Pedro Henrique Penna (ppenna)
merged commit Nov 8, 2026
4e0ffab
into
feature/nvx-refactor
101 checks passed
Pedro Henrique Penna (ppenna)
deleted the
esaurez/slim-2.3.3-sl2.18a-20261107
branch
November 8, 2026 00:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1103
SL2.18a: extract the ordered restore rules into
host::restore::RestoreMachine, which callers drive without I/O or a clock.This builds on activation record v2 in #1311; the restore-ready listener from
#1297 is already merged. No combined foundation branch or additional PR is
required.
The machine sends the same canonical record in every session, validates
Ready's transaction echo, and offers
ConnectafterSessionLost. Explicitoperation failures retain their phase, evidence and original source; expiry,
cancellation and verified exit fail every pending phase.
ActivateSentdistinguishes a completed write from the Ready wait, while a caller that
combines those operations may report
GuestReadydirectly.Success ends at Ready, without mappings or Start. The caller retains its
session, process and storage. The existing peer-verified listener is
unchanged.
RestoreErrorinitially carries only phase, evidence and source;SL2.18b adds the remaining failure facts.
Tests
No existing tests are modified, relocated or retired. Six new pure transition
tests and three helpers cover identical bytes across retries, transaction
refusal, completed and combined writes, loss before an activation action is
taken, original source identity, and every pending-phase terminal input.
All existing listener tests are kept:
the_held_vm_process_is_accepted_even_after_its_client_closeda_different_real_process_cannot_supply_the_eventan_exited_held_process_cannot_supply_even_an_already_queued_eventa_queued_peer_cannot_be_the_vm_that_reuses_its_pidthe_receiver_fails_closed_without_original_peer_pidfdsthe_expected_process_cannot_change_after_acceptancea_native_listener_transfer_keeps_the_endpoint_usable_after_an_empty_receivethe_socket_is_owner_only_even_when_the_umask_clears_owner_writethe_pipe_is_a_fresh_owner_only_protected_first_instanceThe legacy clone restore and post-Ready integration tests remain unchanged.
API and size
Adds
RestoreMachine,RestoreInput,RestoreAction,RestorePhase,RestoreEvidence, and the minimalRestoreError. Both generated public APIsnapshots record the same 47 added items.
The entire four-commit owned range above
02d4219ff07e74622fe3178ad9e7f5b7d1ea3975measures 213 core lines in1 counted file, 6 raw files, with no ownership or visibility discounts.
The three original patches are preserved; the fourth addresses independent
review findings.
Validation
At
ddb5336242656a412d66d9bf979c2d6b47a88ed6:The macOS all-target/all-feature check also passed. An initial Linux full-test
attempt refused overlong fixture socket paths; using a shorter temporary
directory fixed the environment, and the complete command was rerun
successfully without changing source, assertions or deadlines.
Independent read-only review of this exact head has no remaining findings.
Native builds and VM runs are not needed for this pure host mechanism; no
native, guest, launch-argument or peer-check implementation changes are made.
Existing ignored runtime tests are not claimed as executed, and CI is not
claimed as passed.