From e4d72533a89acada867d3a2b07d032320f6c963d Mon Sep 17 00:00:00 2001 From: karesansui Date: Mon, 16 Mar 2026 21:29:08 +0900 Subject: [PATCH 1/2] fix: propagate exception from verified inline comment publishing The bare except:pass in _publish_inline_comments_fallback_with_verification silently swallows all exceptions when publishing verified review comments. This causes publish_code_suggestions to believe the operation succeeded, preventing the one-by-one retry path from activating. Replace with Exception logging and re-raise so the caller can detect the failure and retry individual comments. --- pr_agent/git_providers/github_provider.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pr_agent/git_providers/github_provider.py b/pr_agent/git_providers/github_provider.py index fa52b7dc05..363936f8ec 100644 --- a/pr_agent/git_providers/github_provider.py +++ b/pr_agent/git_providers/github_provider.py @@ -475,8 +475,9 @@ def _publish_inline_comments_fallback_with_verification(self, comments: list[dic if verified_comments: try: self.pr.create_review(commit=self.last_commit_id, comments=verified_comments) - except: - pass + except Exception as e: + get_logger().error(f"Failed to publish verified inline comments: {e}") + raise # try to publish one by one the invalid comments as a one-line code comment if invalid_comments and get_settings().github.try_fix_invalid_inline_comments: From c534e9970fff3d2d88365de378e5c0d69ff405aa Mon Sep 17 00:00:00 2001 From: karesansui Date: Mon, 16 Mar 2026 21:40:30 +0900 Subject: [PATCH 2/2] fix: remove duplicate error log, let caller handle logging Address review feedback: the caller already logs the exception, so logging here causes duplicate entries. Just re-raise and let the upstream handler log with full context. --- pr_agent/git_providers/github_provider.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pr_agent/git_providers/github_provider.py b/pr_agent/git_providers/github_provider.py index 363936f8ec..3abadae9f3 100644 --- a/pr_agent/git_providers/github_provider.py +++ b/pr_agent/git_providers/github_provider.py @@ -475,8 +475,7 @@ def _publish_inline_comments_fallback_with_verification(self, comments: list[dic if verified_comments: try: self.pr.create_review(commit=self.last_commit_id, comments=verified_comments) - except Exception as e: - get_logger().error(f"Failed to publish verified inline comments: {e}") + except Exception: raise # try to publish one by one the invalid comments as a one-line code comment