test: complete workflow test doubles with env/conversation variables

The secret-scrub wiring reads workflow.environment_variables /
conversation_variables when building the response converter; unit tests that
mock the workflow as a bare SimpleNamespace must provide these attributes
(empty = no secrets). Fixes the workflow task-pipeline and HITL contract tests.
This commit is contained in:
Charles Yao
2026-07-16 22:32:32 -07:00
parent c5a066ed6d
commit bae3453c50
2 changed files with 28 additions and 4 deletions
@@ -433,7 +433,13 @@ class TestHitlServiceApi:
)
pipeline = AdvancedChatAppGenerateTaskPipeline(
application_generate_entity=application_generate_entity,
workflow=SimpleNamespace(id="workflow-id", tenant_id="tenant", features_dict={}),
workflow=SimpleNamespace(
id="workflow-id",
tenant_id="tenant",
features_dict={},
environment_variables=[],
conversation_variables=[],
),
queue_manager=SimpleNamespace(invoke_from=InvokeFrom.WEB_APP, graph_runtime_state=None),
conversation=SimpleNamespace(id="conv-id", mode=AppMode.ADVANCED_CHAT),
message=SimpleNamespace(
@@ -526,7 +532,13 @@ class TestHitlServiceApi:
)
pipeline = WorkflowAppGenerateTaskPipeline(
application_generate_entity=application_generate_entity,
workflow=SimpleNamespace(id="workflow-id", tenant_id="tenant", features_dict={}),
workflow=SimpleNamespace(
id="workflow-id",
tenant_id="tenant",
features_dict={},
environment_variables=[],
conversation_variables=[],
),
queue_manager=SimpleNamespace(invoke_from=InvokeFrom.WEB_APP, graph_runtime_state=None),
user=SimpleNamespace(id="user", session_id="session"),
stream=False,
@@ -79,7 +79,13 @@ def _make_pipeline():
extras={},
call_depth=0,
)
workflow = SimpleNamespace(id="workflow-id", tenant_id="tenant", features_dict={})
workflow = SimpleNamespace(
id="workflow-id",
tenant_id="tenant",
features_dict={},
environment_variables=[],
conversation_variables=[],
)
user = SimpleNamespace(id="user", session_id="session")
pipeline = WorkflowAppGenerateTaskPipeline(
@@ -505,7 +511,13 @@ class TestWorkflowGenerateTaskPipeline:
extras={},
call_depth=0,
)
workflow = SimpleNamespace(id="workflow-id", tenant_id="tenant", features_dict={})
workflow = SimpleNamespace(
id="workflow-id",
tenant_id="tenant",
features_dict={},
environment_variables=[],
conversation_variables=[],
)
queue_manager = SimpleNamespace(invoke_from=InvokeFrom.WEB_APP, graph_runtime_state=None)
end_user = EndUser(tenant_id="tenant", type="session", name="user", session_id="session-id")
end_user.id = "end-user-id"