Skip to content

refactor: remove requestBotReview — GitHub silently drops bot reviewer requests#23

Merged
aliasunder merged 1 commit into
mainfrom
worktree-remove-bot-review-request
Jul 17, 2026
Merged

refactor: remove requestBotReview — GitHub silently drops bot reviewer requests#23
aliasunder merged 1 commit into
mainfrom
worktree-remove-bot-review-request

Conversation

@aliasunder

@aliasunder aliasunder commented Jul 17, 2026

Copy link
Copy Markdown
Owner

What

Removes requestBotReview (Step 3.5), its GraphQL requestReviews/botIds plumbing, botNodeIdSchema, the users.getByUsername surface on OctokitLike, and PrContext.nodeId (its only consumer).

Why

Live-probed on a throwaway PR (#22): the mutation returns success but never lands a request for third-party app bots — no pending review request, no timeline event — whether called with the app installation token or an admin user token. GitHub reserves requested-reviewer state for users, teams, and its own Copilot bot; ineligible reviewers are silently dropped. CodeRabbit/Sourcery never hold this state either — their sidebar presence comes from posted reviews, which umm-actually already has.

So this was two network calls per run plus a requested bot review success log that misled every investigation of the feature.

Coverage moves

  • [bot][bot] double-suffix regression guard → fetchBotIssueComments suite (the bug's actual blast radius)
  • viewer-query memoization → fetchBotIssueComments + upsertSummaryComment

311 tests, lint/build/prettier clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes
    • Pull request processing no longer requests automated bot reviews.
    • Simplified pull request event data by removing unused review metadata.
    • Improved bot comment detection to avoid duplicate [bot] suffixes.
    • Streamlined bot identity lookup while preserving cached results.
  • Bug Fixes
    • Fixed cases where bot comments could not be matched due to duplicated login suffixes.

…r requests

Live-probed on a throwaway PR: the requestReviews GraphQL mutation
returns success but never lands a request for third-party app bots
(no pending request, no timeline event) — with the app token or an
admin user token alike. Requested-reviewer state is reserved for
users, teams, and GitHub-native bots (Copilot), so this was two
network calls per run plus a misleading success log.

PrContext.nodeId and the OctokitLike users.getByUsername surface go
with it — requestBotReview was their only consumer. The [bot][bot]
double-suffix regression coverage moves to the fetchBotIssueComments
suite; viewer-memoization coverage now spans fetchBotIssueComments +
upsertSummaryComment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@umm-actually

umm-actually Bot commented Jul 17, 2026

Copy link
Copy Markdown

umm-actually reviewed at 461b082

No findings above threshold.


umm-actually · deepseek/deepseek-v4-pro

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ec7f6743-dd8b-4988-a2e5-bf1d550ce24f

📥 Commits

Reviewing files that changed from the base of the PR and between ff22f36 and 461b082.

📒 Files selected for processing (7)
  • src/__tests__/orchestrate.test.ts
  • src/github/__tests__/client.test.ts
  • src/github/__tests__/event.test.ts
  • src/github/client.ts
  • src/github/event.ts
  • src/orchestrate.ts
  • src/review/__tests__/prompt.test.ts
💤 Files with no reviewable changes (6)
  • src/review/tests/prompt.test.ts
  • src/orchestrate.ts
  • src/github/tests/event.test.ts
  • src/github/event.ts
  • src/tests/orchestrate.test.ts
  • src/github/client.ts

📝 Walkthrough

Walkthrough

The PR removes bot review requests and PR node identity from GitHub client and event context contracts. It updates orchestration and client test doubles, adjusts affected expectations, and adds coverage for bot-login suffix handling and viewer-query memoization.

Changes

GitHub review flow

Layer / File(s) Summary
Simplify PR context contract
src/github/event.ts, src/github/client.ts, src/github/__tests__/event.test.ts, src/github/__tests__/client.test.ts, src/__tests__/orchestrate.test.ts, src/review/__tests__/prompt.test.ts
PrContext and pull-request mappings no longer include nodeId; related fixtures and event/client expectations are updated.
Remove bot review client path
src/github/client.ts, src/github/__tests__/client.test.ts
The client removes bot review requests and REST bot-user lookup, while bot comment handling uses memoized viewer login resolution and avoids duplicate [bot] suffixes.
Stop requesting bot reviews in orchestration
src/orchestrate.ts, src/__tests__/orchestrate.test.ts
Orchestration no longer calls requestBotReview; its mock implementation, call tracking, and dedicated tests are removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: removing requestBotReview because GitHub silently drops bot reviewer requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-remove-bot-review-request

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aliasunder
aliasunder merged commit 6e177dc into main Jul 17, 2026
9 checks passed
@aliasunder
aliasunder deleted the worktree-remove-bot-review-request branch July 17, 2026 18:10
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.

1 participant