Repository navigation
Description
What happened
Generating a review guide for a pull request fails in a multi-repository project with:
Guides are written from this project's checkout, and this pull request is in another repository. Write it from a project that is a checkout of that repository.
"Guides are not working in multirepository project."
Diagnosis
PullRequestReviewGuideService.requireOwnRepository (apps/server/src/pullRequest/PullRequestReviewGuideService.ts) accepts a pull request only when its host/repository matches ownPullRequestRepositories(project.repositoryIdentity). That is the project root's primary repository, plus the origin fork added in #39601. The project's tracked folders (tracked_folders_json: repositories discovered inside the project or added to it) are never considered. So a pull request in any tracked repository other than the root's is rejected before generation starts. checkoutHead also fetches only from workspaceRoot, so supporting tracked repositories would mean resolving the matching tracked folder and running the fetch/diff there.
The affected project has a git repository at its root (repo A) and two tracked folders outside the root: one checkout of repo A and one of a different repo B on the same GitHub host. Pull requests on repo B open in the project, but their guides always fail. The check is unchanged on main (last change: d984b71, #39601).
Steps to reproduce
- Create a project whose folder is a git checkout of repository A.
- Track a second folder in the project that is a git checkout of repository B (same host).
- Open a pull request from repository B in that project and choose to generate its review guide.
- Generation fails immediately (~6 ms) with the error above.
The exact pull request was not recorded; the trace span has no repository attribute.
Version
0.1.12-nightly.20261121.5038 (Desktop and local server)
Environment
macOS 27.2 (darwin arm64), Node v24.22.1, T3 Code Desktop nightly against its local server
Evidence
server.trace.ndjson, span pullRequests.generateReviewGuide (client surface: desktop, 0.1.12-nightly.20261121.5038), durationMs 5.9:
exception.type: PullRequestOperationError
exception.message: Pull request operation generateReviewGuide failed: Guides are written from this project's checkout, and this pull request is in another repository. Write it from a project that is a checkout of that repository.Related issues
None found. #39601 added fork repositories to the accepted set but not tracked folders. #30329 is a different cross-project limitation (delegate_task).
Fix applied or workaround
Nothing changed on the machine. Workaround: add the tracked repository's folder as its own project and write the guide from there.
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity
fix(server): write_pull_request_guides falls back to the caller's pro…