Repository navigation
host: report restore failure facts without lifecycle policy - #1354
Open
Enrique Saurez (esaurez) wants to merge 4 commits into
Open
Enrique Saurez (esaurez) wants to merge 4 commits into
Enrique Saurez (esaurez) wants to merge 4 commits into
Conversation
Contributor
This pull request changes existing testsIt modifies or removes 3 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: 0; added: 5. Compared the merge base |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the restore failure-reporting changes.
No open issues 🎉
What changed in this PR
Completes RestoreMachine failure reporting for #1103, building on #1347’s restore state machine without adding I/O or lifecycle policy. Process, session, and storage ownership remain with the caller.
Changes:
- Adds failure attribution, guest-execution possibility, and detailed diagnostic messages while preserving the original error source and concise
Display. - Classifies caller-supplied outcome reports using existing guest status rules.
- Extends restore tests and updates both platform API snapshots.
| File | Description |
|---|---|
nvx-rs/src/host/restore/tests.rs |
Tests attribution, report classification, sticky execution facts, cause preservation, and caller ownership. |
nvx-rs/src/host/restore.rs |
Adds policy-free failure facts and outcome classification. |
nvx-rs/public-api/windows.txt |
Records the expanded restore API on Windows. |
nvx-rs/public-api/linux.txt |
Records the expanded restore API on Linux. |
Review effort: Balanced
Enrique Saurez (esaurez)
marked this pull request as ready for review
November 7, 2026 22:19
Base automatically changed from
esaurez/slim-2.3.3-sl2.18a-20261107
to
feature/nvx-refactor
November 8, 2026 00:37
Expose restore attribution, guest execution possibility and the complete cause message while preserving the original error source. Classify only caller-supplied outcome reports and leave processes and persistence with the caller. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6b1be79-70eb-4a72-bf62-e4e8a662b2f6
Keep the focused failure cases at module scope so the test runner executes them, and document the private classification helpers required by warning-denied linting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6b1be79-70eb-4a72-bf62-e4e8a662b2f6
Keep the incoming phase-and-evidence-only display contract while retaining the full diagnostic message and original source checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6b1be79-70eb-4a72-bf62-e4e8a662b2f6
Include the guest activation deadline in the expiry documentation without changing classification or failure behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6b1be79-70eb-4a72-bf62-e4e8a662b2f6
Pedro Henrique Penna (ppenna)
force-pushed
the
esaurez/slim-2.3.3-sl2.18b-20261107
branch
from
November 8, 2026 00:37
7be1c50 to
62b0197
Compare
This branch has not been deployed
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.18b completes the failure facts returned by
host::restore::RestoreMachine.It builds on #1347 and adds phase, policy-free attribution, evidence, whether
guest code may have run, a diagnostic message, and the original error source
to
RestoreError.Attribution follows the existing clone failure rules, without adopting their
records, quarantine, teardown or retry policy. Only an outcome report already
supplied by the caller is classified; the machine performs no I/O.
guest_may_have_runconservatively becomes true after the existingSpawnedinput and remains true through reconnects and failure. It does not prove
execution, imply that the VM remains alive, or claim that a workload started.
Displayretains the phase/evidence-only projection; the complete diagnosticmessage and original boxed cause remain separately available.
RestoreAction::Failleaves the process, session and storage with the caller.Success still ends at Ready without sending mappings or Start. The existing
listener, legacy clone implementation and runtime adapter are unchanged.
Tests
Three existing tests are extended, with their incoming checks preserved:
restore_machine_checks_the_transaction_and_refuses_a_cold_recordretainstransaction refusal and now distinguishes an invalid initial activation
request from an unknown protocol failure, including attribution and the
pre-spawn guest-execution fact.
restore_machine_keeps_operation_phase_evidence_and_original_sourceretainsthe caller's exact phase, evidence and source identity, including the
no-cause-duplication Display check, and adds the remaining failure facts.
restore_machine_expiry_cancellation_and_exit_fail_every_pending_phaseretains every pending-phase and terminal-absorption assertion and adds
attribution, guest-execution possibility, message and source checks.
Five new tests cover all attribution classes, guest report categories and
status bounds, sticky pre/post-spawn facts, full cause-chain messages with
original source identity, and real running/exited child-process ownership.
The cause-chain test's Display expectation follows the existing separation
between concise Display text and the detailed message.
No tests are retired. Existing activation-write, combined Ready, queued
session-loss, transaction and peer-verified listener coverage is preserved.
API and size
Adds
Attributionand the remainingRestoreErrorfields, plus policy-freeevidence classes. The generated Linux and Windows public API snapshots each
record 31 added items.
The entire four-commit owned range above
a876ab5826488cc8e9fb7506979233bf130f45dbmeasures 140 core lines in1 counted file, 4 raw paths, with no ownership or visibility discounts.
The public-parent alignment preserves all four patches and the entire
previously qualified source tree.
Validation
The macOS all-target/all-feature cross-check passed with existing warnings in
unchanged legacy test files. An earlier run exposed a conflicting Display
assertion; the corrected complete restore selection passed without weakening
message, original-source or incoming assertions.
Independent read-only review found no remaining actionable issue. Its exact
reviewed source tree and all four patches are unchanged by the mechanical
public-parent alignment.
This pure sans-I/O failure-facts change needs no native or guest rebuild or
VM matrix. Broader inherited suites, ignored runtime tests and CI are not
claimed as executed or passed here.