Skip to content

Bug: bare except:pass in _publish_inline_comments_fallback_with_verification silently drops review comments #2261

@karesansui-u

Description

@karesansui-u

Bug description

In github_provider.py L476-479, _publish_inline_comments_fallback_with_verification() uses except: pass when publishing verified review comments via pr.create_review():

if verified_comments:
    try:
        self.pr.create_review(commit=self.last_commit_id, comments=verified_comments)
    except:
        pass  # ← all exceptions silently swallowed

When this fails (GitHub API rate limit, network error, permission issue), the exception is swallowed. The caller publish_code_suggestions() believes the operation succeeded and returns True. The one-by-one retry path in pr_code_suggestions.py is never activated:

is_successful = self.git_provider.publish_code_suggestions(code_suggestions)
if not is_successful:
    # retry one by one ← never reached because publish returns True

Impact

  • Review comments are silently lost with no error message to the user
  • The retry mechanism specifically designed for this failure mode is bypassed
  • This is particularly impactful because this is a PR review tool — its primary output (review comments) can disappear without any indication

Trigger conditions

Any GitHub API error during create_review:

  • Rate limiting (HTTP 403)
  • Network timeout
  • Token permission issues
  • GitHub server errors (HTTP 5xx)

Fix

PR #2258 — replace except: pass with except Exception as e: that logs and re-raises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions