Opinion: The Deleted Lines in Your Diff Are the Riskiest Code You Merge
说明与用途
自动删除审计揭示 PR 中的隐藏风险,使审阅者能够捕捉通过测试的行为更改。
问题
Reviewers often overlook deleted lines in pull requests, allowing risky behavior changes to slip through while tests remain green.
结果
Automated deletion audits surface hidden risks, enabling reviewers to catch behavior‑changing removals before merge.
工作流
- 1. Run the provided Python script to extract removed lines from the diff.
- 2. Classify each line into risk categories (control‑flow, resilience, dependency, configuration, other).
- 3. Send each category group to a local LLM endpoint for risk assessment.
- 4. Convert the LLM verdicts into review comments and add them to the PR.
- 5. Store the audit results in a review ledger for future reference.
证据
The review process needs a dedicated deletion audit, and that audit only becomes practical when it costs nothing to run.
- 记录日期: 2026-09-05T14:14:39.676Z