Repository navigation
Replies: 1 comment
|
Thank you for the detailed three-way comparison proposal and for separating its follow-ups. The identity issue in #2925 and the distinction between overlapping symbols and matching changes are useful prerequisites to keep explicit. I’ll follow up on the API and scope before asking for implementation. |
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. Two open PRs against one base, and the question every reviewer and merge queue asks: do these change the same things, and is it the same change? Today
compare_graphsanswers "base vs one target". The overlap of two PRs takes two calls plus an intersection on the client, over result sets capped at 512 KiB each. For a big PR the cap bites before the answer arrives. (It also needs #2925 fixed first, or the project name makes every node look different.)Proposal. A three-way comparison:
{ "base_project": "repo-main", "target_projects": ["pr-a", "pr-b"], "limit": 200 }Returns, for nodes and edges: changed by both, only by A, only by B. For each "both" identity, whether the content matches (signature, body hash, edge set). When every identity B changed is also changed by A, with matching content, report
subsumes: "a".Why that last bit matters. With a lot of agents opening a lot of PRs, a good share are re-runs, earlier attempts and snapshots of the same work. Spotting "B is already inside A" mechanically is the difference between triaging fifty PRs and triaging eight.
Alternatives considered. Doing the intersection client-side works for small deltas and falls over on large ones. Text diffing PRs against each other (what we do today with
git range-diff) is exact for commits but blind to renames, moved code and re-implementations of the same function.Follow-ups that build on this, filed separately so they can be judged on their own: overlay snapshots for PR heads, semantic matching of changed symbols, a merge-compatibility report, and a coverage mode.
All reactions