Optimize apply patch stale patch rescue performance and fix parser edge cases
Optimize apply patch stale patch rescue performance and fix parser edge cases: a task in LegoFlow-SWE (Harbor dataset). The apply patch hook’s stale‑patch rescue layer is unacceptably slow for interactive use. When patches target file contents that are slightly out‑of‑date, the rescue algorithms…
The task
The `apply_patch` hook’s stale‑patch rescue layer is unacceptably slow for interactive use. When patches target file contents that are slightly out‑of‑date, the rescue algorithms consume hundreds of milliseconds, causing noticeable lag.
Part of Lego-X/LegoFlow-SWE.