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

Institutions

Publication Details

Published
2026-11-02
DOI
https://doi.org/10.24108/preprints-3116873
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Minimal Intervention: Function Isolation via AST before Language-Model Patching

Vladislav Tishkov
Software Engineering Research
preprint

Minimal Intervention: Function Isolation via AST before Language-Model Patching

Vladislav Tishkov
preprint en

Abstract

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.

Donetsk National University of Economics and Trade named after Mykhailo Tugan-Baranovsky (UA)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon