← 返回所有文章

这篇文章还没有中文版本,因此这里显示的是英语版本。

Reviewing an agent's diff: read the tests first, the summary last

2 分钟阅读作者:The Octuo team

最初于 2026年10月2日 发表在 Differ。

Screenshot of Octuo for macOS showing delegated tasks

A coding agent hands you a diff and a tidy summary along the lines of "Fixed the flaky test, all checks pass." Of the two, the summary is the less reliable. It describes what the agent meant to do. The diff shows what it did. Reviewing in a fixed order keeps the two apart.

The order

  1. Read the tests first. Start with the tests the diff added or changed. Do they describe the behavior you asked for, or the behavior the code happens to have?
  2. Read the file list. A file outside the area you named is a question, not a verdict. Config, CI files, lockfiles and generated files deserve a second look even when the change is small.
  3. Look for what got weaker. Deleted assertions, skipped tests, widened timeouts, broader exception handlers, a retry wrapped around the failing line. Passing checks mean little if the checks changed.
  4. Read the logic in the order the data flows, from input to output, not file by file in alphabetical order.
  5. Run it yourself. Run the full check once, then walk one path by hand that the tests don't cover.
  6. Read the summary last. Every difference between it and what you found is a question to ask.

A scene (hypothetical and illustrative)

You ask for a fix to a test that fails now and then. The summary says it's fixed. The diff leaves the production code alone and doubles the test's timeout. Step 1 shows a test that now waits longer, not a cause that was found, and step 3 names the widened timeout. You send it back with one line: "Find out why it fails intermittently, and leave the timeout alone."

Keep the review light

Ask for the tests in their own commit, so step 1 is a single click. And keep a short list of the surprises you've caught before. It becomes your own step 3.

We're the Octuo team. Octuo is a personal assistant and one starting point for work across AI, tools and specialist services. It hands tasks to supported specialist tools on your computer once you've installed, set up and authorized them, including coding agents such as Codex or Claude Code (named only as examples; no partnership or endorsement is implied), and it reports back when a job is done. Whoever or whatever hands you a diff, the decision to merge is yours. Octuo is available for macOS.