Repository navigation
Judge the chaos sweep's fault windows with NSE 2.7.0 - #195
Merged
Merged
Conversation
The chaos sweep no longer needs its own probe and pcap reader. In the guest, six NSE streams (DNS, UDP and TCP to the TEST-NET fixture in each family) run as the ordinary user for the whole sweep, and the sweep sends NSE's clocked beacons at every phase edge. scripts/vm/lifecycle/chaos_observer.py replaces chaos_capture.py and judges QEMU's capture with the same rules: - every guest frame to a fixture destination between two beacons of a fault is egress, by the capture's clock, now whatever its layout (IPv6 extension headers included); - a stream idle for more than 500 ms of a fault window, by the guest's clock, makes the run inconclusive; - both positive controls must see every stream on the wire; - no fault may expose traffic during its final hold; only faults that rewrite the enforcement may expose it before; - egress counted before the evidence broke is kept, and a damaged capture, a lost or reordered beacon or an incomplete stream log is never clean. The capture is read one record at a time and keeps only the guest's frames to the fixture. The streams end before the closing beacon, so the beacons bracket every attempt. chaos.sh compresses the logs before copying them over QGA. The nse extra requires network-sandbox-engine>=2.7.0 (one floor for the extra). The automap experiment keeps its own strict pcap reader, moved into scripts/vm/automap/capture.py with its corruption test. 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>
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.
The chaos sweep was the last VM check with its own probe (
tests/chaos_observation.py) and its own capture reader (scripts/vm/lifecycle/chaos_capture.py). It now uses NSE, the way the lifecycle VM has since #189.Guest. Six NSE streams run as the ordinary user for the whole sweep: DNS, UDP and TCP to the TEST-NET fixture, in each family. Root sends NSE's clocked beacons at every phase edge. The host prepares the agents and the stream plans (
chaos_observer.py plan), andchaos.shcopies them into the guest.Host.
scripts/vm/lifecycle/chaos_observer.py checkreplaceschaos_capture.py. The acceptance rules have not changed:Also in this PR:
nseextra requiresnetwork-sandbox-engine>=2.7.0, and the lock is regenerated for NSE only.from_pcap(keep=)reads the full-frame capture one record at a time and keeps only the guest's frames to the fixture.chaos.shcompresses the stream logs before copying them over QGA.scripts/vm/automap/capture.py, together with its corruption test.Tests.
tests/test_chaos_observer.pyruns NSE's real agents against loopback, then breaks one instrument at a time. To check that the tests can fail, I weakened four conditions one at a time: hold egress, the stream gap, log completeness and the guest-MAC filter. Each one made a test fail. The real VM run is thechaosjob of the lifecycle workflow.🤖 Generated with Claude Code