Python: Add CreateConversationExecutor, fix input routing, remove unused handler layer (#4159)

* Fixed declarative deep research sample

* Small fix

* Resolved comment

* Add CreateConversationExecutor, fix input routing, remove unused handler layer

* Address Copilot feedback

* Fix System.ConversationId

---------

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
This commit is contained in:
Evan Mattson
2026-02-24 10:59:39 +09:00
committed by GitHub
Unverified
parent bb4fe48c9a
commit de612c47f5
24 changed files with 456 additions and 3597 deletions
@@ -223,3 +223,33 @@ class TestWorkflowStateResetTurn:
assert state.get("Workflow.Inputs.query") == "test"
assert state.get("Workflow.Outputs.result") == "done"
class TestWorkflowStateConversationIdInit:
"""Tests that WorkflowState generates a real UUID for System.ConversationId."""
def test_conversation_id_is_not_default(self):
"""System.ConversationId should be a UUID, not 'default'."""
import uuid
state = WorkflowState()
conv_id = state.get("System.ConversationId")
assert conv_id is not None
assert conv_id != "default"
uuid.UUID(conv_id) # Raises ValueError if not a valid UUID
def test_conversations_dict_initialized(self):
"""System.conversations should contain an entry matching ConversationId."""
state = WorkflowState()
conv_id = state.get("System.ConversationId")
conversations = state.get("System.conversations")
assert conversations is not None
assert conv_id in conversations
assert conversations[conv_id]["id"] == conv_id
assert conversations[conv_id]["messages"] == []
def test_each_instance_generates_unique_id(self):
"""Each WorkflowState instance should have a different ConversationId."""
state1 = WorkflowState()
state2 = WorkflowState()
assert state1.get("System.ConversationId") != state2.get("System.ConversationId")