Skip to content

BreakGuard: Towards Detecting Dependency Breaking Changes with LLM-Generated Tests

Aug 2026 · 0 citations · 45 references
Computer Science

TL;DR

This work proposes BreakGuard, an approach that generates a test suite to detect breaking changes in clients and successfully detected BCs from different library categories, but finds LLM-generated tests to be more reliable for detecting crash-type breaking changes as opposed to behavioural BCs.

Abstract

Open-source libraries play an important role in software development by providing reusable features that expedite the development process. As libraries evolve, they release new versions that add features, fix bugs, or apply security patches. In this process, they may break the contract established with their clients by introducing breaking changes (BCs) that alter the runtime behavior and break client applications. Client-side test suites often fail to detect these BCs because of limited library coverage that does not exercise all library methods used in the client's codebase. We propose BreakGuard, an approach that generates a test suite to detect breaking changes in clients. BreakGuard statically extracts every client method (focal method) that invokes the target library method (call site), then generates tests per focal method. A test detects a BC if it passes on the pre-breaking version and fails on the breaking version. We evaluate our approach on 89 real-world breaking changes from the BUMP dataset, using 3 LLMs (GPT4o, Qwen3-coder-480B, GPT-OSS-120B) and three context levels: minimal, method, and class. Using the best-performing configuration, BreakGuard detects 30.3% of breaking changes (27 of 89) at a mean cost of roughly $0.90 USD per detected breaking change. We successfully detected BCs from different library categories (e.g., JSON libraries, logging, parsing), but we find LLM-generated tests to be more reliable for detecting crash-type breaking changes as opposed to behavioural BCs.

View source

Similar papers

Preprint Jul 2026

DepRepair: LLM-Based Source-Code Repair for Dependency Breaking Changes

Modern software projects depend on numerous third-party libraries, whose updates often introduce breaking changes. Adapting consumer code to such changes remains labor-intensive and error-prone. Existing work either characterizes dependency breaking changes without producing a verified consumer-side patch, or studies automated repair only in settings where the failure and repair context are contained within the target repository. However, dependency breaking changes violate this assumption: the decisive repair evidence lies upstream in release notes and API diffs, and no failing test localizes where the consumer breaks, leaving the repair under-informed. To study this cross-repository problem on real data, we introduce DepBench, a benchmark of 95 real-world dependency-update instances across four ecosystems, each paired with a Docker-based executable oracle that runs the consumer's own tests. To address these challenges, we propose DepRepair, a single-call LLM approach that grounds repair in structured upstream evidence through three components: an evidence filter that distills relevant upstream changes, a usage locator that identifies affected consumer sites, and a subcategory-aware guide that tailors repairs to the breaking-change type. Evaluated on DepBench, DepRepair attains the highest executable pass rate on each backbone, achieving 89.5% with GPT-5.5 and 82.1% with Claude Opus 4.6. We further find that raw upstream evidence reduces LLM and agent pass rates by 7--23 percentage points, whereas structured evidence consistently improves them.

Shenghao Yang, Bo Lu, Yao Liu et al. · 0 citations
Preprint Jul 2026

SemaDiff: Identifying Semantic-Changing Commits with Generated Code and Tests

SemaDiff, a novel approach for identifying semantic-preserving commits through behaviour-based analysis, is proposed, and results show that SemaDiff distinguishes accurately semantic-preserving from -- changing commits in about 76% of the cases, with a 100% precision in semantic-changing commit detection.

Maha Ayub, Michael Konstantinou, Ahmed Khanfir et al. · 0 citations
Preprint Aug 2026

CodeMechanic: Bug-Property-Guided Program Mitigation

This work presents CodeMechanic, a bug-property-guided system for generating constrained mit- igations for spatial memory corruption that combines a two-dimensional static and dynamic context extractor with in-prompt debugging knowledge and stepwise val- idation to limit the effect of LLM errors.

Han Zheng, Rafaila Galanopoulou, Ilia Shumailov et al. · 0 citations
Preprint Jul 2026

DiffTestGen: Change-Directed LLM-Based Testing for Exposing Behavioral Differences

As software evolves over time, it is important to ensure that any behavioral changes occur as intended by developers. A promising approach for this goal is to generate tests that expose behavioral differences between the old and new versions of a program. However, current approaches fail to trigger behavioral differences for many code changes. This paper presents~DiffTestGen, a novel change-directed, LLM-based differential testing approach specifically designed to expose behavioral differences introduced by a code change. The approach is enabled by two key contributions: First, DiffTestGen leverages static call graph analysis and project documentation to identify valid entry points for test generation and to guide the LLM toward reaching the changed code. Second, DiffTestGen iteratively improves our newly introduced union coverage metric, which combines coverage of modified code in the old and the new version, by providing targeted coverage feedback to the LLM. We evaluate DiffTestGen on two datasets comprising a total of 463 PRs. DiffTestGen exposes behavioral differences in 78.2% of the PRs while achieving an average union coverage of 90.7%. Compared with the baselines, DiffTestGen exposes 99 more PRs overall and increases code coverage by 12.5% and 15.6% percentage points, respectively. By integrating DiffTestGen with the Testora regression detector, we show that the identified behavioral differences can be used to detect regression bugs missed by the best existing approaches.

Huimin Hu, Cristian Cadar, Michael Pradel · 0 citations
Preprint Jul 2026

The Patchwork Problem in LLM-Generated Code

This paper formalizes structural coherence as consistency invariants over graph representations of repository artifacts, including import, call, dependency, configuration, schema, resource, control-flow, and routing graphs, and introduces an eight-category failure taxonomy distinguishing defects specific to LLM generation from those merely amplified by it.

Viraaji Mothukuri, R. Parizi · 0 citations
Book Open access Jul 2026

DependaFix: A GitHub App for Fixing Breaking Dependency Updates in CI Build for Java Projects

Third-party libraries are essential to modern software development, but updating them can introduce changes that break the project build. Manually diagnosing and repairing such failures in continuous integration (CI) pipelines is time-consuming and delays the adoption of security and feature updates. In this paper, we present DependaFix, a GitHub App that automates the end-to-end repair of Java projects whose builds break after dependency version updates. DependaFix builds on Byam, an automated repair tool based on large language models (LLMs), by integrating the repair process into GitHub's CI/CD workflow for pull requests. DependaFix detects failing dependency version-update pull requests and attempts to repair them. It extracts build context from CI logs and local Maven builds, delegates the repair to Byam, and creates a pull request for the repair if the fix succeeds. We demonstrate, through an example, that DependaFix can automate the repair process, potentially reducing the manual effort required by developers to diagnose and fix dependency-update failures in pull requests.

Enock Mecheo, May Mahmoud, Sarah Nadi · 0 citations

Related blog posts

MIT News · Artificial Intelligence Aug 17, 2026

Q&A: Rethinking how innovation happens

In his latest book, Professor Eugene Fitzgerald examines the forces that turn breakthroughs into value — and why innovation resists simple formulas.