Skip to content

fix(pr-pipeline): compare contents before holding a no-patch rename or empty file #10873

Closed

Description

@kyle-sexton

Problem

The merge gate holds every changed file that has no patch and is not an image, font or PDF as unreviewed-patch:<path>, which needs a person (_size_reasons in plugins/source-control/skills/babysit-prs/scripts/babysit_risk.py, #10743). The hold exists for a script that git calls binary (a NUL byte), so no review reads its content.

It also holds changes that carry no unread content: a pure rename, an empty added file and a mode-only change. GitHub's pull-request files API reports these the same way as a binary file whose bytes changed: 0 additions, 0 deletions and no patch. The gate cannot tell them apart from that listing alone, so it holds all of them. The review threads on #10743 raised this, and the owner's session kept the hold until a content check exists.

Proposed fix

Compare contents before holding. For a file with no patch, read the base-side blob SHA (previous_filename at the base, from the git trees API or git diff --raw) and the head-side blob SHA, and the modes the gate already reads.

  • Same blob, same mode (a pure rename): the old MED no-patch:.
  • Empty blob (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391) added or removed: the old MED no-patch:.
  • Same blob, mode changed: keep a person hold on a mode that gains execute (100755), and MED otherwise.
  • Anything else, or a blob that cannot be read: keep unreviewed-patch:.

Acceptance criteria

  • A git mv with no content change, and an added empty file, score MED no-patch: and no person hold.
  • A renamed file whose bytes changed, with no patch, still holds as unreviewed-patch:.
  • A chmod +x with no patch still holds for a person.
  • An unreadable blob or tree fails closed (unreviewed-patch:).

Refs: #10743

Activity

  1. added
    needs-triage
    on Oct 29, 2026
  2. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: the merge gate in babysit_risk.py holds every no-patch, non-media file as unreviewed-patch:. That includes pure renames, empty added files and mode-only changes, which carry no unread content. You propose comparing base and head blob SHAs and modes before holding. Pure renames and empty blobs would score MED no-patch:. A change that gains execute, a changed blob or an unreadable blob would still hold. The acceptance criteria are clear and check fail-closed behavior. Nothing is missing. No duplicates found among the open issues.

    Automated triage, applied by the lanes App.

  3. added and removed
    needs-triage
    on Oct 29, 2026
  4. added
    status: ready
    admission-deferred
    agent-ready
    needs-human
    and removed
    admission-deferred
    agent-ready
    on Oct 29, 2026
  5. melodic-automation-lanes commented on Oct 29, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped partway through this issue and needs a person.

    Why, in the run's own words:

    Depends on unmerged PR #10743: the unreviewed-patch:&lt;path&gt; hold this issue narrows does not exist on this base (abb359b). main's babysit_risk.py _size_reasons still rates every no-patch file as the mergeable MED no-patch: (plugins/source-control/skills/babysit-prs/scripts/babysit_risk.py:1154-1157), and a repository-wide search finds no unreviewed-patch anywhere. #10743 (feat(pr-pipeline): bind workflow-edit reviews to a run from main) is open and adds that hold, and its description lists this issue as the follow-up. Building the content comparison here would mean re-implementing #10743's hold on main and conflicting with it. Re-queue this issue after #10743 merges, or build it on #10743's branch.

    What the run says it did not do:

    • Every acceptance criterion (pure rename and empty file score MED no-patch:, changed-bytes rename and chmod +x still hold, unreadable blob fails closed): the hold they narrow lives only in unmerged PR #10743

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40844972200

    To retry, remove needs-human and add agent-ready again.

  6. added
    agent-ready
    and removed
    needs-human
    on Oct 29, 2026
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

    agent-readystatus: ready

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions