Skip to content

feat(isolation): split supervisor and sandbox runtimes - #3151

Open
drew wants to merge 12 commits into
codex/1737-rfc12-supervisor-primitivesfrom
codex/1737-rfc12-supervisor-modes
Open

feat(isolation): split supervisor and sandbox runtimes#3151
drew wants to merge 12 commits into
codex/1737-rfc12-supervisor-primitivesfrom
codex/1737-rfc12-supervisor-modes

Conversation

@drew

@drew drew commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Split the existing combined runtime into two explicit programs: openshell-supervisor, which stays outside the agent workload, and openshell-sandbox, which runs inside the workload and owns its process tree. The two communicate over the shared authenticated gRPC boundary protocol from #2942.

The sandbox uses seccomp notification to intercept TCP socket setup and DNS operations without proxy environment variables. The external supervisor performs policy evaluation, DNS resolution, upstream TCP dialing, L7 enforcement, credential handling, and gateway session management. General application UDP is intentionally unsupported.

Related Issue

Part of #1737.

Changes

  • Add the dedicated openshell-supervisor binary and slim openshell-sandbox boundary runtime.
  • Move policy, credentials, gateway sessions, proxying, and upstream networking into the supervisor.
  • Keep process ownership, exec/attach/signal/wait, PTY handling, binary observation, Landlock, and seccomp interception in the sandbox.
  • Carry lifecycle, process control, TCP streams, and DNS requests over one protected gRPC connection.
  • Add reconnect, readiness, completion, provider-environment update, and bounded resource semantics.
  • Remove legacy nftables/network-namespace interception and general UDP mediation.

Testing

  • mise run pre-commit passes
  • Full unit and E2E validation delegated to remote CI

Checklist

  • Follows Conventional Commits
  • Authored commits are signed off (DCO)

Review remediation

  • Retry transient DNS accept failures with bounded backoff instead of terminating mediation.
  • Revalidate TCP socket identity at decision time, bound decisions to 30 seconds, and keep quota ownership with the worker.
  • Separate bounded pre-auth admission from authenticated sessions, add HTTP/2 liveness detection, and make supervisor replacement non-preemptive.
  • Validate Unix peers and workload ancestry, reserve the Kubernetes control port from mediated egress, and remove unused legacy runtime code.

Stack

  1. feat(isolation): define the RFC 0012 boundary contract #2941 — contract
  2. feat(isolation): add boundary protocol and Linux primitives #2942 — shared interface and primitives
  3. feat(isolation): split supervisor and sandbox runtimes #3151 — supervisor and sandbox runtimes (this PR)
  4. feat(vm): run the supervisor outside the guest workload #2945 — VM driver
  5. feat(docker): isolate workloads behind the host supervisor #2965 — Docker driver
  6. feat(kubernetes): add proxy-pod isolation topology #3144 — Kubernetes proxy-pod topology
  7. feat(podman): isolate workloads behind the host supervisor #3230 — Podman driver
  8. perf(isolation): add TCP and DNS benchmark harnesses #3229 — performance harnesses

@copy-pr-bot

copy-pr-bot Bot commented Sep 3, 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.

@drew
drew force-pushed the codex/1737-rfc12-supervisor-modes branch from c1072f8 to 35727e8 Compare September 3, 2026 14:34
@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 35727e8. 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.

@drew
drew force-pushed the codex/1737-rfc12-supervisor-modes branch from 35727e8 to efa1011 Compare September 5, 2026 16:08
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew
drew force-pushed the codex/1737-rfc12-supervisor-modes branch from b2848a6 to 33304c3 Compare September 5, 2026 20:24
@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

10 similar comments
@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

2 similar comments
@drew

drew commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew

drew commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@drew
drew force-pushed the codex/1737-rfc12-supervisor-modes branch from 5465ecd to bdd19eb Compare September 8, 2026 22:32
@drew drew changed the title feat(sandbox): add control and boundary supervisor modes feat(isolation): split supervisor and sandbox runtimes Sep 8, 2026
@drew
drew force-pushed the codex/1737-rfc12-supervisor-modes branch from fd255bf to fcbf260 Compare September 9, 2026 04:39
@drew
drew removed this pull request from stack #3152 September 9, 2026 04:42
@drew
drew added this pull request to stack #3231 September 9, 2026 04:42
drew added 9 commits September 8, 2026 21:47
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/1737-rfc12-supervisor-modes branch from fcbf260 to ef53c81 Compare September 9, 2026 04:53
drew added 3 commits September 8, 2026 22:14
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
…itives' into codex/loopback-connector-runtime
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
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