Skip to content

feat: add PR-wide risk score to diff aggregates - #201

Merged
stephenc222 merged 1 commit into
mainfrom
claude/pr-review-diff-mode-2901c3
Sep 18, 2026
Merged

stephenc222 merged 1 commit into
mainfrom
claude/pr-review-diff-mode-2901c3

Conversation

@stephenc222

Copy link
Copy Markdown
Contributor

Summary

  • Collapse hotspots diff's per-function LRS deltas into a single pr_risk_score + band for the whole PR (aggregates.pr_summary in JSON/JSONL, a line in text output, a summary card in the HTML report)
  • pr_risk_score is the net LRS delta across the diff (new functions add their LRS, deleted functions subtract theirs, modified functions add their ΔLRS); band is the worst risk band reached by any new/modified function
  • Checked hotspots-research's promotion tracker first: "Review Hotspots / PR-level triage" has no validated finding requiring a promotion brief — this only rolls up already-computed per-function LRS values, it doesn't introduce a new predictive signal

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test (full workspace, including new test_diff_pr_risk_summary_collapses_all_changes_to_one_score)
  • Manual smoke test: hotspots diff HEAD~5 HEAD --auto-analyze in both --format json and --format text

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@stephenc222
stephenc222 merged commit a8880ce into main Sep 18, 2026
8 checks passed
@stephenc222
stephenc222 deleted the claude/pr-review-diff-mode-2901c3 branch September 18, 2026 20:36
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