error-path-review
Error Path Review
Two questions, asked of every error the change can produce:
- Does the error tell the caller everything they would need to fix the request in one go?
- Does a single-cause message hide a failure with several causes?
An error message is part of the interface, and for a failing caller it is the whole of it. An error naming one of five missing inputs is not a smaller error, it is a wrong one: it tells the caller their request is nearly right. They fix the named thing, retry, and get the same error about the next one. Five round trips to learn what one message could have said — and the message reads perfectly well in the one-item case, which is why nobody notices.
This review is narrow on purpose. It asks what the errors say, not whether the logic that produced them is correct.
Target
Scope comes from $ARGUMENTS: a path, commit, range, branch, or PR number; empty means uncommitted changes plus the current branch's diff vs its base. For a single commit, compare against its first parent. Where a pass invoking this review hands over an explicit scope and base revision, that wins — it is what every other reviewer in the pass is reading. Run git status --short first and do not report problems already fixed in the worktree.
Scope discipline. Report only error paths the change added or made reachable. A pre-existing thin message elsewhere is out of scope however bad it looks, and a nearby finding does not pull it in. Where a pre-existing error genuinely blocks the new one from being complete, say so as a note, not a finding.
A snapshot has no "the change". Given a bare path, or a commit named as a state of the world rather than as a diff, there is no base revision and nothing for scope discipline to subtract — so neither scope discipline nor the Do Not against reporting a pre-existing error path applies. Review every error path in the named scope, and say in the report that you did, because the invoker asked about a state and not a delta. "The change introduced it" is unanswerable here, not false.