Minimal Intervention: Function Isolation via AST before Language-Model Patching
Automatic code-repair agents such as SWE-agent operate at the repository level, generating patches that touch multiple files and functions. This granularity increases token cost and complicates verification: a correct fix inside one function can be masked by unrelated changes. We formulate the scope control problem as separate from verification and propose MINIMAL-INTERVENTION REPAIR, a pipeline that isolates the faulty function through AST analysis, passes only that function to the language model, and verifies the candidate by executing tests before commit. The language model is treated as a black-box oracle. The architecture requires no fine-tuning and is compatible with any API. This is a position paper: we define the pipeline stages, pseudocode for localization and isolation, classes of functions that cannot be isolated, and an evaluation protocol on QuixBugs with ablations and a green-but-wrong patch metric.
Authors
- Vladislav Tishkov (ORCID: https://orcid.org/0009-0004-0507-6925)
Institutions
- Donetsk National University of Economics and Trade named after Mykhailo Tugan-Baranovsky (UA)
Publication Details
- Published
- 2026-11-02
- DOI
- https://doi.org/10.24108/preprints-3116873
- Primary Topic
- Software Engineering Research
- Type
- preprint