Skip to content

refactor(compute): negotiate external driver behavior - #2744

Open
drew wants to merge 3 commits into
refactor/2417-unify-driver-restart/drewfrom
refactor/2417-external-driver-parity/drew
Open

refactor(compute): negotiate external driver behavior#2744
drew wants to merge 3 commits into
refactor/2417-unify-driver-restart/drewfrom
refactor/2417-external-driver-parity/drew

Conversation

@drew

@drew drew commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make post-initialization compute-driver behavior depend on the public gRPC contract instead of concrete in-tree driver names. This stacked follow-up lets canonical driver names be supplied over UDS and negotiates whether the gateway owns graceful-shutdown/startup lifecycle reconciliation.

Related Issue

Closes #2417

Stacked on #2743.

Changes

  • add additive compute-driver feature negotiation for gateway-managed lifecycle and native process identity
  • advertise GATEWAY_MANAGED_LIFECYCLE from Docker, Podman, and VM; Kubernetes and legacy external drivers remain opted out
  • use that capability for both shutdown StopSandbox and startup StartSandbox sweeps
  • keep unspecified process-identity normalization as a separate capability because it occurs before the driver request
  • structurally validate driver-requested callback listeners independently of driver name
  • allow canonical built-in names with --compute-driver-socket, with the explicit endpoint taking precedence
  • prove shutdown, startup, lifecycle, and policy parity through a fake external UDS driver using the canonical docker name
  • document the supported extension boundary in architecture notes and agent diagnostics; no public docs/ changes are included in this PR

Testing

  • mise run pre-commit
  • focused core capability, shutdown/startup reconciliation, and external UDS lifecycle tests
  • OPENSHELL_E2E_DOCKER_TEST=gateway_start mise run e2e:docker
  • mise run test: all completed suites passed except the unrelated gateway_completer_returns_empty_when_no_config, which reproduces in isolation because this host has registered system gateway configuration

Checklist

@github-actions

Copy link
Copy Markdown

@drew
drew marked this pull request as draft August 14, 2026 03:04
@copy-pr-bot

copy-pr-bot Bot commented Aug 14, 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 marked this pull request as ready for review August 14, 2026 23:03
@drew
drew marked this pull request as draft August 14, 2026 23:05
@drew
drew force-pushed the refactor/2417-external-driver-parity/drew branch from eb4006a to 0801416 Compare August 17, 2026 06:05
@drew
drew marked this pull request as ready for review August 17, 2026 06:05
@drew
drew requested a review from sjenning as a code owner August 17, 2026 06:05
@drew
drew removed the request for review from maxamillion August 17, 2026 15:40
drew added 3 commits August 17, 2026 23:56
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 refactor/2417-external-driver-parity/drew branch from daf85c9 to 680d1c2 Compare August 18, 2026 07:03
string default_image = 3;
// Optional behavior supported by this driver instance. Unknown values are
// ignored and omitted features retain conservative gateway behavior.
repeated ComputeDriverFeature features = 6;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Features are essentially binary flags, correct. Do we see the need for something richer?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(compute): define driver shutdown and restart lifecycle contract

2 participants