Skip to content

fix: per-PR error handling in review_pr_descriptions#170

Merged
ichoosetoaccept merged 1 commit intomainfrom
02-17-fix-per-pr-error-handling-in-review_pr_descriptions
Feb 17, 2026
Merged

fix: per-PR error handling in review_pr_descriptions#170
ichoosetoaccept merged 1 commit intomainfrom
02-17-fix-per-pr-error-handling-in-review_pr_descriptions

Conversation

@ichoosetoaccept
Copy link
Member

@ichoosetoaccept ichoosetoaccept commented Feb 17, 2026

Wrap the per-PR _fetch_pr_info call in review_pr_descriptions with a try/except so that one failing PR doesn't break the entire batch.

Failed PRs get a PRDescriptionInfo with an error field describing the failure, while successful PRs are analyzed normally.

Changes

  • PRDescriptionInfo: added optional error field
  • review_pr_descriptions: wrapped _fetch_pr_info in try/except per iteration
  • Test: verifies mixed success/failure batch returns all 3 results with correct error on the failing PR

Fixes #79

@greptile-apps
Copy link

greptile-apps bot commented Feb 17, 2026

Greptile Summary

Added per-PR error handling to review_pr_descriptions so a single failing PR doesn't abort the entire batch operation.

  • Added optional error field to PRDescriptionInfo model
  • Wrapped _fetch_pr_info call in try/except block within the loop
  • Failed PRs now return a PRDescriptionInfo with pr_number, empty title, and descriptive error message
  • Successful PRs continue to be analyzed normally
  • Added comprehensive test verifying that a 3-PR batch with one failure returns all 3 results with correct error propagation

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is well-contained, follows best practices for error handling, and includes comprehensive test coverage. The implementation correctly prevents cascade failures while preserving all successful results.
  • No files require special attention

Important Files Changed

Filename Overview
src/codereviewbuddy/models.py Added optional error field to PRDescriptionInfo model for handling fetch failures
src/codereviewbuddy/tools/descriptions.py Wrapped per-PR fetch in try/except to prevent batch failure, creates error PRDescriptionInfo on exceptions
tests/test_descriptions.py Added comprehensive test verifying mixed success/failure batch handling with proper error propagation

Last reviewed commit: 6b7ace4

@ichoosetoaccept ichoosetoaccept force-pushed the 02-17-fix-per-pr-error-handling-in-review_pr_descriptions branch from 6b87f2e to be51d91 Compare February 17, 2026 10:10
Copy link
Member Author

ichoosetoaccept commented Feb 17, 2026

Merge activity

  • Feb 17, 11:17 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 17, 11:20 AM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 17, 11:21 AM UTC: @ichoosetoaccept merged this pull request with Graphite.

@ichoosetoaccept ichoosetoaccept changed the base branch from 02-17-feat-support-dismissing-pr-level-reviews-in-resolve_comment to graphite-base/170 February 17, 2026 11:18
@ichoosetoaccept ichoosetoaccept changed the base branch from graphite-base/170 to main February 17, 2026 11:19
@ichoosetoaccept ichoosetoaccept force-pushed the 02-17-fix-per-pr-error-handling-in-review_pr_descriptions branch from be51d91 to 6b7ace4 Compare February 17, 2026 11:20
@ichoosetoaccept ichoosetoaccept merged commit 07dba0c into main Feb 17, 2026
7 checks passed
@ichoosetoaccept ichoosetoaccept deleted the 02-17-fix-per-pr-error-handling-in-review_pr_descriptions branch February 17, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add per-PR error handling in review_pr_descriptions batch operation

1 participant