diff --git a/hermes_cli/doctor.py b/hermes_cli/doctor.py index 18ea422f3e2..0446f39d7f6 100644 --- a/hermes_cli/doctor.py +++ b/hermes_cli/doctor.py @@ -1727,13 +1727,14 @@ def run_doctor(args): # not found" warning. If the user has explicitly chosen # TERMINAL_ENV=docker inside the container they likely mounted # /var/run/docker.sock, so fall through to the normal check. - if terminal_env != "docker": + # Only the implicit local-vs-docker choice is affected: remote + # backends (ssh, daytona, vercel_sandbox, ...) work fine from + # inside a container and must keep their real diagnostics. + if terminal_env == "local": check_info( "Running inside a container — using local terminal backend " "(docker-in-docker is not configured by default)" ) - # Skip to next section; Docker isn't relevant here. - terminal_env = "local" if terminal_env == "docker": if _safe_which("docker"): # Check if docker daemon is running diff --git a/tests/tools/test_termux_api_detection.py b/tests/tools/test_termux_api_detection.py index c1406c4585a..506655bc3c5 100644 --- a/tests/tools/test_termux_api_detection.py +++ b/tests/tools/test_termux_api_detection.py @@ -166,6 +166,12 @@ class TestDetectAudioEnvironmentTermuxFallback: monkeypatch.delenv("SSH_CLIENT", raising=False) monkeypatch.delenv("SSH_TTY", raising=False) monkeypatch.delenv("SSH_CONNECTION", raising=False) + # detect_audio_environment() also probes the REAL host for + # containment; a containerized CI runner would append the + # container warning and flip available=False. A Termux device is + # never a container — pin the probe to the scenario under test. + import hermes_constants + monkeypatch.setattr(hermes_constants, "is_container", lambda: False) # No sounddevice — we go down the Termux:API branch. monkeypatch.setattr(