Twenty-One Tasks and the Bugs at the End
On November 24th we merged a change to Telekin that moves where every catalog lives. That makes it a large database migration, and those are about the scariest projects you can run on a codebase, because you’re moving people’s data while they’re using it and the old code and the new code have to share it for the whole rollout.
What changed
Until now, everything in Telekin lived in one database, accounts and keys right next to every catalog (the collections of notes your AI apps read and write). That works for a while, but one database only grows so far, and some companies want their data kept apart from everybody else’s. The milestone we called “catalog stores” splits it up: account data stays where it was, and catalog data lives in stores, separate databases that a catalog gets placed on.
The plan broke the work into 21 tasks. AI agents wrote the code, one pull request per task, and Brooke, the review bot I run on my repositories, reviewed every one of them. A task only merged once Brooke had reviewed its latest version, every comment she left had a reply and was resolved, and the tests passed. Rather than landing each task on the main branch as it finished, they all went into a milestone branch, so the whole thing could go to main as one change at the end.
Brooke caught plenty along the way. One task’s schema change would have held a lock on a table for as long as its data update ran, and anything that needed that table would have sat there waiting. Another added the code that writes a new kind of half-made row in the same change as the code that knows to ignore it, and during a rolling deploy the old servers wouldn’t have known to ignore it. That one got split into two pull requests.
The last review
With all 21 tasks merged, I opened the pull request that takes the milestone to main, and Brooke reviewed that too. She scored it a 45 out of 100.
I freaked the hell out. What was wrong?! The milestone had been cooking for over two days, and 20-some tasks in, it felt like anything that could possibly be wrong had to be behind us, and yet she’d found two bugs that none of the task reviews had caught, and the worse of them was about drafts. Once catalogs live on separate stores, a draft’s number is only unique inside its own store, but a cache was still treating it as unique everywhere, which meant that with two or more stores, an unpublished draft from one catalog could have shown up in someone else’s. The other let one store that was down hold up cleanup for all the others.
I fixed both before merging, and then her next two reviews turned up more that only happen with several stores: adding a store under a name that was already taken did some of its work before it refused, and recovery could wait forever on a store that stalled instead of failing outright. After that the milestone merged, went live on staging that evening, and is in production now.
Fixing all four inside the milestone, instead of merging and filing follow-ups, was a judgement call, and on another day I might have gone the other way. I like keeping a milestone’s changes together in one branch, because then I can reason about what changed as one thing, even if it’s harder to rip one piece back out later. The drafts one settled it for me, though. I genuinely care about your data, and I wasn’t going to let that bug anywhere near main.
If there’s enough interest, maybe a technical writeup will follow.
Start 30-day trial See features Ask us a question