From d64abd787571288b86c1986d6e327998361f1599 Mon Sep 17 00:00:00 2001 From: rnetser Date: Sun, 1 Mar 2026 15:49:51 +0200 Subject: [PATCH 1/2] fix: remove server URL from test oracle GitHub comment Keep detailed server URL and status code in logs for debugging, but use a generic message in the PR comment to avoid exposing internal infrastructure details. --- webhook_server/libs/test_oracle.py | 5 ++++- webhook_server/tests/test_test_oracle.py | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/webhook_server/libs/test_oracle.py b/webhook_server/libs/test_oracle.py index 23a8b9048..17d2265b3 100644 --- a/webhook_server/libs/test_oracle.py +++ b/webhook_server/libs/test_oracle.py @@ -58,7 +58,10 @@ async def call_test_oracle( msg = f"Test Oracle server at {server_url} is not responding{status_info}, skipping test analysis" github_webhook.logger.warning(f"{log_prefix} {msg}") try: - await asyncio.to_thread(pull_request.create_issue_comment, msg) + await asyncio.to_thread( + pull_request.create_issue_comment, + "Test Oracle server is not responding, skipping test analysis", + ) except Exception: github_webhook.logger.exception(f"{log_prefix} Failed to post health check comment") return diff --git a/webhook_server/tests/test_test_oracle.py b/webhook_server/tests/test_test_oracle.py index be1306685..884bdea2e 100644 --- a/webhook_server/tests/test_test_oracle.py +++ b/webhook_server/tests/test_test_oracle.py @@ -88,8 +88,7 @@ async def test_health_check_non_200_posts_comment(self, mock_github_webhook: Moc mock_to_thread.assert_called_once() call_args = mock_to_thread.call_args assert call_args[0][0] == mock_pull_request.create_issue_comment - assert "not responding" in call_args[0][1] - assert "(status 503)" in call_args[0][1] + assert call_args[0][1] == "Test Oracle server is not responding, skipping test analysis" @pytest.mark.asyncio async def test_successful_analyze_call(self, mock_github_webhook: Mock, mock_pull_request: Mock) -> None: From 4fedbee852aa1f9ce06493d119ff40e676127afc Mon Sep 17 00:00:00 2001 From: rnetser Date: Sun, 1 Mar 2026 16:03:09 +0200 Subject: [PATCH 2/2] fix: keep status code in test oracle GitHub comment Only the server URL is removed from the PR comment. The HTTP status code (e.g., "(status 503)") is still included to help users understand the failure mode. --- webhook_server/libs/test_oracle.py | 2 +- webhook_server/tests/test_test_oracle.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webhook_server/libs/test_oracle.py b/webhook_server/libs/test_oracle.py index 17d2265b3..a7d4729b2 100644 --- a/webhook_server/libs/test_oracle.py +++ b/webhook_server/libs/test_oracle.py @@ -60,7 +60,7 @@ async def call_test_oracle( try: await asyncio.to_thread( pull_request.create_issue_comment, - "Test Oracle server is not responding, skipping test analysis", + f"Test Oracle server is not responding{status_info}, skipping test analysis", ) except Exception: github_webhook.logger.exception(f"{log_prefix} Failed to post health check comment") diff --git a/webhook_server/tests/test_test_oracle.py b/webhook_server/tests/test_test_oracle.py index 884bdea2e..014863205 100644 --- a/webhook_server/tests/test_test_oracle.py +++ b/webhook_server/tests/test_test_oracle.py @@ -88,7 +88,7 @@ async def test_health_check_non_200_posts_comment(self, mock_github_webhook: Moc mock_to_thread.assert_called_once() call_args = mock_to_thread.call_args assert call_args[0][0] == mock_pull_request.create_issue_comment - assert call_args[0][1] == "Test Oracle server is not responding, skipping test analysis" + assert call_args[0][1] == "Test Oracle server is not responding (status 503), skipping test analysis" @pytest.mark.asyncio async def test_successful_analyze_call(self, mock_github_webhook: Mock, mock_pull_request: Mock) -> None: