Repository navigation
Description
Automated Config Validation Report
Date: 2026-05-08
Result: 5 critical config issues require attention
P0 — Production Deployment Failures
1. INTERNAL_API_SECRET missing from prod MCP server (docker-compose.prod.yml)
The local docker-compose.yml passes INTERNAL_API_SECRET to the MCP service. docker-compose.prod.yml does not. The MCP server uses this in src/mcp-server/src/audit.ts:18 for SEC-001 Phase 3 audit logging (all MCP tool calls). Without it, every POST /api/internal/audit call from the MCP server returns 401 — all MCP tool-call audit events silently fail in production.
Fix: Add - INTERNAL_API_SECRET=${INTERNAL_API_SECRET} to the mcp-server environment block in docker-compose.prod.yml.
2. EXTRA_CORS_ORIGINS missing from prod backend (docker-compose.prod.yml)
EXTRA_CORS_ORIGINS is documented in .env.example, read in config.py:90, and set in the local compose backend. It is absent from the prod compose backend environment block. Production deployments cannot configure CORS for external domains through compose — their external domains will be CORS-blocked unless the env var is manually injected outside compose.
Fix: Add - EXTRA_CORS_ORIGINS=${EXTRA_CORS_ORIGINS:-} to the backend environment block in docker-compose.prod.yml.
P1 — User/Deployment Confusion
3. GOOGLE_API_KEY used in code and both compose files but absent from .env.example
Both docker-compose.yml and docker-compose.prod.yml reference ${GOOGLE_API_KEY:-}. Backend config.py:104 uses it as a fallback when GEMINI_API_KEY is unset. settings_service.py:84 and agent_service/crud.py:398 read it directly for Gemini-powered agents. New deployers who set GOOGLE_API_KEY (common Google AI path) get no guidance.
Fix: Add GOOGLE_API_KEY= entry to .env.example under the Image Generation section, with a note that it is interchangeable with GEMINI_API_KEY for agent containers.
4. FRONTEND_URL appears twice in .env.example (lines 130 and 154)
Lines 130 and 154 both define FRONTEND_URL= with different descriptions. The duplicate is confusing and may cause copy-paste errors.
Fix: Remove the second occurrence (line 154). Keep the one at line 130 under SERVICE URLS and improve its comment.
5. TRINITY_DATA_PATH used in prod compose but absent from .env.example
docker-compose.prod.yml lines 64 and 157 use ${TRINITY_DATA_PATH:-./trinity-data} for the bind-mount data path (where trinity.db and agent files live on the host). This is not documented in .env.example. Production operators don't know they need to set this for custom data paths.
Fix: Add TRINITY_DATA_PATH=./trinity-data to .env.example under SERVICE URLS or a new DATA PATHS section.
Recommended Actions (Priority Order)
docker-compose.prod.yml: AddINTERNAL_API_SECRETto MCP server env blockdocker-compose.prod.yml: AddEXTRA_CORS_ORIGINSto backend env block.env.example: AddGOOGLE_API_KEY=under Image Generation / Gemini section.env.example: Remove duplicateFRONTEND_URL(line 154).env.example: AddTRINITY_DATA_PATH=./trinity-datawith documentation
Additional Findings (Informational — no issue required)
20+ undocumented but optional tuning vars exist in backend code with sensible defaults:
VOICE_ENABLED, VOICE_MODEL, VOICE_MAX_DURATION, EMAIL_AUTH_ENABLED, SLACK_APP_TOKEN, SLACK_TRANSPORT_MODE, AUDIT_LOG_RETENTION_DAYS, AUDIT_RETENTION_ENABLED, OTEL_SAMPLE_RATE, TRUSTED_PROXIES, TRINITY_MCP_URL, SCHEDULER_URL, etc. These work out of the box but cannot be discovered by operators reading .env.example.
Generated by scheduled /validate-config run
Activity
AndriiPasternak31 commentedon Jun 14, 2026
/claim
github-actions commentedon Jun 14, 2026
Claimed by @AndriiPasternak31. Label
status-in-progressadded.Next steps:
feature/722-<short-slug>Fixes #722AndriiPasternak31 commentedon Jun 14, 2026
Verified each of the 5 items against current
dev(fcfb93a2). 3 of 5 are already fixed; 2 remain valid. Scoping this issue down to the survivors.Still valid (real prod-deployment bugs)
INTERNAL_API_SECRETmissing from the prodmcp-serverblock — confirmed absent (docker-compose.prod.ymlmcp-server env, ~L337–345).src/mcp-server/src/audit.ts:18still reads it, soPOST /api/internal/audit401s and all MCP tool-call audit silently fails in prod. (Note:INTERNAL_API_SECRETis now wired into the backend (L97) and scheduler (L284) blocks — only mcp-server is missing it.)EXTRA_CORS_ORIGINSmissing from the prodbackendblock — absent from prod compose; present in local compose (L87); read atsrc/backend/config.py:91. External domains stay CORS-blocked unless injected outside compose.Already fixed (no action)
GOOGLE_API_KEYdocumented —.env.example:130FRONTEND_URLremoved — single occurrence at.env.example:232TRINITY_DATA_PATHdocumented —.env.example:301–302Remaining fix is two compose lines:
- INTERNAL_API_SECRET=${INTERNAL_API_SECRET}to the mcp-server env block- EXTRA_CORS_ORIGINS=${EXTRA_CORS_ORIGINS:-}to the backend env blockfix(compose): mount Vector logs read-only into prod backend so LOG_* …
fix(compose): forward INTERNAL_API_SECRET to prod mcp-server + CORS/S…
feat(hosting): publish prebuilt images and install from them (#2280) (#…