From aabe9b42a25ec07c93c95aef4357b4d5fb08ea73 Mon Sep 17 00:00:00 2001 From: anadoris007 Date: Wed, 22 Apr 2026 14:55:28 +0530 Subject: [PATCH] =?UTF-8?q?test(narrative):=20fix=20dead-filter=20e2e=20te?= =?UTF-8?q?st=20=E2=80=94=20need=20living=20actor=20in=20round=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Marcus (the only round-2 actor) was killed, generate_prose short-circuited on empty actions without calling the LLM, so mock_llm.call_args_list only had one entry. Added Elena as a second round-2 actor to exercise the filter with a live participant. --- backend/tests/test_narrative_e2e.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/tests/test_narrative_e2e.py b/backend/tests/test_narrative_e2e.py index e637f2ff..71583c9d 100644 --- a/backend/tests/test_narrative_e2e.py +++ b/backend/tests/test_narrative_e2e.py @@ -125,6 +125,10 @@ def test_killed_character_filtered_from_next_round(tmp_path): {"round": 1, "agent_id": 2, "agent_name": "Marcus", "action_type": "DISLIKE_POST", "action_args": {}, "success": True, "timestamp": "t"}, {"event_type": "round_end", "round": 1, "timestamp": "t"}, + # Round 2: Elena (alive) and Marcus (will be killed) both act — filter + # should keep Elena and drop Marcus + {"round": 2, "agent_id": 1, "agent_name": "Elena", "action_type": "QUOTE_POST", + "action_args": {}, "success": True, "timestamp": "t"}, {"round": 2, "agent_id": 2, "agent_name": "Marcus", "action_type": "REPOST", "action_args": {}, "success": True, "timestamp": "t"}, {"event_type": "round_end", "round": 2, "timestamp": "t"},