Repository navigation
Conversation
… not found GitHub can keep no refs/pull/<number>/head for a pull request it otherwise serves. The detail and action-state reads compare against that ref, and the answer's lone NOT_FOUND on baseRef.compare was read as a missing pull request. Accept exactly that answer and keep its data, with the comparison unknown. A NOT_FOUND now means a missing resource only on a root field or repository.pullRequest, and GraphQL errors keep GitHub's message and path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused GitHub GraphQL error-handling fix that preserves existing pull-request data when only the synthetic head ref is missing, while retaining diagnostics for genuine failures. The production changes are narrowly scoped and covered by targeted regression tests. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Path-aware GraphQL error reporting packages/source-control-github/src/server/gitHubGraphQlClient.ts, packages/source-control-github/src/server/GitHubRequestPolicy.ts, packages/source-control-github/src/server/GitHubPullRequestApi.ts, packages/source-control-github/src/server/gitHubGraphQlClient.test.ts, packages/source-control-github/src/server/GitHubPullRequestApi.test.ts |
The GraphQL client classifies NOT_FOUND errors by path and includes paths in formatted error descriptions. GitHubApiNotFoundError accepts GitHub error messages. Tests cover path-based classification and error formatting. |
Missing-ref read recovery packages/source-control-github/src/server/GitHubPullRequestApi.ts, packages/source-control-github/src/server/GitHubPullRequestApi.test.ts |
Pull-request detail and action-state reads decode response data when the base-ref comparison is missing. The reviewer-refusal fallback accepts that error. Tests cover detail reads, retries, merge and update-branch actions, and errors that remain failures. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge, maria-rcks, t3dotgg
Merge Risk: 
Minimal · up to 8d04b
-
Pull requests with a missing comparison can remain visible while update-branch stays unavailable. No merge-blocking risk was established.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description covers the problem, reproduction, implementation, scope rationale, verification results, and unverified scenarios. It omits the exact “Scope and approval” heading, but it explains why the focused bug fix does not require a prior issue or approval.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 2
- Charged: $0.50
- View usage details
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
|
Note Written by Verified in a real dev environmentpartial verification at exact head
short runtime transcript captured from the actual client websocket: blacksmith passed 124 focused tests in this clip shows the normal path, not missing-ref recovery. uploaded playback and seeking were checked. matching neighboring case on main and the pr: a genuinely nonexistent pr stays not found. Not verifiedthe central missing-head-ref recovery remains unverified against live github. the report anonymizes its affected private repository and pr. https://git.cafe/pingdotgg/t3code/pulls/25947 itself has a working also unverified: watch recovery for that missing-ref case, the combined refused-reviewer retry, merge/update-branch mutations, github enterprise, native desktop/mobile, windows/macOS, and remote/relay/tunnel connections. no merge or update-branch mutation was attempted. no labels, branches, or other prs were changed. this is not a full verification sign-off. completing it requires access to an affected real pr. the only published change is this verification comment. |
|
Note Written by merged current blacksmith live recovery against a genuinely missing github pull ref remains unverified, as recorded in the existing verification comment. no new ui behavior was introduced by this merge resolution. |
# Conflicts: # packages/source-control-github/src/server/gitHubGraphQlClient.ts




Problem
Some open pull requests lack
refs/pull/<number>/headeven though GitHub returns their data. The detail and action-state queries compare the base branch against that ref, so GitHub answers with the full pull request plus oneNOT_FOUNDonrepository.pullRequest.baseRef.compare. The GraphQL client read any all-NOT_FOUNDanswer as a missing resource. The panel showed "Pull request #N not found", merge and update-branch failed the same way, and the watch gave up after eight failed reads. The log said only "GitHub could not find the requested resource".Change
isNotFoundOnlycounts aNOT_FOUNDas a missing resource only without a path, on a root field (with its list items), or onrepository.pullRequest. A deeper one, like this comparison, is a response error.githubErrors, now onGitHubApiNotFoundErrortoo, so a failure like this one names its cause in the log.The last two changes belong to the same defect: they are why a failed comparison was reported, and logged, as a missing pull request.
This is a small fix for an obvious bug, sent without an issue: an existing pull request is reported missing, and the change stays inside GitHub GraphQL error handling.
Reproduction
The affected repository is private, so names and numbers are replaced.
Nis the affected pull request,Man open neighbour that has both refs.Verification
Linux, Node 24, from
packages/source-control-github. Using theghcredential,GitHubPullRequestProvider.getChangeRequestreturned:vp test run src/server/GitHubPullRequestApi.test.ts src/server/gitHubGraphQlClient.test.tspasses 124 tests. Reverting the three production files tomainmakes 10 of them fail.vp run check:changedpasses.Not verified: the panel and the watch in a running app, merge and update-branch against the real pull request (tests only), and GitHub Enterprise.
Models: Claude Opus 5.5 (implementation), GPT-6.1-Sol (independent review). Harness: Claude Code through T3 Code.
🤖 Generated with Claude Code