""" app/tenancy/context.py ---------------------- Lightweight, detached descriptor for the resolved tenant. Populated by the resolver while a control-plane session is open, then carried on `g.tenant` for the lifetime of the request. Holds no live ORM object — safe to use after the control session closes. """ from dataclasses import dataclass @dataclass(frozen=True) class TenantContext: id: int slug: str name: str plan_id: int db_uri: str