Skip to content

A linked repo's truncated patch can still reach a verdict unread #602

Description

@eyalgolan

Problem

#437 closed the case where a cut changed-file patch in the PRIMARY diff could reach a PASS unseen: budget_diff names the cut paths, InspectionTracker requires each to be referenced, and reviewer.py:3317-3319 turns a miss into a no-verdict instead of a decision.

A linked repo's cut paths are not covered by any of that.

review/reviewer.py:635, in _linked_repos_review_section:

diff, total, _cut_paths = _git_diff(lpath, lbefore, "HEAD")

The third value is bound to _cut_paths and never used. The only producer of required_inspections is reviewer.py:2797, which passes the PRIMARY diff's cut_paths alone. So a linked repo whose patch is truncated has no path recorded as required, and the reviewer can reach a verdict without the cut file ever coming up — exactly the failure #437 describes, in a narrower place.

This is recorded as a known scope limit in InspectionTracker's own docstring (review/diff_coverage.py), which says widening the check "belongs with whoever gives linked repos coverage that matters". Filing it so that is tracked rather than living only in a docstring.

Acceptance criteria

  • A review whose LINKED repo diff is truncated records that repo's cut paths as required inspections, and a verdict reached without referencing them is rejected the same way the primary diff's are. A test fails on main.
  • The rejection message distinguishes a linked repo's path from the primary repo's, so the reason names which repo was not read.
  • A review with no linked repos, and one whose linked-repo diff is not truncated, behave exactly as they do today.
  • The primary diff's existing coverage behaviour is unchanged, pinned by the tests already covering it.

Reported by @EllaSharakanski as part of #437; split out because #437's own criteria are met on main.

Activity

  1. added a commit that references this issue on Oct 5, 2026
    fb5b1ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions