feat: predictable large pull-request coverage #15
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/forgejo-auto-pr-review!15
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-7-large-pr-coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #7.\n\nReplaces first-byte diff truncation with deterministic file batches, configurable exclusions, and a named coverage report.\n\nCloses #7.
Automated code review
Reviewed commit:
cfb65718c775f4fe6bf8d307edeb94f8d0213a95Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The pull request implements deterministic batching, configurable path exclusions, and explicit coverage reporting for large diffs, replacing the previous first-byte truncation approach. The changes correctly spool diff sections to temporary files to bound memory usage, enforce byte limits per batch, and provide a named coverage report in the final comment. Test coverage is expanded to validate spooling, batching logic, exclusion filtering, and byte-boundary handling.
Blocking findings
None.
Important findings
None.
Suggestions
head = section.stream.read(head_size).decode(errors="ignore")
Impact: Splitting a binary stream at an arbitrary byte boundary and decoding with
errors="ignore"silently drops incomplete UTF-8 sequences. While acceptable for LLM prompts, it reduces deterministic fidelity and may obscure context near the truncation point.Suggested fix: Use
errors="replace"to preserve character count visibility, or truncate at valid UTF-8 boundaries using a codec-aware splitter before decoding.Tests and validation
Questions
diff --githeaders always follow the standard quoting format, or should the reviewer handle non-standard metadata lines more gracefully?exclude_paths, or is the current status grouping sufficient?Review limitations
Review metadata