From f25160ad9446b5cf15d481221ec24e3dbf329221 Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 20 Nov 2025 19:12:21 +0000 Subject: [PATCH] Update test to use SetTitleCallbackProcessor instead of GithubV1CallbackProcessor - Replace GithubV1CallbackProcessor with SetTitleCallbackProcessor in tests - Remove unused github_v1_callback_processor.py file - SetTitleCallbackProcessor is more appropriate for unit testing as it's part of the core codebase - Tests still verify the same concurrency fix behavior --- .../github_v1_callback_processor.py | 36 ------------------- .../test_live_status_concurrency.py | 9 ++--- 2 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 openhands/app_server/event_callback/github_v1_callback_processor.py diff --git a/openhands/app_server/event_callback/github_v1_callback_processor.py b/openhands/app_server/event_callback/github_v1_callback_processor.py deleted file mode 100644 index 09673c4cee..0000000000 --- a/openhands/app_server/event_callback/github_v1_callback_processor.py +++ /dev/null @@ -1,36 +0,0 @@ -import logging -from uuid import UUID - -from openhands.app_server.event_callback.event_callback_models import ( - EventCallback, - EventCallbackProcessor, -) -from openhands.app_server.event_callback.event_callback_result_models import ( - EventCallbackResult, - EventCallbackResultStatus, -) -from openhands.sdk import Event - -_logger = logging.getLogger(__name__) - - -class GithubV1CallbackProcessor(EventCallbackProcessor): - """Callback processor for GitHub V1 integrations.""" - - async def __call__( - self, - conversation_id: UUID, - callback: EventCallback, - event: Event, - ) -> EventCallbackResult | None: - """Process events for GitHub V1 integration.""" - _logger.info(f'GitHub V1 Callback {callback.id} invoked for event {event}') - - # TODO: Implement GitHub integration logic here - # For now, just return success - return EventCallbackResult( - status=EventCallbackResultStatus.SUCCESS, - event_callback_id=callback.id, - event_id=event.id, - conversation_id=conversation_id, - ) diff --git a/tests/unit/app_server/test_live_status_concurrency.py b/tests/unit/app_server/test_live_status_concurrency.py index 6cf979eed1..f96eb9074b 100644 --- a/tests/unit/app_server/test_live_status_concurrency.py +++ b/tests/unit/app_server/test_live_status_concurrency.py @@ -11,9 +11,6 @@ from openhands.app_server.app_conversation.live_status_app_conversation_service LiveStatusAppConversationService, ) from openhands.app_server.event_callback.event_callback_models import EventCallback -from openhands.app_server.event_callback.github_v1_callback_processor import ( - GithubV1CallbackProcessor, -) from openhands.app_server.event_callback.set_title_callback_processor import ( SetTitleCallbackProcessor, ) @@ -66,9 +63,9 @@ class TestLiveStatusConcurrency: access_token_hard_timeout=None, ) - # Create test processors (similar to what would be used in GitHub integration) + # Create test processors (multiple processors to test concurrency) processors = [ - GithubV1CallbackProcessor(), + SetTitleCallbackProcessor(), SetTitleCallbackProcessor(), ] @@ -126,7 +123,7 @@ class TestLiveStatusConcurrency: # Create test processors processors = [ - GithubV1CallbackProcessor(), + SetTitleCallbackProcessor(), SetTitleCallbackProcessor(), ]