Opinion: The Deleted Lines in Your Diff Are the Riskiest Code You Merge
Description and use
Automated deletion audits uncover hidden risks in PRs, enabling reviewers to catch behavior changes that pass tests.
Problem
Reviewers often overlook deleted lines in pull requests, allowing risky behavior changes to slip through while tests remain green.
Outcome
Automated deletion audits surface hidden risks, enabling reviewers to catch behavior‑changing removals before merge.
Workflow
- 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.
Evidence
The review process needs a dedicated deletion audit, and that audit only becomes practical when it costs nothing to run.
- Record date: 2026-09-05T14:14:39.676Z