You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(supervisor): host sandbox instances on one shared runtime with task-scoped identity #5957
From the scale test in #5660: I need one shared supervisor to host hundreds of sandboxes without its thread count and memory growing with every sandbox, busy or idle.
Description
Host all sandbox instances on one shared multi-thread runtime per supervisor (bounded workers, separate from the host control-plane runtime), move sandbox identity from thread-locals to task-scoped context through a scoped spawner that also tracks every per-instance task, and re-express removal, panic handling, and credential revocation so teardown stays fail-closed.
Context
Parent: #5660 (PR 1 of the split; closes its first acceptance criterion). The scoped spawner re-scopes identity at every per-instance spawn, including grpc_client's renewal task; propagation behavior gets verified against the pinned tokio first. Dedicated mode is untouched.
Definition of Done
One shared instance runtime per supervisor with bounded workers and an explicit max_blocking_threads
Identity on per-crate task-locals via the scoped spawner (tokio-util TaskTracker plus abort-handle registry); every per-instance spawn tracked and identity-bound
Removal, panic, and revocation re-expressed: Drop guard inside the instance root task, task-tree join bounded at the current 5s with abort of outstanding tasks when the bound fires, credentials revoked on every exit path (the existing panic test is the bar)
New tests: interleaved busy/idle cross-attribution, Linux-gated thread-count delta with a concrete bound, task-tree cleanup (one run against a real loopback gateway), revocation after removal
After-numbers: census script rerun on this branch at the same pinned N, before/after series posted here
Short RFC in rfc/ plus supervisor README and module doc rewrite
Activity