Repository navigation
Add NVX Phase 3b lifecycle foundations and KVM evidence workflow - #8840
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Launch-path composition, ACL rollback, lock reclamation, cleanup reporting, and required live KVM validation remain incorrect or incomplete.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 4
Open (5)
Partial ACL grants can remain after post-grant verification fails · New Stale-lock cleanup can delete a newly recreated owner's lock · New Builder emits noncanonical run layout rejected by launch-plan API · New Host paths are not translated to paths inside the Bubblewrap jail · New Cleanup reports PASS despite suppressed resource-removal failures · New
What changed in this PR
Adds internal NVX Phase 3b lifecycle, confinement, network-policy, and validation foundations while keeping NVX unavailable through the CLI.
Changes:
- Adds account, device ACL, cgroup, network, and launch-plan primitives.
- Extends cleanup-record identities and reserves the
nvxruntime name. - Adds tests, documentation, and an opt-in KVM evidence workflow.
| File | Description |
|---|---|
src/nvx/runtime-lifecycle.ts |
Adds Phase 3b lifecycle and launch planning. |
src/nvx/runtime-lifecycle.test.ts |
Tests new lifecycle foundations. |
src/nvx/index.ts |
Exports lifecycle APIs. |
src/nvx/cleanup-record.ts |
Records exact device ACL identities. |
src/nvx/cleanup-record.test.ts |
Tests ACL record validation. |
src/container-runtime.ts |
Reserves the nvx runtime name. |
src/container-runtime.test.ts |
Tests reserved-runtime rejection. |
docs/nvx-security-design.md |
Documents Phase 3b status. |
.github/workflows/nvx-phase-3b-live-kvm.yml |
Adds opt-in evidence collection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| await this.dependencies.run(this.tools.setfacl, [ | ||
| '--modify', `user:${identity.uid}:rw`, devicePath, | ||
| ]); | ||
| const verified = await this.verifyDeviceAcl(deviceIdentity); | ||
| this.aclIdentities.set(devicePath, verified); |
| const owner = await this.readLockOwner(lockDirectory); | ||
| if ( | ||
| owner && | ||
| await this.dependencies.processStartTime(owner.pid) === owner.startTime | ||
| ) return; | ||
| if ( | ||
| !owner && | ||
| (initialStats.mtimeMs === undefined || | ||
| Date.now() - initialStats.mtimeMs < INCOMPLETE_LOCK_STALE_MS) | ||
| ) return; | ||
| await this.dependencies.rm(lockDirectory, { recursive: true, force: true }); |
| if (path.resolve(options.filesystem.runDirectory) !== layout.runDirectory) { | ||
| throw new Error('NVX filesystem bundle must belong to the canonical run directory'); | ||
| } |
| const outcomePath = path.join(layout.runDirectory, 'outcome.json'); | ||
| const oneShotArgs = buildNvxOneShotArguments({ | ||
| ...options.execution, | ||
| nvxRoot: layout.artifactSnapshotDirectory, | ||
| filesystem: options.filesystem, |
| sudo ip netns exec "$netns_name" nft delete table inet "$nft_table" >/dev/null 2>&1 || true | ||
| sudo ip netns delete "$netns_name" >/dev/null 2>&1 || true | ||
| if [ -d "$cgroup_path" ]; then | ||
| sudo rmdir "$cgroup_path" >/dev/null 2>&1 || cleanup_errors+=("cgroup") | ||
| fi | ||
| sudo rmdir /sys/fs/cgroup/awf-nvx-ci-parent >/dev/null 2>&1 || true | ||
| for device in /dev/kvm /dev/net/tun; do | ||
| sudo setfacl -x "u:$account_name" "$device" >/dev/null 2>&1 || true |
|
@copilot address review feedback |
Addressed all five review findings in fb1fb06 and 70c5e15:
|
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit db1e820 |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 Warning Firewall blocked 8 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "msfeed25.pkgs.visualstudio.com"
- "update.googleapis.com"
- "www.google.com"
- "www.gstatic.com"See Network Configuration for more information.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🚀 Security Guard has started processing this pull request |
|
🔌 Smoke Services — All services reachable! ✅
|
|
✅ Build Test Suite completed successfully!
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
📰 DEVELOPING STORY: Smoke Docker Sbx reports failed. Our correspondents are investigating the incident...
|
|
✅ Smoke Claude passed Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.anthropic.com"See Network Configuration for more information.
|
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (api.github.com) reachable Overall: PASS cc Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
Smoke Test: Copilot Engine
Overall: PASS
|
Smoke Test: Copilot BYOK (Direct) Mode ✅Test Results:
Overall Status: PASS Running in direct BYOK mode (
|
Smoke Test: Claude Engine Validation
Overall result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.anthropic.com"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing
Overall: All scenarios pass or are expected-pending. OTEL tracing integration in the api-proxy sidecar is working correctly, including graceful no-op behavior when OTEL isn't configured.
|
Chroot Version Comparison Results
Overall: FAILED — Node.js version mismatch between host and chroot environment (
|
|
Smoke Test: Services Connectivity
Overall: PASS
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes:
|
|
Replace Docker SBX CI smoke tests with Cloud Hypervisor ✅ Warning Firewall blocked 8 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "msfeed25.pkgs.visualstudio.com"
- "update.googleapis.com"
- "www.google.com"
- "www.gstatic.com"See Network Configuration for more information.
|


NVX Phase 3b needs host-owned privileged resource lifecycle management, deny-by-default network enforcement, constrained one-shot launch composition, and live KVM evidence before it can become a selectable runtime. This keeps
nvxunavailable through the CLI/runtime registry while adding the internal foundations required for review.Runtime lifecycle foundations
/dev/kvmand/dev/net/tungrants with exact device/inode/uid evidence and exact revocation.Launch and network composition
sandbox runargv through the Phase 3ip netns exec→ Bubblewrap →setprivconfinement chain.Cleanup and registry safety
nvxin runtime lookup so it fails closed instead of passing through as an arbitrary Docker runtime.Evidence and documentation