Structured code-context compression before patch generation
A code-repair stack can add a dedicated context-compression stage between retrieval and patch generation now. The evidence points to a practical target: keep repository structure, score code at units such as files, functions, class headers, and statement blocks, and fit the final prompt to a fixed token budget. SWEzze reports about 6x compression, a 51.8% to 71.3% token cut, and a 5.0% to 9.2% lift on SWE-bench Verified across GPT-5.2, DeepSeek-V3.2, and Qwen3-Coder-Next. The training signal is also concrete enough to copy in a smaller internal experiment: derive minimal sufficient contexts from passing repairs, then train a reranker against those distilled segments.
The adoption case is straightforward for teams already running issue-resolution or repository-level repair flows and paying for large prompts. A cheap validation check is to replay a small solved set, compare uncompressed prompts against a structured compressor, and track three things together: patch pass rate, completion rate, and total prompt tokens. The caution from the adjacent repair study is useful here. Better localization helps, but it does not remove the downstream bottleneck. Systems given oracle file and line spans still stayed below 50% success in their native pipelines, and the best fixed added-context probe solved only six extra cases beyond the three-system Solved@10 union. That argues for treating context compression as an operational component that improves cost and focus, while keeping separate measurement on prompt construction and patch synthesis quality.