Skip to content

feat(pr-pipeline): give each pr-review-main chunk a manifest of the whole diff #11177

Description

@kyle-sexton

Refs: #11160

Problem

pr-review-main reviews an oversize diff in up to 4 chunks (#11160), and each chunk's reviewer is told "the other chunks are not yours to judge". A change in one chunk that runs, loads or depends on a file in another chunk is judged without that file. Both main-run lanes and the security lane's inline thread on #11160 raised this, rated IMPORTANT. The owner's threat model (only our own actors; no person holds during the throughput phase) makes it a review-quality gap, not a hold to add.

Change

  • Give each chunk's prompt a path-only manifest of the whole diff: every changed path, its status (added, modified, renamed, deleted) and its chunk number.
  • Tell each reviewer to report any reference from its chunk to a path in another chunk as a finding naming both paths, so the summed verdict carries the cross-chunk dependency.
  • Leave the per-chunk byte cap and the 4-chunk limit as they are. The manifest is small, about one line per file.

Done when

  • write-diff/split-diff.py writes the manifest, and each chunk's prompt includes it (a CHUNK_NOTE extension).
  • A workflow test shows a 2-chunk diff whose chunk-1 prompt lists chunk 2's paths.
  • A one-chunk diff's prompt stays byte-for-byte the old single-pass prompt.

Metrics (§9)

The existing pr-review-main chunks notice adds manifest_paths=<n>.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 30, 2026
  2. github-actions commented on Oct 30, 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: when pr-review-main splits an oversize diff into chunks, each chunk's prompt would get a path-only manifest of the whole diff (path, status, chunk number). Reviewers would report cross-chunk references as findings. The change also adds manifest_paths=<n> to the chunks notice. A one-chunk diff's prompt must stay unchanged. The scope and done-when items are clear, so nothing is missing. No duplicates found among the open issues. It builds on #11160.

    Automated triage, applied by the lanes App.

  3. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 30, 2026
  4. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 30, 2026
  5. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  6. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

  7. melodic-automation-lanes commented on Oct 30, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: Each chunk's pr-review-main prompt carries a path-only manifest of the whole diff (path, status, chunk number), reviewers report cross-chunk references as findings naming both paths, and the chunks notice adds manifest_paths=<n>. This waits on the chunking from #​11000 and #​11160 landing first.

    Dependencies

    • #​11000 (and #​11160): the chunking itself. The checkout has no chunk code, no split-diff.py and no CHUNK_NOTE, so there is nothing yet to extend.

    Related work

    Open questions

    1. Should this wait until the chunking from #​11000 and #​11160 is merged, and then be written against the real names (split-diff.py, CHUNK_NOTE, the chunks notice)?
      RECOMMENDED: Yes. Hold it as blocked on #​11000, and refine it again once that merges. Basis: .base/.github/scripts/pr-review-main has no chunk code. It holds only write-diff.py, prompt.md, write-verdict.mjs and the tests, and a grep for chunk, CHUNK_NOTE and split-diff finds nothing there.
    2. How should the manifest show a rename that write-diff.py collapses to its rename from and rename to lines?
      RECOMMENDED: List it as one line with status renamed, showing the new path (old to new), in the chunk that holds it. Basis: .base/.github/scripts/pr-review-main/write-diff.py:5

    Sources read

    • /home/runner/work/claude-code-plugins/claude-code-plugins/refine-data/context.json: issue 11177 asks for a path-only manifest in each chunk prompt and a manifest_paths=<n> metric. The candidates list #​11000 as open.
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/scripts/pr-review-main/write-diff.py:5: the patch is --no-renames, and an exact rename prints only its rename from and rename to lines. There is no chunking in this file.
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/workflows/pr-review-main.yml:239: write-diff.py is called with MAX_DIFF_BYTES and writes a single diff.patch. There is no chunk step.

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

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

    priority: mediumReal value, no hard deadline; normal backlog flow.status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.status: needs-decisionAwaiting a human or maintainer judgment call.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions