The diff is in an area I do not know. What do I do

Back to list2023-08-28
You

The diff is in an area I do not know. What do I do?

ChatGPT

Say so and review what you can: tests, error handling, whether the description matches the change. An approval that means "I did not understand this" is worse than no review, and a question in the thread is often more useful than the approval would have been.

Tool steps: 3 (reasoning summary, call to python, execution output)
reasoning summary
Checked the query plan, then compared index options.
call to python
rows = run_sql("EXPLAIN (ANALYZE) SELECT ...")
print(rows[:3])
execution output
Seq Scan on events  (cost=0.00..812431.00 rows=41203122 width=16)
  Rows Removed by Filter: 38996878
Planning Time: 0.214 ms
Execution Time: 11842.663 ms
You

Big PRs sit for days. How do we fix that?

ChatGPT

Make them smaller, because attention does not scale with size: a 50 line change gets real review, a 2000 line change gets a rubber stamp. Splitting by mechanical versus meaningful is the easiest cut, since the mechanical half needs eyes but not thought.

You

How do I review without turning it into style comments?

ChatGPT

Automate style entirely, then the review can only be about substance. What remains worth saying: this breaks under concurrency, this loses an error, this name means something else in our codebase. If a comment could be a lint rule, make it one.

You

How long does this usually take in practice?

ChatGPT

An afternoon to do it properly the first time, then minutes when it recurs. Most of the first afternoon goes into discovering which of the defaults do not match your situation.