Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
23 changes: 21 additions & 2 deletions tests/unit/test_slot_per_slot_ttl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading