Repository navigation
fix(test): align snapshot disk gate with runtime contracts - #89
Merged
Merged
Conversation
mkagenius
marked this pull request as ready for review
October 5, 2026 20:07
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.
Summary
The snapshot-disk KVM gate no longer matches the current API and runtime records: it reads a removed
pathresponse field, sends the rejectedsnapshot_pathrestore field, and expects restored writable overlays at the obsolete<vm-id>.cowfilename. These assumptions abort the gate before it proves disk isolation.Use the public opaque
snapshot_idfor snapshot and restore requests. Resolve artifact and per-VM overlay paths through read-only queries of the harness's private SQLite store. Keep checks that the snapshot survives source deletion, restored overlays exist and differ, checkpoint contents are preserved, and writes remain private to each restore.Add six black-box regressions that execute the real shell harness against a small local fake API. Restored overlay filenames deliberately differ from cold-boot filenames. Cases cover success, missing snapshot record/artifact, missing runtime record/overlay, and shared restored disk state. Ordinary CI runs these without KVM. No production API, VMM, protocol, restore-sizing, Rust source, or dependency changes.
Validation
pathfield. A mutation retainingsnapshot_pathfails with HTTP 400. The first corrected script failed on real KVM because of its stale overlay filename; the updated fake also reproduces that failure.8e6eb14c4711a5a436744c8af2001db80b2ccb6b: all six harness regressions pass on macOS, Azure Linux, and GitHub Actions Linux.bash -n,git diff --check, Ruff 0.16.5 E/F/I lint, and Ruff formatting pass.RESULT: SNAPSHOT_DISK_PASS, 11.36 seconds total, snapshot capture 6,711 ms. Ubuntu 24.04 x86_64 on Azure E2ds_v6 with real nested KVM and Btrfs/NVMe scratch. The test created a source, captured its checkpoint, changed and deleted it, restored twice, and verified private writes. Existing release binaries were reused only after verifying that the follow-up changes exactly two harness files and leaves all production sources identical. Kernel and binary hashes were recorded.fetch_updatedeprecations atmetrics.rs:320/326andpty.rs:119, before its Rust suite. Separate draft fix(orch): preserve saturating atomic updates on Rust 1.99 #87 addresses those errors. Security passes. The guest-kernel workflow also passes; it is separate from the completed live gate.Checklist