perf: add opportunity detail read context

This commit is contained in:
plx
2026-08-14 13:24:37 +00:00
parent 07dc9db198
commit 7d138eccdc
13 changed files with 484 additions and 121 deletions

View File

@@ -776,7 +776,6 @@ def _normalize_stored_identity(identity: Optional[Dict[str, Any]]) -> Optional[D
def latest_identity_for_opportunity(opportunity_id: str) -> Optional[Dict[str, Any]]:
ensure_email_identity_schema()
with engine.begin() as conn:
row = conn.execute(text("""
SELECT id::text, opportunity_id::text, task_id::text, message_id::text,