Describe the Bug
The PR backfill pipeline (pr-backfill → upsertReviews) flips pull_requests.mentor_verified to true for any substantive review from a higher-level reviewer — including changes_requested reviews (even with an empty body) and commented reviews with a body of 20+ characters. The live webhook path (process-review-event) only sets mentor_verified: true when the review state is exactly approved. As a result, PRs that a mentor actually requested changes on are shown as "mentor verified" in the maintainer queue, analytics, and contributor reports.
Steps to Reproduce
- Install the app on a repo and run
pr-backfill (or trigger it from the maintainer "Refresh PRs" button).
- Have a PR in that repo whose highest-level reviewer left a
CHANGES_REQUESTED review (no body needed).
- Query
pull_requests for that PR.
- See
mentor_verified = true, even though the mentor never approved.
Expected Behavior
mentor_verified should only become true when the highest-level reviewer's review state is approved, matching the webhook handler (process-review-event.ts:265).
Screenshots (If applicable)
N/A
💻 Environment Details
- OS: N/A (server-side logic)
- Browser: N/A
- Version: main
Describe the Bug
The PR backfill pipeline (
pr-backfill→upsertReviews) flipspull_requests.mentor_verifiedtotruefor any substantive review from a higher-level reviewer — includingchanges_requestedreviews (even with an empty body) andcommentedreviews with a body of 20+ characters. The live webhook path (process-review-event) only setsmentor_verified: truewhen the review state is exactlyapproved. As a result, PRs that a mentor actually requested changes on are shown as "mentor verified" in the maintainer queue, analytics, and contributor reports.Steps to Reproduce
pr-backfill(or trigger it from the maintainer "Refresh PRs" button).CHANGES_REQUESTEDreview (no body needed).pull_requestsfor that PR.mentor_verified = true, even though the mentor never approved.Expected Behavior
mentor_verifiedshould only becometruewhen the highest-level reviewer's review state isapproved, matching the webhook handler (process-review-event.ts:265).Screenshots (If applicable)
N/A
💻 Environment Details