Lesson 20 / 25
Pull Requests With Evidence
Make review fast and informed.
Show the proof
An automated PR should state the problem, link the issue or failing CI run, explain the root cause in plain words, show the failing test (and that it failed before the fix), summarise verification results (tests, lint, types, scans), list files changed and diff size, and say clearly that it was generated automatically and by which system. Reviewers then check reasoning and evidence instead of reconstructing them.
Humans stay accountable
Automated fixes ship through review with evidence, and can be undone quickly.
An automated PR description
A template the bot fills in.
Title: fix(pricing): FLAT50 should apply to orders of exactly 50
Generated by: autofix-bot (model + pipeline v3); needs human review.
Issue: #482 Failing check: CI run 9123
Root cause: discount() used `total > 50`; the rule is "50 or more".
Change: `>` -> `>=` in src/pricing.py (1 line).
Test: tests/test_pricing.py::test_flat50_boundary (failed before, passes now)
Verification: 142 tests pass; ruff, mypy clean; secret scan clean;
no protected paths touched; 2 changed lines.Label bot PRs
Use a consistent label and author so automated changes are easy to filter, audit and measure.
Quick check: Which item should an automated PR always include?
- Only the word "fix"
- The root cause and evidence that the new test failed before and passes after
- The bot's API key
- A request to skip review
Answer
The root cause and evidence that the new test failed before and passes after — Evidence speeds up trustworthy review.