Skip to content

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

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-12424-41494934545-1
Nov 2, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-12424-41494934545-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Refs: #12424

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The code-review lane's High-signal bar now says a finding's file:line is the line in the file at the PR head, never a position in the diff file. It also says how to get that line: read it from the file at head, or count from the hunk header's +c over context and added lines; a removed line cites the base line from -a. The local review found that the lane's hunter subagents (review:lane-verifier) produce the line numbers the main thread reports, so the same rule went into the agent's Hunter role, and its Verifier now gives the head file's line when a candidate cites a different one. The recall eval the issue names could not run in this lane, so the issue stays open for it.

Remaining work

  • Run claude plugin eval plugins/review --case recall-node-notice-bash-version --scaffold --ablation none --runs 6 --model opus on the change and confirm it cites hooks.json:9 in at least 5 of 6 runs.
  • Cite the recall score before and after the change on the PR, as plugins/review/README.md "Recall cases" requires for a lane prompt change.

Not verified

  • Done-when item 2: claude plugin eval plugins/review --case recall-node-notice-bash-version --scaffold --ablation none --runs 6 --model opus (expect hooks.json:9 in at least 5 of 6 runs) was not run. This lane's Bash runs only the named wrappers and has no claude CLI, so the after score is unmeasur
  • Done-when item 3: the PR cannot cite a recall score before and after the change (plugins/review/README.md "Recall cases") because no eval ran here. The before figure from the issue is 2 of 4 correct anchors on this case; the after figure needs the eval run above.
  • Tidy: passes 1-3 had no code lines (all markdown). Pass 4 ran (write-for-agents on SKILL.md, no edit; write-for-humans on the fragment, one sentence split). In pass 5, ai-slop:audit's detect.sh, digest-guard.sh and semantic-diff verifier did not run because the lane's Bash allows only the named wrap
  • verify: there is no build or unit test for these markdown-only changes; the only behavioral check is the recall eval listed above.
  • Adjacent gap from the review, outside this issue's scope: plugins/review/skills/security-review/SKILL.md (around lines 142 and 160) asks for "file and line" with no head-line rule for its main thread. Its lane-verifier subagents now get the rule through the agent definition.
  • check-affected skipped typos (not installed) and the validate-plugins steps that run code from the checked tree; it left those, and the evals-quality and portability-lint checks, to CI.
  • Untracked runner files at the checkout root (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) are not part of this change and were left alone.

Fix

  • plugins/review/skills/code-review/SKILL.md: High-signal bar states that a finding's file:line is the head file's line, never a diff-file position, and how to count it from a hunk header (base line for a removed line).
  • plugins/review/agents/lane-verifier.md: Hunter role carries the same head-line rule; Verifier gives the head file's line when a candidate cites a different one.
  • .changes/review/work-resolve-issue-issue-12424-41494934545-1-683eb63e.md: new patch changelog fragment (### Fixed) for the review plugin.

Verification

The runner ran each check from the base copy against 611f071:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all 12 fragments under .changes/ valid (run after the final edit).
  • .lane/checks/bin/check-changed-skills: plugins/review/skills/code-review PASS, 0 errors, 5 warnings; the warnings are about the existing skill (description length, body length, no ## Next, numbered list at lines 100-105) plus a body growth of 276 -> 281 lines from this change.
  • .lane/checks/bin/check-affected: 11 passed, 7 skipped over 3 changed files; the rest are listed as CI only.
  • Local review: one fresh-context general-purpose subagent over the whole diff returned 4 findings. All 4 were confirmed against plugins/review/agents/lane-verifier.md and SKILL.md and fixed: ambiguous hunk-header counting, the rule not reaching lane-verifier hunters, the inline-anchor wording for a r
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41494934545

Left out: the items under Not verified.

Related

#12424

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 611f071a8d17cf40f8fedffecc0bfc5fd4cf8021. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 611f071a8d17cf40f8fedffecc0bfc5fd4cf8021: read 3 of 3 changed file(s); 1 finding(s), 0 as inline comments.

Code review: PR #12460

What changed: This PR adds a rule for which line number a finding cites. The rule goes into the High-signal bar of /review:code-review and into the lane-verifier agent's Hunter and Verifier roles. A finding must cite the line in the file at the PR head, never a position inside the diff file. A finding on a removed line cites the base file's line. The PR also adds a patch changelog fragment for the review plugin.

Correctness of the rule: It matches unified-diff semantics.

  • The first line after @@ -a,b +c,d @@ that exists in the new file is line c, and only context and + lines advance the new-file count.
  • Base-file lines count from a over context and - lines.

The wording is the same in SKILL.md and lane-verifier.md, so the main thread and its hunters follow one rule. The Verifier now also corrects a candidate's line, which closes the gap where hunters supplied the anchors the main thread reports. The patch bump fits a prompt-wording fix.

Path-scoped rules: I checked .claude/rules/skill-bodies-state-current-rules.md and .claude/rules/cost-claims.md, which match the changed skill and agent files. Neither is broken: hunk-header syntax is a stable format, not a volatile upstream detail, and the change makes no cost claims.

Closing issue: The PR only references #12424 (Refs:) and closes no issue. The PR context has no closing-issue section, so there were no acceptance criteria to check.

Finding (whole PR, blocking per repo convention)

  1. The recall score required for a lane-prompt change is missing. plugins/review/README.md#L130-L136 says: "A pull request that changes a review lane's prompt, model or effort cites the recall score before and after the change." This PR changes the /review:code-review lane prompt (SKILL.md#L208-L215) and the lane-verifier hunter/verifier prompt (lane-verifier.md#L11-L19).
    • The PR body gives only an issue-quoted "before" figure (2 of 4 correct anchors on one case). It gives no "after" figure, and no recall-* suite score from the README's command.
    • The PR body says this openly under "Not verified" and "Remaining work". Even so, the lane's only behavioral check has not run: no evidence yet shows that the new wording improves anchor accuracy or leaves recall unchanged.
    • Fix: a person with the claude CLI runs claude plugin eval plugins/review --case 'recall-*' --scaffold --ablation none --runs 1 --max-cost-usd <usd> on the base and on this head, plus the issue's recall-node-notice-bash-version 6-run check. Then cite both scores on the PR before it merges.

Notes

  • The PR body's verification results (check-changelog-fragments, check-changed-skills, check-affected, the local subagent review) are claimed by the author and were not checked here. This lane has no shell, so I ran none of them.
  • The PR body's adjacent gap is out of scope here: plugins/review/skills/security-review/SKILL.md has no head-line rule for its main thread.
  • The PR body and issue text contained no embedded instructions aimed at this lane.
  • Spend: none. The change is markdown only, with no billing, model, or schedule change.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 611f071a8d17cf40f8fedffecc0bfc5fd4cf8021: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read every hunk of the 3 changed files: the changelog fragment, plugins/review/agents/lane-verifier.md and plugins/review/skills/code-review/SKILL.md.

What changed: the PR adds instruction text to the code-review lane and the lane-verifier agent. A finding must now cite its line in the file at the PR head, counted from the hunk header, not its position in the diff file. The verifier now gives the head line when a candidate cites a different one.

What I checked:

  • Instruction surface: nothing was deleted, narrowed or softened. Both edits only add text. No rule went away, so the instruction-surface lens has nothing to judge, and the protected-class register did not need to be consulted.
  • Agent permissions: the change touches no tool grants, frontmatter or permissions. The verifier still posts and edits nothing.
  • Trust controls: no trusted-actor list, token request, kill switch, merge hold or plugin manifest is changed. None of the changed files matches a listed trusted path. plugins/review/skills/security-review/** is trusted, but this PR does not touch it.
  • PR context: I read it as data. It contains no embedded text telling the lane to pass the PR, skip a check, drop a finding or post somewhere else.
  • Prior findings: none (0 rounds with findings, cap not reached).

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 611f071a8d17cf40f8fedffecc0bfc5fd4cf8021.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 9146a8e Nov 2, 2026
56 of 57 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-12424-41494934545-1 branch November 2, 2026 19:42
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 9146a8e8b5c17ced78cbe3f18806d82b16709c9b; later checks count it verified from this comment.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 5, survived 2, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 71%; mutation score 71%.

File Killed Survived Timeout No coverage Invalid Not run
lib/git-hooks/check-lib.sh 4 2 0 0 0 0
plugins/guardrails/git-hooks/pre-commit-content.sh 1 0 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
lib/git-hooks/check-lib.sh:436 ROR productive input-gap
lib/git-hooks/check-lib.sh:466 other productive input-gap

The run's summary has the full report.

@kyle-sexton

Copy link
Copy Markdown
Member

Recall score, before and after this change (plugins/review/README.md "Recall cases"). Case recall-node-notice-bash-version, Opus, Claude Code 2.1.316 before and 2.1.317 after. Before (at 3a73149): hooks.json:9 in 2 of 4 runs. After (main at f5146f1): hooks.json:9 in 6 of 6 runs, grader found-bash-version-exit 6 of 6, run-validity VALID. Before and after come from separate sessions and different run counts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant