diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index bc467382e..addfef2d2 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -33,6 +33,13 @@ services: - EMAIL_PROVIDER=${EMAIL_PROVIDER:-resend} - RESEND_API_KEY=${RESEND_API_KEY:-} - SMTP_FROM=${SMTP_FROM:-noreply@trinity.example.com} + # SMTP transport (EMAIL_PROVIDER=smtp) — read by src/backend/config.py (#771) + - SMTP_HOST=${SMTP_HOST:-} + - SMTP_PORT=${SMTP_PORT:-587} + - SMTP_USER=${SMTP_USER:-} + - SMTP_PASSWORD=${SMTP_PASSWORD:-} + # SendGrid transport (EMAIL_PROVIDER=sendgrid) — read by src/backend/config.py (#771) + - SENDGRID_API_KEY=${SENDGRID_API_KEY:-} - GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID} - GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET} - NOTION_CLIENT_ID=${NOTION_CLIENT_ID} diff --git a/docker-compose.yml b/docker-compose.yml index fbdb9b189..e4717772e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,13 @@ services: - EMAIL_PROVIDER=${EMAIL_PROVIDER:-resend} - RESEND_API_KEY=${RESEND_API_KEY:-} - SMTP_FROM=${SMTP_FROM:-noreply@trinity.example.com} + # SMTP transport (EMAIL_PROVIDER=smtp) — read by src/backend/config.py (#771) + - SMTP_HOST=${SMTP_HOST:-} + - SMTP_PORT=${SMTP_PORT:-587} + - SMTP_USER=${SMTP_USER:-} + - SMTP_PASSWORD=${SMTP_PASSWORD:-} + # SendGrid transport (EMAIL_PROVIDER=sendgrid) — read by src/backend/config.py (#771) + - SENDGRID_API_KEY=${SENDGRID_API_KEY:-} # Log Retention & Archival Configuration - LOG_RETENTION_DAYS=${LOG_RETENTION_DAYS:-90} - LOG_ARCHIVE_ENABLED=${LOG_ARCHIVE_ENABLED:-true} diff --git a/tests/unit/test_slot_per_slot_ttl.py b/tests/unit/test_slot_per_slot_ttl.py index ccaa8494f..f1fdf2900 100644 --- a/tests/unit/test_slot_per_slot_ttl.py +++ b/tests/unit/test_slot_per_slot_ttl.py @@ -47,10 +47,29 @@ sys.path.insert(0, str(_BACKEND)) +# Modules this test stubs into sys.modules (directly or via the +# importlib-loaded slot_service_direct / cleanup_service_direct helpers) +# — restored after each test so they don't leak into other test files in +# the same pytest session. Declaring this at module level (paired with +# the `_restore_sys_modules` fixture below) is the sanctioned +# snapshot/restore pattern recognised by tests/lint_sys_modules.py +# (precedent: tests/unit/test_telegram_webhook_backfill.py). +_STUBBED_MODULE_NAMES = [ + "config", + "redis", + "utils.helpers", + "utils.credential_sanitizer", + "database", + "models", + "services.capacity_manager", + "slot_service_direct", + "cleanup_service_direct", +] + + @pytest.fixture(autouse=True) def _restore_sys_modules(): - names = ["config", "slot_service_direct", "utils.helpers", "redis"] - saved = {n: sys.modules.get(n) for n in names} + saved = {n: sys.modules.get(n) for n in _STUBBED_MODULE_NAMES} try: yield finally: