land: pr-diff-read

Merged
AF
7h ago
+130-19

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Fixes reading pull request diffs so pr://N/diff and pr://N/diff/<path> work again; they previously failed with a gh flag error, and a PR whose changes were all reverted now returns an empty diff instead of failing.

  • gh rejects combining --slurp with --jq, so the changed-path listing now parses newline-delimited JSON objects instead of a slurped array.
  • An empty file list is handled as a valid empty diff.
  • Parsing each page's lines independently keeps renamed paths intact across paginated file lists.
  • Adds tests for multi-page file lists, empty PR diffs, and empty or invalid response lines, and updates the recorded gh double to answer per-page jq output like the real CLI.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no blocking issue remains.

Summary

Fixes pull request diff reads by removing incompatible gh flags and reading changed paths as newline-separated JSON.

  • Pull request diff reads fetch paginated changed paths successfully.

Reviews (3) · Last reviewed commit: "Make the recorded gh double answer per-p..." · Reviewed by Greptile