Repository navigation
sandbox: accept only the distro layer and scratch - #576
Jay (jay23606) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Existing validation assertions still expect four devices, and managed configurations can silently discard removed layer roles.
2 open findings
What changed in this PR
Implements the NVX portion of #556, restricting sandbox storage to one distro layer and writable scratch. The OpenVMM pin remains unchanged.
Changes:
- Restricts launcher and guest-agent layer handling to
distro. - Updates block discovery checks for two devices and unused former slots.
- Revises launch-contract tests and documentation.
| File | Description |
|---|---|
| scripts/test_nvx_tools.py | Tests the single-distro launch contract. |
| scripts/nvx_tools/sandbox.py | Restricts layer roles and count. |
| scripts/nvx_tools/microvm_tests.py | Attaches only distro and scratch. |
| scripts/nvx_tools/microvm_test_scripts/sandbox-blocks.sh | Checks two devices and freed windows. |
| guest/common/nvx-init-agent | Removes multi-layer mounting and teardown. |
| doc/usage.md | Documents distro-only layer support. |
| doc/run.md | Updates the sandbox storage description. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
3d3fb07 to
761dc6c
Compare
|
Thanks for this change! A heads-up: #597 (PR 4 of the #359 stack) moves |
Nothing produces or attaches a runtime or custom layer. Remove both roles from the launcher, the guest init agent, the microVM test, and the docs. The sandbox-blocks check now verifies that the freed windows are absent. Refs microsoft#556. The OpenVMM side is a separate change; this one works with the current pin because the removed roles are never requested. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
SandboxLaunch rejects any sole layer that is not distro, so a saved runtime or custom launch fails before it reaches the guest. The microVM test now expects the distro and scratch devices. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
619490c to
b2a43b2
Compare


Refs #556. Part one: the NVX side. The OpenVMM change is a separate PR and the pin is not bumped here.
Summary
distrolayer andscratch.runtimeandcustomare refused.sandbox-blocksguest check now expects two devices and verifies the freed windows0xd0004000/0xd0005000are absent.Test
python -m unittest test_nvx_tools: 533 tests pass (54 skipped as before).ruffcheck and format, and pyright strict on Linux and Windows: clean.bash -non the guest agent and the sandbox script.🤖 Generated with Claude Code