fix: add back_populates to SessionHandoff and SessionResolutionOutput relationships

SQLAlchemy SAWarning about overlapping relationships was promoted to
an error by pytest filterwarnings=error, crashing mapper initialization
and causing 500s on every request — cascading to 423+ test failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-27 17:46:07 +00:00
parent c7abe905f7
commit e130976803
3 changed files with 4 additions and 2 deletions

View File

@@ -36,4 +36,4 @@ class SessionResolutionOutput(Base):
updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=lambda: datetime.now(timezone.utc), onupdate=lambda: datetime.now(timezone.utc))
# Relationships
session = relationship("AISession", foreign_keys="SessionResolutionOutput.session_id")
session = relationship("AISession", foreign_keys="SessionResolutionOutput.session_id", back_populates="resolution_outputs")