When you build a GitHub bot that opens fix pull requests instead of leaving inline comments, naive line-based patching breaks on multi-finding files. You apply the first hunk, and the line numbers shift underneath every remaining patch. Coordinates collide, syntax breaks, and Git rejects the hunk.
In CodePeel , we avoided line-splicing by combining three parts: a strict fixability filter, full-buffer file rewrites, and GitHub's Git Data API. The worker constructs signed commits in memory without cloning the repository to disk.
1. Filter Out Vague Advice Before Writing Code
Architectural comments like "split this class" or "add unit tests" need domain context from the author.…