Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized server bug fix that honors an explicitly configured GitHub CLI remote while preserving the existing fallback behavior. The new subprocess lookup and remote-selection behavior are covered by focused tests, with no schema, deployment, security, billing, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughRepository identity resolution now reads GitHub CLI’s ChangesRemote preference resolution
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant RepositoryIdentityResolver
participant Git
participant pickPrimaryRemote
par Query remote URLs
RepositoryIdentityResolver->>Git: Run git remote -v
and Query resolved remote preference
RepositoryIdentityResolver->>Git: Read remote.*.gh-resolved
end
Git-->>RepositoryIdentityResolver: Return query results
RepositoryIdentityResolver->>pickPrimaryRemote: Pass remotes and parsed preference
pickPrimaryRemote-->>RepositoryIdentityResolver: Return selected primary remote
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete issue has been established that would prevent merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new selection is limited to a configured Git remote and its host. Invalid preferences retain the existing fallback, and no new credential or provider access path was identified. The trust model for local Git configuration and the authorization behavior of downstream providers remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
A fork with both `origin` and `upstream` resolved its repository identity to `upstream`, so PR lookups and "View PR" pointed at the upstream repo. When `gh repo set-default` has marked a remote (`remote.<name>.gh-resolved base`), use that remote before falling back to upstream, origin, then alphabetical. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`gh repo set-default` stores OWNER/REPO instead of `base` when the chosen parent repository has no remote. Resolve it on the marked remote's host. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
737db75 to
bcf9123
Compare
What Changed
RepositoryIdentityResolvernow checks for a remote marked bygh repo set-defaultand prefers it.ghstoresremote.<name>.gh-resolvedasbasefor that remote's own repo, or asOWNER/REPOwhen the chosen parent repo has no remote. The second case resolves to that repo on the marked remote's host, the same wayghdoes. Only after that does it fall back to the existing order:upstream, thenorigin, then the first remote alphabetically. Resolving an identity reads that config with onegit config --get-regexpcall, which runs in parallel withgit remote -v. It only runs on a cache miss.Why
In a fork with both
origin(the fork) andupstreamremotes, the project's repository identity always resolved toupstream. That identity also drives PR detection, lookup and linking, so a fork's PRs were looked up against the upstream repo and "View PR" opened the wrong one.ghusers already record which repo PRs belong to withgh repo set-default, so honoring it fixes forks without adding a setting. Repos where no default is set behave exactly as before.Checklist
Model: Claude Opus 5.5 (1M context), running in Claude Code inside T3 Code.
🤖 Generated with Claude Code
Summary by CodeRabbit
Fixes #15023