mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fix: doctor + termux-audio container-env parity
- doctor: 'inside a container' branch rewrote terminal_env to local for EVERY non-docker backend, so TERMINAL_ENV=vercel_sandbox diagnostics vanished when doctor ran inside a container (CI runner pods). Scope the informational skip to the implicit local case only; remote backends keep their real diagnostics. Fixes test_doctor_reports_vercel_backend_diagnostics on ARC runners — and for actual users running doctor in the Docker distribution with a remote terminal backend configured. - termux audio test: detect_audio_environment() probes the real host for containment; pin is_container=False (a Termux device is never a container) so the containerized runner doesn't flip available=False.
This commit is contained in:
parent
7cc95e51ef
commit
b4bfe5b3f2
2 changed files with 10 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue