Summary
rtk gh pr diff calls compact_diff(&raw, 100) which silently drops output after 100 compacted lines. For multi-file PRs (3+ files with non-trivial changes), this truncates the diff without any signal to the caller — no exit code change, no stderr warning.
Impact
- Agents doing PR review receive incomplete diffs and miss findings in later files
- Silent truncation: agent has no signal to retry or fallback
- Workaround:
gh pr view --json files,additions,deletions,body works but requires knowing about the limitation
Root cause
src/gh_cmd.rs:1070 — compact_diff(&raw, 100) hard-caps at 100 lines total output. This was likely inherited from the local git diff path where 100 lines is reasonable. PR diffs are structurally larger.
Fix
Raised max_lines from 100 to 500 in pr_diff(). Regression test added with synthetic 5-file PR diff asserting all files appear in output.
Fixed in commit 859143c on feature/agentic-fuzzing branch.
Upstream candidate
This is likely an upstream bug too (default value error, not a design choice). The compact_diff function's max_lines parameter was designed to be configurable per-caller, but pr_diff just used the same low default as local diffs. Could be a straightforward cherry-pick to rtk-ai/rtk.
Summary
rtk gh pr diffcallscompact_diff(&raw, 100)which silently drops output after 100 compacted lines. For multi-file PRs (3+ files with non-trivial changes), this truncates the diff without any signal to the caller — no exit code change, no stderr warning.Impact
gh pr view --json files,additions,deletions,bodyworks but requires knowing about the limitationRoot cause
src/gh_cmd.rs:1070—compact_diff(&raw, 100)hard-caps at 100 lines total output. This was likely inherited from the localgit diffpath where 100 lines is reasonable. PR diffs are structurally larger.Fix
Raised
max_linesfrom 100 to 500 inpr_diff(). Regression test added with synthetic 5-file PR diff asserting all files appear in output.Fixed in commit 859143c on
feature/agentic-fuzzingbranch.Upstream candidate
This is likely an upstream bug too (default value error, not a design choice). The
compact_difffunction'smax_linesparameter was designed to be configurable per-caller, butpr_diffjust used the same low default as local diffs. Could be a straightforward cherry-pick tortk-ai/rtk.