Repository navigation
Worktrees: related pull requests from evidence, never from names (#337, #338) - #381
Closed
raiseCatError wants to merge 1 commit into
Closed
raiseCatError wants to merge 1 commit into
raiseCatError wants to merge 1 commit into
Conversation
#337 with #338. The related-PR action was always "No pull request evidence yet". It is now available when the host passes its cached /github listing (no fetching in the manager), and `p` returns an openPullRequest intent. relatedPullRequests counts a PR only when its head branch, in the PR's own repository, is exactly the worktree's branch. A fork's PR with the same branch name, a PR whose head repository GitHub did not report, a detached worktree and partial branch names are not evidence. Whether the worktree is at the PR's head commit is reported separately. To tell fork PRs apart from summaries, the search query now asks for headRefOid and headRepository; PrSummary carries them (sanitized; a malformed commit id is dropped). Wiring the listing and the intent into TerminalApp is the remaining host step.
This was referenced Oct 11, 2026
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit of #337/#338 found the related-PR action permanently unavailable (
No pull request evidence yet). Based onrelease/v0.18.0; TerminalApp untouched.src/worktrees/relatedPr.ts: a PR is related only when its head branch in the PR's own repository equals the worktree's branch exactly. Fork PRs with the same branch name, PRs whose head repository GitHub did not report (fail closed), detached worktrees and partial names are not evidence.atHeadreports separately whether the worktree's HEAD is the PR's head commit (unknown stays unknown)./worktreescontroller:pullRequestsoption (the host's cached/githublisting; the manager never fetches),relatedPraction available only with evidence,p→openPullRequestintent.headRefOidandheadRepository { nameWithOwner }(sanitized; malformed SHAs dropped), so forks can be told apart without fetching details.Audit notes (no change needed): GitHub writes remain impossible (
executeRemoteWritealways throws; transport isquery-only GraphQL and GET-only REST) — the merge flow stays a preview, as #338 requires; worktree removal stays non-forced Git with exact review.Remaining host step: pass the listing to
/worktreesand open/githubonopenPullRequest. Tests:tests/worktreeRelatedPr.test.tsplus existing GitHub/worktree suites.