Part 1 of a series about rebuilding a carsharing app.

In How to Rescue Software You’re Afraid to Touch I described the method in general terms: build a net of tests first, then change the code underneath it. That post had no dates and no numbers in it. This series has both. It is about one Android app for a carsharing service, and about what happened to it between June and November 2026.

I’ll leave out the product and the company. The git history is enough to tell the story.

What I inherited

The first commit is from June 2018. I joined in 2025, so for most of the app’s life I wasn’t there, and I only know those years from the log.

The log shows work in waves. There was a busy first year, a rewrite to a version 2.0 in 2022 and 2023, and a push of new features in 2024. Then it went quiet. All of 2025 has 70 commits. By the end of May 2026 the repository held 1,363 commits from a handful of people.

Each wave had left its own way of doing things behind, and none had removed the previous one. On June 1, 2026 the app looked like this:

June 1, 2026
Kotlin source files 494 (about 36,000 lines)
Gradle modules 1
XML layouts 126
Test files 7 (about 1,200 lines)
Tests 47
UI or end-to-end tests 0

It was not an ancient codebase, and it would be unfair to describe it as one. It was almost entirely Kotlin, it used a current dependency injection framework, and about 80 files were already written in Compose. Someone had started every modernization you would want.

None of them had been finished, though. Screens were built in two different ways, depending on the year they were written, and the older way still accounted for 126 layouts. State lived in two different mechanisms, with the older one still in the majority. Nearly every screen inherited from the same two base classes, which had collected everything that didn’t fit elsewhere. The map, which is the main screen of a carsharing app, was run by a single class of more than a thousand lines that the rest of the app reached through a global variable.

And there were 47 tests for all of it. I could read any file in that app. I could not tell you what would break if I changed it.

The first three days

So the first thing we built in June was not a feature and not a refactoring. It was the net. By “we” I mean myself and Claude. Claude wrote all of the code in this series. My part was to decide what gets built, to check every result against how the business actually works, and to accept it or send it back.

On June 2 the repository got a small mock backend. It replays responses that were recorded from the real system and cleaned of personal data, one set per scenario, and it can be told to fail on command, so the tests also cover what the app does on a bad day. A UI test driver then walks through the app like a user would. It logs in, searches for a car, books it, and checks what is on the screen.

On June 3 the first four flows ran green on an emulator in the build pipeline. On June 4 there were thirteen, covering the booking process, and the whole thing was merged.

Two things went wrong on the way, both small and both typical. The mock could not replay any flow that required a login until it also returned the session headers the app expected. And the flows failed on emulators that were set to English, because the app’s main language is German and the tests looked for German text. Neither took long to fix. I mention them because a test setup that has never failed for a silly reason has probably never run.

Three days is the number I’d underline. In the earlier post I wrote that this kind of setup “is now an afternoon”, which was a little generous. It was three days until the booking process was covered. The old price for the same thing was weeks, and that price is the reason this app had gone eight years without it.

The net kept growing after that. There were 52 flows by June 20 and 101 by the end of July.

An audit that was two thirds wrong

On June 5 we ran the first audit. Several agents read the codebase in parallel and looked for stability problems. They came back with 117 findings.

Then a second round of agents got one job: try to disprove each finding. 37 survived.

That ratio has stayed with me for the rest of the project. The 80 that fell away were not nonsense. They were well written, they pointed at real lines, and they sounded like something a careful reviewer would say. They were just not true, or not reachable, or already handled two files further on. If I had taken the first list at face value, two thirds of the work that followed would have gone into problems that did not exist.

The plan that came out of the 37 was modest. It said to get the app stable before any large restructuring: fix the leaks, guard the places that can crash, and work through a ranked list of tests worth writing.

The plan that lasted eight days

On June 10 we wrote a roadmap for the modernization. It was a careful document. It said the old layout system would have to stay for a good while, because 121 of the 126 layouts depended on it. It said screens should move to Compose one group at a time, with never more than one group in flight. Removing the old system was the last item, somewhere in the distance.

Eight days later the old layout system was gone from the build. On June 20 there were 4 XML layouts left.

The roadmap was not badly made. It was written with the instincts of someone who had done migrations by hand, where every screen is a day and every parallel change is a merge conflict waiting for you. Those instincts were correct for ten years. With thirteen, then fifty flows checking the result after every change, many screens could move at the same time, and the careful sequencing turned out to protect against a risk the net had already taken away.

I wrote recently that my knowledge expires in 30 minutes. This was the first time I watched it happen to a plan I had approved the week before. 📉

How the work itself changed

One more thing belongs at the start, because it runs through everything that follows.

In June the work was a constant back and forth. Every step began with a written design and a plan, I explained a lot about how the business works, and each change came back as a small pull request that I went through before the next one started. It felt like working with a very fast colleague who was new to the product.

That did not stay the same. As the tests, the rules and the written-down decisions accumulated, there was less to explain and less to ask. By August a whole weekend of work ran on one instruction: decide, implement, and write down every decision so I can revise it on Monday. I’ll come back to that weekend in part 3. What I can say here is that the autonomy was not a setting I switched on. It grew with the amount of ground truth the repository could offer.

There is a second reason, and it has nothing to do with our repository. The models changed. Most commits carry a line that names the model that wrote them, and over these five months that name changed several times.

Almost all of it was Opus. About nine in ten of those commits name one of its three versions. We tried other setups along the way, for example one where Opus writes the plan and a smaller model carries it out, but most of the time Opus did both the planning and the coding.

250 500 Week of May 4: 8 commits Week of May 11: 2 commits Week of May 18: 5 commits Week of May 25: 8 commits Week of Jun 1: 77 commits Week of Jun 8: 157 commits Week of Jun 15: 229 commits Week of Jun 22: 65 commits Week of Jun 29: 247 commits Week of Jul 6: 148 commits Week of Jul 13: 211 commits Week of Jul 20: 198 commits Week of Jul 27: 124 commits Week of Aug 3: 210 commits Week of Aug 10: 127 commits Week of Aug 17: 152 commits Week of Aug 24: 146 commits Week of Aug 31: 100 commits Week of Sep 7: 304 commits Week of Sep 14: 183 commits Week of Sep 21: 339 commits Week of Sep 28: 521 commits 521 Week of Oct 5: 115 commits Week of Oct 12: 162 commits Week of Oct 19: 214 commits Week of Oct 26: 167 commits Week of Nov 2: 278 commits Week of Nov 9: 168 commits May Jun Jul Aug Sep Oct Nov Model named in the commit trailer Opus 4.8: first seen Jun 5, last seen Jul 23 Opus 4.8 Opus 5: first seen Jul 27, last seen Sep 22 Opus 5 Opus 5.5: first seen Sep 23, last seen Nov 11 Opus 5.5 Fable 5: first seen Jun 11, last seen Jul 22 Fable 5 Fable 5.2: first seen Nov 10, last seen Nov 11 Fable 5.2 Sonnet 5: first seen Jul 22, last seen Jul 24 Sonnet 5
Commits per week in the app's repository. The bands show when each model appears in the commit trailers, which is not the same as its release date.

The busiest week of the whole project, with 521 commits, came right after a model change at the end of September. I would not read too much into that. The same week followed a large audit that I’ll describe later, and the net was at its widest by then. I can’t separate the two effects, and I doubt anyone can from the inside. What I noticed was simpler: with each new model I had to explain less, and more decisions came back already made, and made well.

What this series is not

It would be easy to tell the rest as a success story, and the numbers invite it. Today the same app has 18 modules instead of one, a single XML layout, and 5,824 tests.

It also has eight times as much Kotlin as it did in June, and its largest file is longer than the old map class ever was. The tests have been green on days when the app was broken. Agents have reported bugs that could not happen and worked in the wrong directory three times in one weekend. I’ll get to all of that, because those parts taught me more than the parts that went well.

The next post is about the two riskiest changes of the summer: taking the map class apart, and replacing the logic that tracks a running trip.