代码提交
This commit is contained in:
1 parent
d93cc62806
commit
ddf83f7728
25 files changed
+4086
-424
No files matched your search
@@ -140,9 +140,9 @@ async def test_send_message_creates_real_session_and_run(svc, store):
|
||||
assert conv_row.internal_session_id is not None
|
||||
assert conv_row.safe_status == "running"
|
||||
assert conv_row.active_run_id is not None
|
||||
# Stage 3 persists the manager.intent and manager.dispatch events in
|
||||
# the same conversation-global cursor as the user message.
|
||||
assert conv_row.last_stream_seq == 3
|
||||
# send_message writes only user.message.created; the manager.dispatch
|
||||
# projection comes later from the real workflow via bridge_workflow_event.
|
||||
assert conv_row.last_stream_seq == 1
|
||||
|
||||
session_row = (await session.execute(
|
||||
select(MafRoundtableSessionRow).where(MafRoundtableSessionRow.id == conv_row.internal_session_id)
|
||||
@@ -201,7 +201,7 @@ async def test_message_public_dto_no_run_id(svc, store):
|
||||
assert "run_id" not in msg
|
||||
assert msg["content"] == "test content"
|
||||
assert msg["message_kind"] == "user"
|
||||
assert last_seq == 3
|
||||
assert last_seq == 1
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -223,7 +223,7 @@ async def test_last_stream_seq_contiguous(svc, store):
|
||||
conv_row = (await session.execute(
|
||||
select(MafRoundtableConversationRow).where(MafRoundtableConversationRow.id == conv["id"])
|
||||
)).scalars().first()
|
||||
assert conv_row.last_stream_seq == 6
|
||||
assert conv_row.last_stream_seq == 2
|
||||
|
||||
msgs = (await session.execute(
|
||||
select(MafRoundtableMessageRow).where(
|
||||
@@ -231,7 +231,7 @@ async def test_last_stream_seq_contiguous(svc, store):
|
||||
).order_by(MafRoundtableMessageRow.seq)
|
||||
)).scalars().all()
|
||||
seqs = [m.seq for m in msgs]
|
||||
assert seqs == [1, 4]
|
||||
assert seqs == [1, 2]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -343,13 +343,13 @@ async def test_event_only_item_advances_the_same_sse_cursor(svc, store):
|
||||
event_type="manager.intent",
|
||||
event_data={"status": "understood"},
|
||||
)
|
||||
assert item["seq"] == 4
|
||||
assert item["seq"] == 2
|
||||
|
||||
messages, last_stream_seq = await svc.list_messages(conversation_id=conv["id"], user_id="u1")
|
||||
assert [message["seq"] for message in messages] == [1]
|
||||
assert last_stream_seq == 4
|
||||
assert last_stream_seq == 2
|
||||
events = await store.conversation_events.list_events(conv["id"])
|
||||
assert [event["seq"] for event in events] == [1, 2, 3, 4]
|
||||
assert [event["seq"] for event in events] == [1, 2]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in new issue
Block a user