feat(l1): FlowProposal l1_session_id source linkage (nullable source_session_id + exactly-one check)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 15:34:05 -04:00
parent 9a5cbc35ae
commit 0796874376
5 changed files with 113 additions and 7 deletions

View File

@@ -19,7 +19,10 @@ class FlowProposalSummary(BaseModel):
supporting_session_count: int
status: str
target_flow_id: UUID | None = None
source_session_id: UUID
# Exactly one source is set: source_session_id (FlowPilot ai_session) XOR
# l1_session_id (L1 ai_build walk). Both are nullable on the model.
source_session_id: UUID | None = None
l1_session_id: UUID | None = None
created_at: datetime
model_config = {"from_attributes": True}