Repository navigation
perf(github): reuse repository merge metadata reads - #34848
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
11a57ab7-91f5-4fed-9033-3055137353dd
Files selected for processing: 3-
src/main/github/client/detect/repository-merge-metadata-cache.tssrc/main/github/client/detect/repository-merge-metadata.tssrc/main/github/repository-merge-metadata-reuse.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
ELI5
PR details and sidebar refreshes can ask GitHub the same repository capability questions twice. They now share the existing cached result, and overlapping requests join the first request immediately.
What Changed
GH_CONFIG_DIR,XDG_CONFIG_HOME, or the platform default) retain their directory identity; absolute configuration directories preserve reuse. Cold probes also retain their directory-sensitive execution identity. Represent a repository-wide query separately from a real branch named__repo__.Why
An overlapping ten-reader workload with matching execution and cancellation scope previously launched ten identical GraphQL requests; it now launches one, with one quota debit. A production-caller test also proves PR details followed by a sidebar refresh use one capability request instead of two. No timers, new waiting interval, refresh changes or longer cache TTLs are introduced.
Linked Issue
Follow-up to #28778. Independent of #34842 and the earlier quota-saving PRs.
Visual Proof
N/A — main-process request reuse, with no UI contract change.
Testing
pnpm check:changed --maxWorkers=2was run; its duplicate broad affected-test phase was stopped after exact-head CI passed. This is not a full local gate pass.59fb79f5c50, including all five unit shards, static analysis/typechecks, relay integration, packaging and the aggregate PR gate.Notes
A failed or missing-repository probe cannot replace a concurrently published success or prevent an older surviving success from publishing. Only authoritative successful reads advance publication order. Missing home/config roots retain cwd identity, as relative roots do. Existing TTLs are unchanged.
No UI, RPC or persisted-data changes. Folder workspaces and git worktrees use the same repository resolution. Credential environment values are hashed in memory rather than included in plaintext keys or logs.