Learning on Web Dev Open is free for all.

Build First > Meet your AI toolsReviewing a diff
Phase 00Meet your AI tools15 of 434

Reviewing a diff

An agent writes forty lines and asks you to approve them. This is the skill that decides whether that is safe.

Drill22 minAI off

Every agent tool shows you a diff before it commits. Almost everyone clicks accept, because the diff is long and looks competent. It is long and it does look competent.

Four kinds of problem account for nearly all the damage: a secret in the source, a deleted line that was load-bearing, a dependency nobody asked for, and a silent behaviour change dressed as a tidy-up.

Find all four below. Do not flag harmless lines just to be safe. Rejecting everything is not review either; you still need to understand what changed.

Four things are wrong with this diff

0 flagged

An agent was asked to round the tax to two decimal places. Click every line you would refuse to merge. Flagging lines that are fine costs you too; accepting nothing is not review either.

diff --git a/src/checkout.js b/src/checkout.js
1
2+
3
4
5+
6
7
8-
9
10
11-
12+
13
14+
15-
16
17
18
Click the lines you would refuse. Then read what you missed and why it matters.

After you score, read the five-step method at the bottom. It takes ninety seconds per diff and it is the difference between using an agent and being used by one.

You should now be able to

  • Read a unified diff and find the deletions first
  • Spot the four kinds of problem that actually bite
  • Refuse a change without refusing everything
Ask the community

Loading…