Watch
0
0
Fork
You've already forked hyperhive
0

the review classifier takes the merge base from the PR's commits, not the forge's stored merge_base

This commit is contained in:
atlas 2026-10-19 19:34:39 +02:00 • committed by mara
commit f0d93cd0fe
2 changed files with 77 additions and 19 deletions

View file

@ -308,11 +308,14 @@ merge base and at its head, with 25 lines of context around each change
rather than the 3 of the forge's `.diff`. An enclosing gate, such as a
`config = lib.mkIf …` or an option's `default`, is in view when it's within
25 lines of the change, so a move that restates it doesn't read as adding one.
A gate further away is still out of view. The
controller sends the forge's `.diff` instead when the PR changes more than
100 files, when the forge names no merge base, when reading a changed file
fails, or when the wide diff is over 256 KiB. The review then says so, with
the reason.
A gate further away is still out of view. At review time the controller takes
the merge base from the PR's commits: the one parent that isn't a PR commit.
A rebased or force-pushed PR therefore gets the diff against the base it sits on
now, not the base it started from. The controller sends the forge's `.diff`
instead when the PR changes more than 100 files, when the commits don't name
a single merge base (the head merges the base branch in), when reading a
changed file fails, or when the wide diff is over 256 KiB. The review then says
so, with the reason.
On the API key runtime the commits and diff are one content block of the user
message and the question another, with a cache breakpoint at the end of the