Description
Normalize the gateway compute-driver startup path so driver selection happens before constructing or validating driver-specific configuration. The current path mixes construction responsibilities across CLI parsing, runtime selection, and per-driver constructors.
Context
While reviewing PR #1703, we found that driver config/acquisition is inconsistent across drivers:
- Docker and VM configs are constructed in
crates/openshell-server/src/cli.rs before the selected runtime is known.
- Kubernetes and Podman configs are constructed lazily inside
build_compute_runtime after driver selection.
- Remote endpoint drivers resolve CLI/env sockets through
Config.compute_driver_endpoints, while TOML endpoint sockets are resolved directly from [openshell.drivers.<name>].
This means unrelated invalid Docker or VM config can fail gateway startup even when another driver is selected, and it makes the endpoint-backed driver path harder to reason about.
Definition of Done
Description
Normalize the gateway compute-driver startup path so driver selection happens before constructing or validating driver-specific configuration. The current path mixes construction responsibilities across CLI parsing, runtime selection, and per-driver constructors.
Context
While reviewing PR #1703, we found that driver config/acquisition is inconsistent across drivers:
crates/openshell-server/src/cli.rsbefore the selected runtime is known.build_compute_runtimeafter driver selection.Config.compute_driver_endpoints, while TOML endpoint sockets are resolved directly from[openshell.drivers.<name>].This means unrelated invalid Docker or VM config can fail gateway startup even when another driver is selected, and it makes the endpoint-backed driver path harder to reason about.
Definition of Done
build_compute_runtimeor an adjacent acquisition layer selects the configured driver before building driver-specific config.