Files
OpenShell/crates/openshell-sandbox-backend
Drew Newberry eeba0e7954 refactor(runtime): confine and reduce unsafe code (#4130)
* refactor(runtime): confine and reduce unsafe code

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(ci): make signal probe portable and gate Linux initialization

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

* fix(cli): handle platform-specific SSH cancellation lints

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

---------

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
2026-10-10 01:12:03 +00:00
..

OpenShell sandbox backend

This crate implements the supervisor-side isolation backend and the private control protocol shared with openshell-sandbox.

Exec recovery

An exec envelope carries a UUID request ID and an absolute expiration time in Unix milliseconds, set to 30 seconds after creation. The payload digest includes the expiration time, and transport recovery preserves the entire envelope. The supervisor and sandbox need synchronized wall clocks.

The sandbox checks expiration before starting or reattaching an exec. It keeps each admitted request ID until that deadline, independently of process and I/O retention. An expired request, including a delayed first attempt, is rejected even after its ID has been discarded. The sandbox never moves its observed admission clock backwards, so a clock adjustment cannot resurrect discarded requests. Expired IDs are reclaimed when the next exec request arrives.

There is no lifetime exec request count limit. The existing concurrent process retention limit still applies. The deadline governs admission and recovery; it does not terminate an already running command. A recovery timeout can leave the execution outcome unknown.

Exec envelopes without an expiration time are rejected. Update the supervisor and sandbox runtime together when deploying this protocol change.