Upstream contribution · The-PR-Agent/pr-agent
pr-agent · Preserving physical Git lines in PR-Agent
Problem
Python's generic line splitting recognizes characters such as U+2028 that Git treats as ordinary content. A supplied diff containing one of those characters could shift hunk positions or lose source text.
Engineering response
The reverse patcher uses an LF-aware splitter and consumes at most one end-of-line carriage return. The MOSAICO reader also iterates over LF-delimited lines.
Evidence and scope
The PR reports 43 focused checks. The linked offline replay separately documents baseline and corrected outputs for Unicode separators, later hunks and carriage returns.