fix(config): declare shared Docker container key
This commit is contained in:
@@ -458,6 +458,7 @@ def load_cli_config() -> Dict[str, Any]:
|
||||
"daytona_image": "nikolaik/python-nodejs:python3.11-nodejs20",
|
||||
"docker_volumes": [], # host:container volume mounts for Docker backend
|
||||
"docker_mount_cwd_to_workspace": False, # explicit opt-in only; default off for sandbox isolation
|
||||
"docker_shared_container_key": "",
|
||||
},
|
||||
"browser": {
|
||||
"inactivity_timeout": 120, # Auto-cleanup inactive browser sessions after 2 min
|
||||
|
||||
@@ -495,6 +495,9 @@ DEFAULT_CONFIG = {
|
||||
# When on, SETUID/SETGID caps are omitted from the container since
|
||||
# no privilege drop is needed.
|
||||
"docker_run_as_host_user": False,
|
||||
# Explicit opt-in for trusted profiles to reuse the same Docker
|
||||
# container identity. Empty preserves the active-profile boundary.
|
||||
"docker_shared_container_key": "",
|
||||
# Persistent shell — keep a long-lived bash shell across execute() calls
|
||||
# so cwd/env vars/shell variables survive between commands.
|
||||
# Enabled by default for non-local backends (SSH); local is always opt-in
|
||||
|
||||
@@ -128,6 +128,20 @@ class TestConfigYamlRouting:
|
||||
or "TERMINAL_DOCKER_MOUNT_CWD_TO_WORKSPACE=True" in env_content
|
||||
)
|
||||
|
||||
def test_terminal_docker_shared_key_preserves_string_values(
|
||||
self, _isolated_hermes_home, capsys
|
||||
):
|
||||
set_config_value("terminal.docker_shared_container_key", "off")
|
||||
|
||||
import yaml
|
||||
|
||||
saved = yaml.safe_load(_read_config(_isolated_hermes_home))
|
||||
assert saved["terminal"]["docker_shared_container_key"] == "off"
|
||||
assert "TERMINAL_DOCKER_SHARED_CONTAINER_KEY=off" in _read_env(
|
||||
_isolated_hermes_home
|
||||
)
|
||||
assert "not a recognized config key" not in capsys.readouterr().out
|
||||
|
||||
def test_terminal_vercel_runtime_goes_to_config_and_env(self, _isolated_hermes_home):
|
||||
set_config_value("terminal.vercel_runtime", "python3.13")
|
||||
config = _read_config(_isolated_hermes_home)
|
||||
|
||||
Reference in New Issue
Block a user