Repository navigation
Description
Problem
The consult --type impl diff appears to use two-dot <base>..HEAD semantics when computing the PR's changeset for the reviewing model. Two-dot diffs include every commit reachable from HEAD that is not reachable from <base>. When the branch is behind on rebases (i.e., HEAD's merge-base with <base> is older than <base>'s current tip), this over-includes files from <base>-only commits that the PR itself did not touch.
Three-dot <base>...HEAD (symmetric difference, anchored at the merge-base) is the standard PR-style diff semantics and produces the correct changeset for review purposes.
Observed
On a PR with base <integration-branch>, codex returned REQUEST_CHANGES citing "major scope creep" — listing several files the PR never touched. Verification:
gh pr diff <N> --name-only(authoritative three-dot semantics): the PR's actual file list, matching the approved plan.- The codex-flagged "scope-creep" files: present on
<integration-branch>but not included ingh pr diff's output. They were all introduced by separate, already-merged commits on the integration branch that the under-review branch was created off of (i.e., the branch's merge-base with the integration branch predated their inclusion).
So consult's review-input clearly contained the two-dot diff (which over-includes those <integration-branch>-only commits), not the three-dot diff (which would exclude them by anchoring at the merge-base).
Impact
- Phantom "scope creep" verdicts on every PR whose branch is behind on rebases — increasingly likely the longer a branch lives without being rebased onto the integration tip.
- Symptom is identical to sibling consult --type {spec,plan,impl} resolves artifact from invoking workspace (not the builder's branch); impl-review diff base hardcoded to main #777's hardcoded-
maindefect, but the mechanism is distinct: consult --type {spec,plan,impl} resolves artifact from invoking workspace (not the builder's branch); impl-review diff base hardcoded to main #777 is wrong base branch; this is wrong diff operator. Either defect alone produces the same end-state of consult reviewing more than the PR's actual changeset. Together they compound — the wrong base picks an over-inclusive starting point, then the wrong operator widens it further.
Related
- Sibling: consult --type {spec,plan,impl} resolves artifact from invoking workspace (not the builder's branch); impl-review diff base hardcoded to main #777 (consult resolves artifact from invoking workspace + hardcodes
mainas diff base). Same component (consult), same defect family (consult sees a polluted changeset), distinct mechanism (operator semantics vs branch resolution).
Activity
amrmelsayed commentedon May 20, 2026
Sibling: #777 (consult workspace-rooted artifact resolution + hardcoded
mainbase). #777 covers wrong-base mechanisms in consult diff resolution; this issue covers the wrong-operator mechanism. Same component, same defect family, compound when both fire.docs(consult-types/pr-review): add reviewer-scope rule against flaggi…
feat(lib): add resolveDefaultBranch helper
[Bugfix cluesmith#777][Bugfix cluesmith#784] fix(consult): resolve de…
test(consult): cover non-main default branch, three-dot scope, and re…
[Bugfix cluesmith#777][Bugfix cluesmith#784] fix(protocols): anchor d…
test(protocols): add regression-guard audit for cluesmith#777 / clues…