一句话:面向高风险 diff 提出评审工作流 RDR 与推荐器 RecRDR,经随机试验与 A/B 实验验证可降低缺陷风险且不损开发速度。
代码评审是变更的重要关口,但评审精力与专业能力有限。本文用 Diff Risk Score(DRS)量化变更落地后引入缺陷的风险,识别高风险 diff,并围绕代码评审提出三个问题:专用工作流能否改善高风险 diff 的评审行为;能否为高风险 diff 定制评审者推荐器;该推荐器在真实 A/B 测试中效果如何。为此作者提出 Risky Diff Reviewer(RDR)工作流,为高风险 diff 额外指派一名推荐评审者,并在作者未解决风险信号即尝试落地时弹出可绕过的落地前提示。在风险最高 5%(超过 15k 个 diff)上的随机试验显示,RDR 提升了评审深度与协作,使最终版本降至高风险阈值以下的 diff 比例增加 9.56%,评审时间仅增加 0.45%。作者还设计了 RecRDR 推荐器,采用连续加权真值,强调文件经验、作者协作、交互质量与时效性;离线回测中其 Top-1/Top-3 行为率优于基线,5k+ diff 的 A/B 测试中推荐评审者评论数增加 9.94%、接受数增加 7.77%,且评审与处理时间等护栏指标无统计显著回退。
Code review is an important gate for code changes, but review effort and expertise are limited. Defect prediction and just-in-time risk modeling aim to identify changes that are most likely to introduce defects so that teams can focus additional attention where it is most useful. We study whether risk-aware interventions, targeted specifically at these high-risk changes, can improve review outcomes while preserving developer velocity. In our setting, risk refers to the likelihood that a code change will introduce a defect after landing. We quantify this defect risk with the Diff Risk Score (DRS) used to identify high-risk diffs and investigate three research questions related to code review: (RQ1) whether a dedicated workflow improves review behavior on high-risk diffs, (RQ2) whether we can design a reviewer recommender tailored to risky diffs, and (RQ3) how well that new recommender performs in an A/B test across thousands of high risk diffs. For RQ1, we introduce the Risky Diff Reviewer (RDR) workflow, which assigns an additional recommended reviewer for high-risk diffs and shows a bypassable pre-land dialog when authors attempt to land without resolving the risk signal. In a randomized trial on the top 5% of diffs by diff defect risk (over 15k diffs), RDR increases review depth and collaboration and increases the fraction of diffs whose final version falls below the high-risk threshold by 9.56%, with a minor 0.45% increase in diff reviewing time. For RQ2, we design a new reviewer recommender (RecRDR) for risky diffs. RecRDR uses a continuous, weighted ground truth that emphasizes file experience, author collaboration, interaction quality, and recency. In offline backtests, RecRDR improves Top-1 and Top-3 action rates over the baseline recommender. For RQ3, we evaluate RecRDR using an A/B test within the RDR workflow on over 5k diffs. RecRDR increases engagement from the recommended reviewer, with 9.94% more comments and 7.77% more acceptances, and we do not observe statistically significant regressions in guardrail metrics such as diff reviewing and processing time.
@inproceedings{ParaspatkiRAGMN26,
title = {Code Reviewer Recommendation for High Risk Diffs at Scale: Workflow, Recommender, and Live Experiments},
author = {Aishwarya Girish Paraspatki and Brandon Reznicek and Rui Abreu and Ford Garberson and Audris Mockus and Nachiappan Nagappan and Peter C Rigby},
booktitle = {FSE},
year = {2026},
doi = {10.1145/3803437.3805220}
}