"""FastAPI dependencies — per-request wiring (SD-0001 §6.2 platform/deps). Yields a pooled connection per request. The pool lives on app.state, built once in create_app(). Later slices add the current-session and mailer dependencies here. """ from __future__ import annotations from collections.abc import Iterator import psycopg from fastapi import Request def get_conn(request: Request) -> Iterator[psycopg.Connection]: """A pooled connection for the duration of one request.""" pool = request.app.state.pool with pool.connection() as conn: yield conn