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:
@@ -253,10 +253,12 @@ class AISession(Base):
|
||||
)
|
||||
handoffs: Mapped[list["SessionHandoff"]] = relationship(
|
||||
"SessionHandoff",
|
||||
back_populates="session",
|
||||
cascade="all, delete-orphan",
|
||||
order_by="SessionHandoff.created_at",
|
||||
)
|
||||
resolution_outputs: Mapped[list["SessionResolutionOutput"]] = relationship(
|
||||
"SessionResolutionOutput",
|
||||
back_populates="session",
|
||||
cascade="all, delete-orphan",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user