Urgent.News

600+ sources. One page. See who else covered it.

Editions

Tech

I Built a Tool That Auto-Fixes Downstream Code When You Change an API

You change a field in your proto file. You push it. Then you spend the next two days pinging 4 teams on Slack asking them to update their consumers. Sound familiar? I built Ripple to eliminate that entire workflow. Push a breaking API change → fix PRs appear in every consumer repo. In 15 seconds. No manual coordination. The Problem Nobody Talks About There are great tools for detecting API…

Abstract editorial illustration

You have probably experienced the frustration of changing a field in your proto file, pushing the change, and then spending the next two days asking multiple teams on Slack to update their consumers. This pain is familiar to many developers, and it revolves around finding the affected consumers, understanding their usage, and writing the necessary fixes.

Ripple, a tool created by Aakash2408, aims to eliminate this entire workflow by pushing a breaking API change and automatically generating PRs with correct fixes for each consumer repository in just 15 seconds, without any manual coordination.

Ripple stands out from other tools, such as buf, oasdiff, GraphQL Inspector, and others, which primarily focus on detecting API breaking changes. While detection is essential, the real challenge lies in propagation – identifying the affected consumers, understanding their usage, and making the appropriate fixes. Ripple addresses these challenges through a multi-step process, starting with custom diff engines for 10 contract types, including OpenAPI, protobuf, GraphQL, and more.

These engines understand the semantics of their respective formats and determine if a change is breaking or not.

The second step involves consumer finding, a critical aspect where many tools fall short. Ripple uses an ensemble approach, combining five strategies to identify affected consumers, including searching for the removed field name, checking the import graph, querying git history, applying custom rules, and detecting multiple callers. The git history approach is particularly noteworthy, as it reveals the coupling between files based on the pattern of simultaneous changes to related files over time.

Once consumer files are identified, Ripple generates fixes for each using template-based fixes for common patterns and LLM-powered fixes for complex cases. The generated fixes pass basic syntax checks before opening PRs. The final step is PR creation, which is a one-click process for GitHub, GitLab, and Bitbucket users. With Ripple installed as a GitHub App, auto-installed webhooks ensure seamless operation across all repositories.

Ripple's approach is backed by PropBench, a benchmark consisting of 268 real engineering changes. The research shows that nearly 40% of change propagation consequences occur across packages, which single-repo tools often miss. Traditional tools like Dependabot and Renovate focus on updating library versions or modifying actual code, while Ripple rewrites code to handle the removal of a specific field from a contract.

In summary, Ripple is a game-changing tool for managing breaking API changes and their downstream impact. By automating the usually tedious and time-consuming process of finding affected consumers, generating accurate fixes, and opening PRs, Ripple significantly reduces the burden on engineering teams, allowing them to focus on more critical tasks. With its unique ensemble approach, Ripple promises to improve engineering judgment and change propagation, making it a valuable addition to any developer's toolkit.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 5 August →