From 2a952dd81cdc2b6bc8028c206f1839bd514b16aa Mon Sep 17 00:00:00 2001 From: HAL9000 Date: Wed, 13 May 2026 10:36:59 +0000 Subject: [PATCH] fix(tui): strengthen response status assertion in TUI A2A integration steps Replace weak 'result is not None' check with comprehensive field validation for tui_events and tui_output in the A2A adapter response result. Addresses reviewer feedback from PR #10793: step_verify_response_status was only checking result presence, not actual response content. ISSUES CLOSED: #10793 --- features/steps/tui_materializer_a2a_integration_steps.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/features/steps/tui_materializer_a2a_integration_steps.py b/features/steps/tui_materializer_a2a_integration_steps.py index df8cc156e..6fa536a83 100644 --- a/features/steps/tui_materializer_a2a_integration_steps.py +++ b/features/steps/tui_materializer_a2a_integration_steps.py @@ -447,4 +447,9 @@ def step_get_adapter_response(context: Any) -> None: @then("the response status should be set correctly") def step_verify_response_status(context: Any) -> None: """Verify the response status is set correctly.""" - assert context.adapter_response.result is not None + result = context.adapter_response.result + assert result is not None, "Response result must not be None" + assert "tui_events" in result, "result must contain tui_events" + assert "tui_output" in result, "result must contain tui_output" + assert isinstance(result["tui_events"], list), "tui_events must be a list" + assert isinstance(result["tui_output"], str), "tui_output must be a string"