Skip to content

fix(review): anchor code-review findings at the head file's line, not the pr.diff position #12424

Closed

Description

@kyle-sexton

Problem

/review:code-review sometimes anchors a finding at the line number inside .claude-lane/pr.diff instead of the line in the changed file at head. An inline comment posted at that line lands in the wrong place, or on a line the diff does not cover, and the recall grader scores the finding as missed.

Evidence

The case is plugins/review/evals/recall-node-notice-bash-version (owner-confirmed on #8990). The bug is at plugins/eol-normalizer/hooks/hooks.json:9, which is line 14 of the scaffold's pr.diff. The runs used Opus (the lane's model), Claude Code 2.1.316, and plugins/review at 3a73149. There were 4 runs on 2026-11-02:

Run Bug named Line cited
16:37Z yes hooks.json:14 "(line 9 of the head file)"
17:1xZ run 1 yes hooks.json:9
17:1xZ run 2 yes hooks.json:14 "in the diff (line 9 of the file at head)"
17:1xZ run 3 yes hooks.json:9

In the two failing runs the model knew the file line and still anchored at the diff line. The bug was found 4 of 4 times and anchored correctly 2 of 4.

Done when

  • The code-review lane's instructions say that a finding's file:line is the line in the file at the PR head, never a position in pr.diff.
  • claude plugin eval plugins/review --case recall-node-notice-bash-version --scaffold --ablation none --runs 6 --model opus cites hooks.json:9 in at least 5 of 6 runs. Before the change it was 2 of 4.
  • The PR cites the recall score before and after, as plugins/review/README.md "Recall cases" requires for a lane prompt change.

Notes

A run from a checkout with many linked worktrees is refused ("a git directory of the plugin registers more linked worktrees than can be screened"). Run on a git archive copy of plugins/review with --trust-plugin. The recall baseline (0 of 3, one run each) is on #8990.

This was generated by AI.

Activity

  1. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

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

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

    Understood: the code-review lane sometimes cites a finding at its line in pr.diff instead of the line in the head file. In the evidence, that was hooks.json:14 where hooks.json:9 was correct. The fix is a prompt change that says file:line is the head-file line. The report found no duplicate among open issues.

    Some done-when items are checked by a paid or repeated eval run, such as 5 of 6 runs citing hooks.json:9. An unattended run can't do those, so they don't hold this issue.

    A comment says #12460 merged with Refs: and left this issue open. A check of what that change left is still needed.

    Automated triage, applied by the lanes App.

  2. added
    status: ready
    on Nov 2, 2026
  3. added
    admission-deferred
    on Nov 2, 2026
  4. added
    agent-ready
    and removed
    admission-deferred
    on Nov 2, 2026
  5. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  6. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor
    No description provided.
  7. melodic-automation-lanes commented on Nov 2, 2026

    @melodic-automation-lanes
    Contributor

    The lanes App's pull request #12460 merged with Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removed status: ready and agent-ready, so the hourly triage sweep sends it back to intake triage. Admission then parks it at status: confirmed for a check of what that pull request left, until a **Decision recorded.** comment says what is left or someone closes it.

  8. removed
    status: ready
    agent-ready
    on Nov 2, 2026
  9. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (attempt 1 of 2).

  10. added
    status: ready
    on Nov 2, 2026
  11. added
    status: confirmed
    and removed
    status: ready
    on Nov 2, 2026
  12. melodic-automation-lanes commented on Nov 2, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: merged pull request #12460 names it with Refs: after its newest decision or refinement comment, so its work may already be done: close the issue if it is, or post a comment whose first line is **Decision recorded.** saying what is left, which sends it back through intake. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  13. melodic-automation-lanes commented on Nov 2, 2026

    @melodic-automation-lanes
    Contributor

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

  14. added
    host-run
    on Nov 3, 2026
  15. kyle-sexton commented on Nov 3, 2026

    @kyle-sexton
    MemberAuthor

    Done-when holds. (1) The rule is on main: plugins/review/skills/code-review/SKILL.md:211 "is the line in that file at the PR head, never a position in the diff file", and plugins/review/agents/lane-verifier.md:13 (PR #12460). (2) The issue's command with --trust-plugin on a git archive copy of main at f5146f1, Opus, Claude Code 2.1.317: every run's reply cites hooks.json:9, 6 of 6 (bar 5 of 6), none cites line 14; run-validity VALID, 1.55 USD list estimate. (3) Before and after are cited on the PR: #12460 (comment)

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

    host-runstatus: confirmed

    Type

    Fields

    Work status

    confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions