feat: unify debug runtime timelines
This commit is contained in:
@@ -144,6 +144,22 @@ class ConversationRecorderTest(unittest.IsolatedAsyncioTestCase):
|
||||
self.assertEqual(saved["sessionId"], "conv_test")
|
||||
self.assertEqual(saved["sequence"], 1)
|
||||
|
||||
async def test_internal_message_stage_transport_trace_is_not_persisted_twice(self):
|
||||
recorder = ConversationRecorder("conv_test")
|
||||
event = {
|
||||
"type": "workflow-event",
|
||||
"eventId": "wfe_internal",
|
||||
"event": "client_tool_completed",
|
||||
"functionName": "show_message",
|
||||
"internalStage": True,
|
||||
}
|
||||
|
||||
with patch("services.conversation_history.SessionLocal") as session_local:
|
||||
await recorder.record_transport_message(event)
|
||||
|
||||
session_local.assert_not_called()
|
||||
self.assertEqual(recorder._trace_sequence, 0)
|
||||
|
||||
async def test_image_is_persisted_as_message_with_artifact(self):
|
||||
conversation = SimpleNamespace(message_count=0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user