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:
16
backend/tests/test_flow_proposal_l1_source.py
Normal file
16
backend/tests/test_flow_proposal_l1_source.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import uuid
|
||||
from app.models.flow_proposal import FlowProposal
|
||||
|
||||
|
||||
def test_flow_proposal_accepts_l1_session_id_without_source_session():
|
||||
p = FlowProposal(
|
||||
account_id=uuid.uuid4(),
|
||||
l1_session_id=uuid.uuid4(),
|
||||
source_session_id=None,
|
||||
proposal_type="new_flow",
|
||||
title="AI L1 draft",
|
||||
proposed_flow_data={"tree_structure": {"id": "root"}},
|
||||
source="ai_realtime_l1",
|
||||
status="pending",
|
||||
)
|
||||
assert p.l1_session_id is not None and p.source_session_id is None
|
||||
Reference in New Issue
Block a user