fix: propagate exception from verified inline comment publishing#2258
fix: propagate exception from verified inline comment publishing#2258karesansui-u wants to merge 2 commits intoqodo-ai:mainfrom
Conversation
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.
Review Summary by QodoPropagate exception from verified inline comment publishing
WalkthroughsDescription• Replace bare except: pass with proper exception handling • Log error details when verified inline comments fail to publish • Re-raise exception to allow caller to detect failure and retry • Enables one-by-one retry mechanism in publish_code_suggestions() Diagramflowchart LR
A["publish_code_suggestions()"] -->|calls| B["_publish_inline_comments_fallback_with_verification()"]
B -->|previously| C["except: pass<br/>silently fails"]
C -->|result| D["Returns True<br/>no retry"]
B -->|now| E["except Exception<br/>log and raise"]
E -->|result| F["Propagates error<br/>enables retry"]
File Changes1. pr_agent/git_providers/github_provider.py
|
Code Review by Qodo
1.
|
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.
|
Updated: removed the duplicate error log. The caller already logs the exception, so this just re-raises to propagate the failure. Keeps it consistent with the file's convention. |
|
Persistent review updated to latest commit c534e99 |
Bug description
In
github_provider.py,_publish_inline_comments_fallback_with_verification()has a bareexcept: passthat silently swallows all exceptions when publishing verified review comments:The caller
publish_code_suggestions()believes the operation succeeded and returnsTrue. The one-by-one retry path inpr_code_suggestions.pynever activates:Impact
When the GitHub API returns an error (rate limit, network failure, permission error), review comments are silently dropped. The user sees no output and no error. The retry mechanism designed to handle partial failures is completely bypassed.
Fix
Replace
except: passwithexcept Exception as e:that logs the error and re-raises, allowing the caller to detect the failure and retry.Affected files
pr_agent/git_providers/github_provider.py(L478-479) — 2 line change