Skip to content

Config Validation: 9 critical config issues found #656

Closed as not planned
Closed as not planned

Description

@vybe

Automated Config Validation Report

Date: 2026-05-05
Result: 9 critical config issues require attention


Critical Findings (P0-P1)

1. GOOGLE_API_KEY used in code + docker-compose but missing from .env.example

Used in src/backend/config.py (fallback for GEMINI_API_KEY), services/settings_service.py, services/agent_service/crud.py, docker-compose.yml:19, docker-compose.prod.yml:40. New deployers won't set it; Gemini-powered agents will silently fail.

2. MCP server password divergence: dev uses TRINITY_PASSWORD, prod uses ADMIN_PASSWORD

  • docker-compose.yml:144: TRINITY_PASSWORD=${TRINITY_PASSWORD:-} — defaults to empty
  • docker-compose.prod.yml:213: TRINITY_PASSWORD=${ADMIN_PASSWORD:-changeme} — defaults to "changeme"

Neither TRINITY_PASSWORD nor this divergence is documented in .env.example. Dev MCP server has no password unless TRINITY_PASSWORD is explicitly set; prod uses a dangerous "changeme" default.

3. Production Redis has no --requirepass — REDIS_PASSWORD silently ignored

docker-compose.prod.yml Redis command: is redis-server --appendonly yes --maxmemory 256mb ... with no --requirepass. Even if REDIS_PASSWORD is set in .env, production Redis runs unauthenticated. Dev correctly uses --requirepass "$REDIS_PASSWORD".

4. VITE_API_BASE vs VITE_API_URL — frontend env var name mismatch

src/frontend/src/components/HostTelemetry.vue:5 reads import.meta.env.VITE_API_BASE but docker-compose only provides VITE_API_URL. src/frontend/.env.local.example mentions a third name VITE_API_BASE_URL. Host telemetry always falls back to empty string '' — API calls may silently hit wrong endpoint.

5. EXTRA_CORS_ORIGINS, SSH_HOST, ADMIN_USERNAME present in dev but missing from docker-compose.prod.yml

These vars are forwarded in docker-compose.yml backend environment block but absent from docker-compose.prod.yml. Production CORS for custom domains can't be configured without editing the compose file. SSH host override and admin username customization also silently break.

6. trinity-archives volume missing from docker-compose.prod.yml

docker-compose.yml defines trinity-archives: volume and mounts it to /data/archives for log archiving (LOG_ARCHIVE_PATH=/data/archives). docker-compose.prod.yml has no such volume or mount. Log archiving will fail in production (writes to a non-persistent path).

7. LOG_RETENTION_DAYS, LOG_ARCHIVE_ENABLED, LOG_CLEANUP_HOUR undocumented

Set in docker-compose.yml backend environment, read in services/log_archive_service.py and routers/logs.py, but not documented in .env.example. Operators can't discover or configure data retention behavior.

8. SLACK_APP_TOKEN undocumented in .env.example

Required for Slack Socket Mode (the default per SLACK_TRANSPORT_MODE=socket in services/settings_service.py:123). Not in .env.example, not forwarded in docker-compose. Slack integration silently fails without it.

9. VOICE_ENABLED, VOICE_MODEL, VOICE_MAX_DURATION undocumented

Voice chat (VOICE-001) is a shipped feature. Three config vars read in src/backend/config.py:107-109 are absent from .env.example and not forwarded in docker-compose. Operators can't configure or disable voice.


Additional Informational Findings (not blocking)

Var Used in Missing from
EMAIL_AUTH_ENABLED config.py:10 .env.example, docker-compose
SLACK_AUTO_VERIFY_EMAIL config.py:62 .env.example
SLACK_TRANSPORT_MODE settings_service.py:123 .env.example
AUDIT_LOG_RETENTION_DAYS audit_retention_service.py:45 .env.example, docker-compose
AUDIT_RETENTION_ENABLED audit_retention_service.py:48 .env.example, docker-compose
REDIS_STREAM_MAXLEN event_bus.py:54 .env.example, docker-compose
OTEL_SAMPLE_RATE main.py:262 .env.example, docker-compose
OTEL_PROMETHEUS_ENDPOINT observability.py:20 .env.example, docker-compose
WEBHOOK_RATE_LIMIT routers/webhooks.py:30 .env.example, docker-compose
SCHEDULER_LOG_LEVEL docker-compose.yml:171 .env.example
TRINITY_MCP_URL crud.py:346, system_agent_service.py:163 .env.example, docker-compose
TRUSTED_PROXIES routers/public.py:80 .env.example, docker-compose
TRINITY_GIT_BASE_URL / TRINITY_GIT_API_BASE git_service.py, github_service.py .env.example (commented out only)

Recommended Actions (Prioritized)

  1. Add --requirepass to prod Redis or document that REDIS_PASSWORD is dev-only
  2. Fix VITE_API_BASE in docker-compose → rename to VITE_API_BASE or fix the code to read VITE_API_URL
  3. Align MCP server password in docker-compose.yml to use ${ADMIN_PASSWORD:-} (same as prod)
  4. Add trinity-archives volume to docker-compose.prod.yml with matching mount
  5. Forward missing vars to prod: EXTRA_CORS_ORIGINS, SSH_HOST, ADMIN_USERNAME
  6. Add to .env.example: GOOGLE_API_KEY, SLACK_APP_TOKEN, VOICE_ENABLED/MODEL/MAX_DURATION, LOG_RETENTION_DAYS/LOG_ARCHIVE_ENABLED/LOG_CLEANUP_HOUR

Generated by scheduled /validate-config run on 2026-05-05

Activity

  1. added
    priority-p1
    type-bug
    automated
    on May 5, 2026
  2. added
    complexity-medium
    theme-devex
    on Jun 3, 2026
  3. vybe commented on Jun 10, 2026

    @vybe
    ContributorAuthor

    Superseded by #722 — newer Config Validation snapshot (2026-05-08, the remaining 5 of the earlier 9 after partial fixes). #722 is the current tracking issue and is linked under epic #411. Closing the older snapshot; re-open any item from here that #722 doesn't cover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    automatedcomplexity-mediumpriority-p1theme-devextype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions