Repository navigation
Replies: 1 comment
|
Thank you for distinguishing immutable PR-head snapshots from live worktrees and for including the storage figures. Base ownership, deletion records, and retention still need a maintainer design decision. I’ll follow up on that bounded use case; this is not approval of a storage change yet. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The situation. Comparing PRs in the graph means indexing each head as its own project. In our repo that is roughly 0.5 GB per head (about 185k nodes, 880k edges), so an agent that wants to look at twenty PRs adds ten gigabytes before it has said anything useful. Our cache reached 156 GB this way (details in #1431).
Why not the earlier worktree-overlay threads. #573 (closed as not planned, with a pointer to Discussions) and #351 were about a living worktree: files change under the index, which is where most of the hard questions live (tombstones, watchers, which checkout answers a query). A PR head is a different animal. It is an immutable commit with a known merge-base, so there is nothing to watch and nothing to keep fresh.
Proposal. Index a ref as an overlay on an existing base project:
{ "repo_path": "/path/to/repo", "ref": "refs/pull/123/head", "base_project": "repo-main" }Store only the files that differ between the ref and the base project's commit, plus tombstones for deleted ones, and let
compare_graphsand anything built on it (#3165) read overlay plus base as one graph. Garbage-collect overlays with their base, or by age.Alternatives considered. A full project per ref plus a retention policy (#1431). That works and is the fallback, but every compare still pays a full index.
Related: #573, #351, #1431, #2925.
All reactions