"""Persistence layer — a dedicated Postgres for the per-user feed (so matches survive navigation). Optional by design: if `DATABASE_URL` is unset or the DB is unreachable, the engine still serves live searches — it just can't replay them. Every call here degrades gracefully (logs + no-ops), never crashes. """