Skip to content

fix(pr-pipeline): pr-verify can't pass the last PR of an issue split across PRs #12965

Closed

Description

@kyle-sexton

Refs: #12792

Problem

pr-verify cannot pass the last PR of an issue whose work is split across several PRs, in either body form.

#12667 was delivered by #12917, #12937 and #12792. Its one done-when item holds on #12792's head tree: scripts/sync-shared-copies.sh --check passes over all 643 copies, and lib/view-settings.test.mjs runs every registered carrier copy. Both of #12792's chunks passed on code. The PR still could not pass pr-verify, and its arm gate waits on a pass. It was merged on its green ci-status.

The split happened because the review lanes could not read #12792 whole (ci-workflows#981 later fixed that). Any issue split for review size hits the same wall on its last PR.

Fix

Let a Closes #N judgment credit sibling PRs that already merged with Refs: #N and that the body names: treat the done-when items they delivered as present at the merge base, and judge this diff only for the rest. Alternatively, accept a Refs: body whose Remaining names only the hand-close of the issue.

Verification

Replay #12792 at 20e75cd, with either body, against the fixed verifier: it passes, while a split PR whose siblings did not merge still fails.

Related

This was generated by AI.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 3, 2026
  2. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

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

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

    Decision recorded. All four refinement questions take their RECOMMENDED answers: option 1, credit merged sibling pull requests for a Closes #N body.
    Agent choice, not an owner answer.
    [quote truncated; the full decision is at the link]

    #12965 (comment)

    The decision settles the open questions, so nothing more is asked. I read the issue as a defect in pr-verify. The last Closes #N PR of a split issue should get credit for sibling PRs that merged with Refs: #N. resolve-pr.mjs would verify each sibling and pass it to the verifier as data. A Refs: PR that names no remaining work should still fail. No likely duplicates found in the open issues.

    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 Nov 3, 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.
    on Nov 3, 2026
  5. melodic-automation-lanes commented on Nov 3, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: 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; intake's refinement of this body is due and may supply them.

  6. added
    status: needs-decisionAwaiting a human or maintainer judgment call.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Nov 3, 2026
  7. melodic-automation-lanes commented on Nov 3, 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: pr-verify credits merged sibling PRs that a Closes PR body names and that carried Refs: #N, treating their delivered done-when items as present at the merge base and judging this diff only for the rest.

    Related work

    Open questions

    1. Which fix does the owner want: credit merged sibling PRs for a Closes body (option 1), or accept a Refs body whose Remaining names only the hand-close of the issue (option 2)?
      RECOMMENDED: Option 1, as intake triage also recommends. It matches the issue's Fix order and its Verification replay, and it keeps the existing rule that a Refs PR must name remaining work. Basis: .base/.github/scripts/pr-verify/prompt.md:73-80
    2. How may the verifier trust a sibling PR named in a Closes body? A PR author could name any merged PR, so what must it check before crediting one?
      RECOMMENDED: Credit a named PR only if it is merged in this repository and its own body has a Refs: line naming the same issue N. The lookup should happen in resolve-pr.mjs and be passed to the model as data. Never take the claim from PR body prose alone. Basis: .base/.github/scripts/pr-verify/resolve-pr.mjs:600-698
    3. How does the verifier know which done-when items a sibling delivered, and how is that checked against the merge base?
      RECOMMENDED: Pass each credited sibling's number and its Refs-body delivered-part text in SPEC_TEXT_FILE as a new field. The prompt then treats those items as present at the base and judges the diff only for the rest. A sibling that is unmerged or unnamed gets no credit, so the diff is judged against the whole issue and fails as it does today. Basis: judgment
    4. Does the merge gate's recompute of verify evidence (babysit_verify_evidence) also need to understand the credited-sibling field?
      RECOMMENDED: Yes, if the gate re-derives spec inputs. The implementer should check that module, because a field the gate cannot reproduce could invalidate a pass. Basis: .base/.github/scripts/pr-verify/resolve-pr.mjs:665-667

    Sources read

    • /home/runner/work/claude-code-plugins/claude-code-plugins/refine-data/context.json: issue 12965, no maintainer decision comment, no duplicate or fixed-by candidate
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/scripts/pr-verify/prompt.md:73-80: a refs spec_kind is judged as a partial slice and fails when the body names no remaining work or claims the whole issue; every other kind is judged against the whole spec
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/scripts/pr-verify/resolve-pr.mjs:600-698: linkedIssues sets specKind to refs only when the PR closes no issue and a Refs: line names one, and builds specText with no sibling-PR data
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/plugins/source-control/skills/pull-request/reference/create.md:369: create appends a Remaining section to a Refs PR

    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.**.

  8. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. All four refinement questions take their RECOMMENDED answers: option 1, credit merged sibling pull requests for a Closes #N body.
    Agent choice, not an owner answer.
    Written by the Issue Triage session from the issue body and the refinement above. Option 1 over option 2: option 2 still leaves the issue open for a hand close after the last pull request merges, which this repository already has to do by hand today (done-evidence.mjs:21: a Refs: line closes nothing; #12792's squash body: "#12667 stays open after this merges, until the owner session closes it"); option 1 lets the last Closes #N pull request close it.

    1. Fix: a Closes #N judgment credits sibling pull requests that already merged with Refs: #N and that the body names; their delivered done-when items count as present at the merge base, and this diff is judged only for the rest. The rule that a Refs: pull request must name remaining work stays.
    2. Trust: credit a named sibling only when it is merged in this repository and its own body has a Refs: line naming the same issue; resolve-pr.mjs does the lookup and passes the result to the model as data, never from body prose alone.
    3. Data: each credited sibling's number and its delivered-part text go into the spec text as a new field; an unmerged or unnamed sibling gets no credit, so the diff is judged against the whole issue as today.
    4. Merge gate: plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py does not re-derive the spec text; it checks a pass's recorded closing issues and spec-comment ids against live data, so a credited-sibling closes pass needs no gate change, only a test that proves it.
  9. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    and removed
    status: needs-decisionAwaiting a human or maintainer judgment call.
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 3, 2026
  10. added
    admission-deferredAdmitted but waiting for WIP room; the hourly work-unblock sweep labels it agent-ready.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    admission-deferredAdmitted but waiting for WIP room; the hourly work-unblock sweep labels it agent-ready.
    on Nov 3, 2026
  11. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor
    No description provided.
  12. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor
    No description provided.
  13. removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Nov 4, 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

    priority: mediumReal value, no hard deadline; normal backlog flow.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Fields

    Work status

    agent-ready

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions