feat(sandbox): restore actions from pristine snapshots - #69
Open
Windsor Nguyễn (windsornguyen) wants to merge 1 commit into
Open
feat(sandbox): restore actions from pristine snapshots#69Windsor Nguyễn (windsornguyen) wants to merge 1 commit into
Windsor Nguyễn (windsornguyen) wants to merge 1 commit into
Conversation
Windsor Nguyễn (windsornguyen)
requested review from
annyzhou and
Aryan Mahajan (aryanma)
August 12, 2026 18:44
Shengming Liang (LiangShengming)
approved these changes
Aug 13, 2026
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.
Closes #66. Depends on #65.
What does this change?
This PR restores each
untrusted-v1action from a digest-pinned Firecracker snapshot. Fresh boot remains an explicit correctness oracle.The bundle builder boots the trusted guest to a pre-action vsock barrier. It pauses the VM and writes immutable state and memory artifacts.
The launcher verifies the bundle and exact host fingerprint. It stores immutable VM artifacts by SHA-256 and hard-links them into a unique action jail. Firecracker shares unchanged memory through the page cache and uses private copy-on-write pages for changes. Bessemer destroys each clone after one action.
Protocol version 2 authenticates action and input descriptors with SHA-256 across the privileged boundary. It bounds each descriptor before attachment and copies data with Linux
sendfile. The restored guest receives fresh virtio-rng entropy before it reads action state.This PR does not add a network device, host checkout, fallback executor, userfaultfd pager, asynchronous block engine, or guest-visible RDMA path.
CI runs the same conformance tests against fresh boot and snapshot restore. It records all 30 environment-start and round-trip samples. Snapshot restore must improve p50 and p95 environment-start time by at least four times. The benchmark artifact records the environment digest and host fingerprint.
Review focus
How was it tested?
container exec bsmr-snapshot-linux sh -c 'cd /work && cargo clippy --locked -p bsmr_sandbox --all-targets -- -D warnings && cargo test --locked -p bsmr_sandbox'.cargo test --locked -p bsmr_execute_impl firecracker --libpassed 19 tests.pnpm run ci checkpassed 47 tests.pnpm run ci 'check generated'.pnpm run ci 'check license'.pnpm run ci 'check security'.The trusted x86_64 CI lane owns the nested-KVM conformance and performance result. Local macOS tests do not provide KVM evidence.
VOUCHED.td.Reviewers