Skip to content

feat(vm): adopt shared supervisor boundary mode - #2945

Open
drew wants to merge 14 commits into
codex/1737-rfc12-supervisor-modesfrom
codex/vm-host-supervisor
Open

feat(vm): adopt shared supervisor boundary mode#2945
drew wants to merge 14 commits into
codex/1737-rfc12-supervisor-modesfrom
codex/vm-host-supervisor

Conversation

@drew

@drew drew commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adopt the shared openshell-sandbox --mode=control / --mode=boundary convention in the libkrun VM driver. Host control retains policy, gateway, proxy, SSH, and lifecycle authority; the embedded guest boundary owns and observes the workload over an authenticated vsock channel.

This is PR 4 of 6. Its incremental implementation is contained in the existing VM driver, with the associated workspace lockfile and VM build/E2E harness updates.

Stack: #2941#2942#3151this PR#2965#3144.

Related Issue

Part of #1737. The issue does not currently carry state:accepted or roadmap placement; this implementation proceeds under direct maintainer instruction without changing those labels.

Changes

  • Replace the VM-specific guest-control protocol with the common RFC 0012 boundary protocol.
  • Run the native host supervisor in control mode and the embedded guest runtime in boundary mode.
  • Authenticate the vsock topology with VM generation and immutable image identity claims.
  • Keep gateway credentials, policy evaluation, network enforcement, middleware, SSH, and relay registration on the host.
  • Keep process creation, exec, signaling, PTY, loopback forwarding, and binary identity observation in the guest boundary.
  • Route guest egress and host aliases through control while preserving libkrun/QEMU lifecycle, overlays, GPU support, and recovery.
  • Harden lifecycle and recovery: use absolute state paths, validate cached guest artifacts, clear inherited environment, fence parent death, and stop control before tearing down the VM.
  • Rebuild the native control supervisor in the VM development and E2E launch paths so it cannot drift from the embedded boundary protocol.

Testing

  • mise run pre-commit
  • cargo test -p openshell-driver-vm
  • Full VM E2E, including sandbox startup, host aliases, inference/provider paths, and gateway restart
  • Live VM gateway smoke: create, policy allow/deny, exec, connect, logs, stop/start, and delete

Checklist

  • Authored implementation commits follow Conventional Commits and include DCO sign-off
  • VM behavior remains implemented in crates/openshell-driver-vm; non-driver changes are limited to the lockfile and VM-specific build/E2E support
  • Driver documentation and validation paths are updated

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

@drew
drew force-pushed the codex/vm-host-supervisor branch from 4a8f295 to 532fa1b Compare August 26, 2026 07:08
@drew
drew changed the base branch from codex/rfc-0012-impl-base to codex/1737-rfc12-supervisor-primitives August 26, 2026 07:09
@drew
drew force-pushed the codex/vm-host-supervisor branch from 532fa1b to 02e80eb Compare August 26, 2026 08:50
@drew drew changed the title feat(vm): move supervisor outside guest boundary feat(isolation): prototype host-supervised VM and Docker boundaries Aug 26, 2026
@drew
drew force-pushed the codex/vm-host-supervisor branch from 7e10ae3 to 02e80eb Compare August 26, 2026 19:41
@drew drew changed the title feat(isolation): prototype host-supervised VM and Docker boundaries feat(vm): move supervisor outside guest boundary Aug 26, 2026
@drew
drew force-pushed the codex/vm-host-supervisor branch from 02e80eb to be91699 Compare September 1, 2026 00:13
@copy-pr-bot

copy-pr-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@drew
drew force-pushed the codex/vm-host-supervisor branch from be91699 to 273655b Compare September 1, 2026 08:00
@drew
drew force-pushed the codex/vm-host-supervisor branch from 273655b to f7c163d Compare September 1, 2026 08:06
@drew
drew force-pushed the codex/vm-host-supervisor branch from 0c5cd41 to 9291888 Compare September 3, 2026 01:45
@drew
drew marked this pull request as ready for review September 3, 2026 01:46
@drew
drew requested review from a team, derekwaynecarr, mrunalp and sjenning as code owners September 3, 2026 01:46
@drew
drew changed the base branch from codex/1737-rfc12-supervisor-primitives to codex/1737-rfc12-supervisor-modes September 3, 2026 01:46
@drew drew changed the title feat(vm): move supervisor outside guest boundary feat(vm): adopt shared supervisor boundary mode Sep 3, 2026
drew added 3 commits September 3, 2026 07:24
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
drew added 10 commits September 3, 2026 07:25
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew force-pushed the codex/vm-host-supervisor branch from fd784d6 to 36d8ef7 Compare September 3, 2026 14:34
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew drew added the test:e2e Requires end-to-end coverage label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Label test:e2e applied for e51b65f. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant