Skip to content

Config Validation: 5 critical config gaps found (SMTP/SendGrid not forwarded, GOOGLE_API_KEY undocumented) #771

Closed

Description

@vybe

Automated Config Validation Report

Date: 2026-05-11
Triggered by: scheduled /validate-config run
Result: 5 must-fix config issues


Critical Findings

1. SMTP credentials not forwarded to backend container

SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD are documented in .env.example and read by src/backend/config.py:49-52, but neither docker-compose.yml nor docker-compose.prod.yml includes them in the backend environment: block. Only SMTP_FROM is forwarded. Users who set EMAIL_PROVIDER=smtp get silent auth failures with no error message.

Fix: Add to backend environment: in both compose files:

- SMTP_HOST=${SMTP_HOST:-}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER=${SMTP_USER:-}
- SMTP_PASSWORD=${SMTP_PASSWORD:-}

2. SENDGRID_API_KEY not forwarded to backend container

Documented in .env.example, read at src/backend/config.py:54, but absent from both docker-compose environment: blocks. EMAIL_PROVIDER=sendgrid silently fails.

Fix: Add to backend environment: in both compose files:

- SENDGRID_API_KEY=${SENDGRID_API_KEY:-}

3. GOOGLE_API_KEY used but undocumented in .env.example

Both docker-compose.yml:19 and docker-compose.prod.yml:40 forward GOOGLE_API_KEY=${GOOGLE_API_KEY:-} to the backend. It is read at services/settings_service.py:84 and used as a fallback when GEMINI_API_KEY is empty (config.py:104). It is never mentioned in .env.example.

Fix: Add to .env.example:

# Google API Key (for Gemini-powered agents; GEMINI_API_KEY takes precedence for image gen)
GOOGLE_API_KEY=

4. FRONTEND_URL duplicated in .env.example with contradictory descriptions

Line 129: "Public-facing frontend URL — REQUIRED in production"
Line 154: "Frontend URL (for email links, OAuth callbacks) — Leave empty to auto-detect"

Most env parsers use the last value, silently discarding line 129. The two descriptions are contradictory.

Fix: Remove one of the two occurrences and consolidate the description at the first site (line 129).

5. TRINITY_PASSWORD in prod compose has dangerous fallback default

docker-compose.prod.yml:213:

- TRINITY_PASSWORD=${ADMIN_PASSWORD:-changeme}

If ADMIN_PASSWORD is ever unset during deployment, the MCP server boots with password changeme. Local docker-compose.yml:144 uses a different variable (${TRINITY_PASSWORD:-}, empty default) — the two files reference different env vars for the same concept, creating operator confusion.

Fix: Align both compose files to use ${TRINITY_PASSWORD:-${ADMIN_PASSWORD:-}} or remove the changeme fallback. Document TRINITY_PASSWORD in .env.example as an alias.


Recommended Actions (in priority order)

  1. Forward SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SENDGRID_API_KEY in backend environment block of both compose files
  2. Add GOOGLE_API_KEY to .env.example
  3. Remove duplicate FRONTEND_URL from .env.example
  4. Remove changeme fallback from TRINITY_PASSWORD in docker-compose.prod.yml

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

Activity

  1. added
    priority-p1
    type-bug
    automated
    on May 11, 2026
  2. added
    status-in-progress
    on May 18, 2026
  3. self-assigned this
    on May 18, 2026
  4. dolho commented on May 18, 2026

    @dolho
    Contributor

    Triaged + partially fixed in #883 (→ dev).

    Re-verified all 5 findings against current dev (this report was generated 2026-05-11; the codebase moved on since):

    Net: 2 of 5 were still actionable. #883 fixes those two with minimal scope. The remaining 3 require no change — recommend closing this issue once #883 merges.

    (Process note: the scheduled /validate-config report wasn't re-validated before filing, so 60% of it was already-fixed by the time it was triaged. Worth having the job diff against current dev at triage time.)

  5. added
    status-in-dev
    and removed
    status-in-progress
    on May 28, 2026
  6. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  7. added
    theme-reliability
    and removed
    status-in-dev
    on Jun 1, 2026
  8. added a commit that references this issue on Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

automatedpriority-p1theme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions