From aa3bb3573392d01da10a73df1b4ebd5099957a5f Mon Sep 17 00:00:00 2001 From: Suriyakumarvijayanayagam Date: Tue, 22 Sep 2026 16:43:51 +0530 Subject: [PATCH] fix(deploy): pass NATS_HOST/NATS_PORT and autonomy gates through compose MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The agents connect with NATS_HOST/NATS_PORT (NATS_URL is informational), but docker-compose only forwarded NATS_URL. That was masked while system_config carried the real host as a hardcoded default; after the secrets scrub the default is localhost, so a deploy would have sent every NATS connection — message bus, DispatchAgent, ExceptionAgent — to localhost. Also forwards the autonomy gates (all default false) plus DISPATCH_REALERT_EVERY and LLM_MODEL, so production behaviour is set in .env rather than by code defaults. .env.example updated to match. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_012AJLYcbTHCe45fyFnMfEin --- .env.example | 9 +++++++++ docker-compose.yml | 12 +++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 36eb587..8b40b67 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,7 @@ GO_API_BASE_URL= NATS_URL= +NATS_HOST= +NATS_PORT=4222 REDIS_HOST= REDIS_PORT= REDIS_PASSWORD= @@ -14,3 +16,10 @@ NATS_PASSWORD= ANTHROPIC_API_KEY= LLM_MODEL=claude-opus-4-8 LOG_LEVEL=INFO + +# Autonomy gates — outward-facing/irreversible actions are off unless enabled +DISPATCH_AGENT_AUTONOMOUS=false +EXPRESS_AGENT_AUTONOMOUS=false +EXCEPTION_AGENT_AUTONOMOUS=false +# Re-alert cadence during a failure burst in one zone +DISPATCH_REALERT_EVERY=100 diff --git a/docker-compose.yml b/docker-compose.yml index 48c7e39..02c974f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,8 +13,12 @@ services: container_name: doormile_agents restart: unless-stopped environment: - # NATS — event bus + # NATS — event bus. The agents connect with NATS_HOST/NATS_PORT (NATS_URL + # is informational), so both must be passed through or every connection + # falls back to localhost. - NATS_URL=${NATS_URL} + - NATS_HOST=${NATS_HOST} + - NATS_PORT=${NATS_PORT} - NATS_USER=${NATS_USER} - NATS_PASSWORD=${NATS_PASSWORD} # Redis — GEO queries, miler presence @@ -33,6 +37,12 @@ services: # AI layer — decision engine - AI_LAYER_BASE_URL=${AI_LAYER_BASE_URL} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} + # Agent behaviour. Outward-facing actions stay gated unless explicitly enabled. + - DISPATCH_AGENT_AUTONOMOUS=${DISPATCH_AGENT_AUTONOMOUS:-false} + - EXPRESS_AGENT_AUTONOMOUS=${EXPRESS_AGENT_AUTONOMOUS:-false} + - EXCEPTION_AGENT_AUTONOMOUS=${EXCEPTION_AGENT_AUTONOMOUS:-false} + - DISPATCH_REALERT_EVERY=${DISPATCH_REALERT_EVERY:-100} + - LLM_MODEL=${LLM_MODEL:-claude-opus-4-8} # Logging - LOG_LEVEL=${LOG_LEVEL:-INFO} volumes: