pr-af icon indicating copy to clipboard operation
pr-af copied to clipboard

review: malformed diff_text silently coerced to an empty PR — succeeds with zero findings instead of erroring

Open AbirAbbas opened this issue 4 months ago • 0 comments

Found while driving pr-af-go (v0.1.0, installed via af install …/pr-af//go) through the control plane on macOS.

Repro: POST /api/v1/execute/async/pr-af-go.review with a diff_text whose hunk header line counts don't match the hunk body (e.g. @@ -10,12 +10,12 @@ over a 10-line hunk — the kind of diff a human or tool composes by hand).

Observed: the run succeeds with findings: [], and the anatomy phase narrates an empty PR: "This PR contains no file changes… 0 files, 0 additions, 0 deletions". The parse failure is swallowed; the review pipeline runs to completion on nothing.

Expected: unparseable diff_text should fail the request loudly (400 or a failed execution with a parse error naming the bad hunk), never report a successful zero-finding review — downstream automation will read that as "reviewed clean".

🤖 Generated with Claude Code

AbirAbbas avatar Jul 15 '26 19:07 AbirAbbas