diff --git a/tests/tui_gateway/test_protocol.py b/tests/tui_gateway/test_protocol.py index 274ad8906be4..5aa7c7d8425a 100644 --- a/tests/tui_gateway/test_protocol.py +++ b/tests/tui_gateway/test_protocol.py @@ -346,7 +346,7 @@ def test_session_resume_returns_hydrated_messages(server, monkeypatch): def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): return [ {"role": "user", "content": "hello"}, {"role": "assistant", "content": "yo", "reasoning": "thoughts"}, @@ -406,7 +406,7 @@ def test_session_resume_defaults_to_deferred_build(server, monkeypatch): def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): return [ {"role": "user", "content": "hello"}, {"role": "assistant", "content": "yo"}, @@ -547,7 +547,7 @@ def test_session_resume_handles_multimodal_list_content(server, monkeypatch): def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): return [multimodal_user, text_only_assistant] monkeypatch.setattr(server, "_get_db", lambda: _DB()) @@ -597,7 +597,7 @@ def test_session_resume_lazy_registers_watch_session_without_agent(server, monke def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): return [ {"role": "user", "content": "delegated goal"}, ] @@ -670,7 +670,7 @@ def test_session_resume_lazy_reports_running_for_inflight_child(server, monkeypa def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): return [{"role": "user", "content": "delegated goal"}] monkeypatch.setattr(server, "_get_db", lambda: _DB()) @@ -721,7 +721,7 @@ def test_session_resume_lazy_tolerates_missing_row_for_active_child(server, monk def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): # No rows for an unwritten session. return [] @@ -818,7 +818,7 @@ def test_session_resume_reuses_existing_live_session(server, monkeypatch): def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): return [ {"role": "user", "content": "hello"}, {"role": "assistant", "content": "yo"}, @@ -1035,7 +1035,7 @@ def test_session_resume_live_payload_uses_current_history_with_ancestors(server, def reopen_session(self, _sid): return None - def get_messages_as_conversation(self, _sid, include_ancestors=False): + def get_messages_as_conversation(self, _sid, include_ancestors=False, repair_alternation=False): if include_ancestors: return ancestor_history + current_history return list(current_history)