Repository navigation
Judge the lifecycle VM's phases with NSE 2.6.0 - #189
Merged
Merged
Conversation
Each phase now runs NSE's portable stimulus streams in the guest (UDP and TCP to 198.51.100.7 as the non-bypassed user) between two clocked beacons, and scripts/vm/lifecycle/observer.py judges it from QEMU's capture. An attempt on the wire always counts. An absence counts only when the capture is intact and holds both beacons, the beacons place every attempt inside it, each stream's log is complete, and no time went untested except a gap NSE measured as a suspend (CLOCK_BOOTTIME advancing while CLOCK_MONOTONIC stops). One capture now runs per QEMU process instead of one per phase. The suspend/resume streams run through the suspend; before, nothing was measured until after the move to the new network. vm_swap_network hands the capture to the new network before its NIC exists, once QEMU no longer lists the old one. The power-off phase stays on probe.py and egress.py: a stream its machine kills never has a complete log, so NSE cannot vouch for its absences. The nse extra requires network-sandbox-engine>=2.6.0, and the zero-leak suite's gate follows it (one floor for the extra). The lifecycle job installs the reviewed ci lock on the runner for the observer. Tests run NSE's real agents against loopback and break one instrument at a time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
The first Fedora VM run failed "suspend and resume onto a new network" with 1 of 303 attempts on the wire. The packet was the reboot phase's cleartext probe (its payload carries that stream's probe ID), captured 10 s before the suspend phase's opening beacon, from an ephemeral port a suspend attempt later reused. NSE 2.6.0's RequestIndex matches a request by source port alone, even when the packet carries another probe ID, and the joined capture holds the earlier phase. The observer now drops packets captured before the phase's opening beacon: the streams start after it is on the wire, so nothing before it is theirs. Re-judged on that run's artifacts, every phase passes. The docs build failed on a relative link in the changelog; it is absolute now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
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.
This PR is slice 3 of the leak-testing plan for the lifecycle VM: continuous capture, stimulus streams and a phase/time model, built on NSE 2.6.0 ("observing outside the sandbox").
What changes
Phases are observed with NSE. In the guest, NSE's portable agents run over SSH: a clocked beacon, then a UDP and a TCP stimulus stream to
198.51.100.7as the non-bypassed user, then a second beacon once the streams stop.scripts/vm/lifecycle/observer.pyjudges each phase from QEMU's pcap usingCaptureReport.from_pcap,StreamLog.parse,ClockMapandcorrelate.An attempt on the wire always counts. An absence counts only when:
window_complete);Gap.suspended, with the monotonic part within the limit).Anything else is inconclusive, and the check fails.
One capture per QEMU process instead of one per phase: control and session together, then reboot through suspend/resume.
Suspend/resume: the streams now run through the suspend. Before, nothing was measured until after the move to the new network.
vm_swap_networkwaits until QEMU no longer lists the old NIC, so the reply is read rather than trusted after a fixed sleep. It then hands the capture to the new network before its NIC exists, and the observer joins the two files after checking each one.Power-off stays on
probe.pyandegress.py. A stream that its machine kills never has a complete log, so NSE 2.6.0 cannot vouch for its absences. Two NSE additions have been asked for to close this gap: reporting orphan stream packets, and evaluating a log that a boot cut short.Dependency floor:
nseextra and the suite gate move to>=2.6.0, withci.txthashes taken from PyPI's JSON API. The lifecycle job installs the reviewedcilock on the runner for the observer.Evidence
tests/test_lifecycle_observer.py(15 tests) runs NSE's real agents against loopback, so nothing reaches a real network. It breaks one instrument at a time and requires each of these to come out failing or inconclusive, never clean:Lifecycle (VM)jobs are the first end-to-end run, so their result is the evidence.🤖 Generated with Claude Code