Skip to content

fix(review): a failed base-file read counts as an absent file, and an empty pull request diff raises is no diff #1907

Closed

Description

@dan-petty

Problem

Two reads of pull request data in the review path fail without a clear error.

  1. The helpers _write_base_revision_files, _write_base_revision_lockfiles and _evaluate_session_complexity_deltas read a base file that failed to load as an absent file. A review then runs with a missing baseline and does not say so.
  2. get_pr_diff raises GitHubUnreadError with the text is no diff: NoneType when a pull request has an empty diff body.

Evidence

Remedy

Decide the behaviour first: a failed base read gives the review an explicit coverage gap with a reason, and a diff with no changes gives an empty result and not an error. Change the helpers and the stage handlers in one pull request, with tests on the github_api fake. Replace the copy in commands/pr.py with GitHubClient.get_pull_files. Do not add a broad except to hide the error.

Activity

  1. added
    source/agent
    type/bug
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate describes fixes for specific error conditions in the review path and pull request handling, which are bug fixes.
    • Priority: P2-Medium. The issue affects core functionality of pull request reviews and handling, but does not block critical workflows or introduce security concerns.
    • Value: Medium. Fixes improve reliability of review processes and error handling for edge cases like empty diffs and failed base reads.
    • Effort: Medium. Requires changes to multiple helpers, stage handlers, and tests across the codebase, involving coordination between several components.
  3. added a commit that references this issue on Oct 26, 2026
    8cef06f
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

    source/agenttype/bug

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions