"""PostgreSQL DSN access (docs/rules/code-config-yaml.md section 3). The DSN comes from the TRIBO_PG_DSN environment variable and is read ONLY here. It may embed a password: never log it, never hardcode it, never commit it - log host/database names at most. """ from __future__ import annotations import os DEFAULT_DSN = "postgresql://postgres@localhost:5432/tribo" def get_dsn() -> str: return os.environ.get("TRIBO_PG_DSN", DEFAULT_DSN)