r/devtools • u/Odd_Transition_1322 • 10h ago
Rebuilding our release system, part 1
Rebuilding our release system, part 1
Our release system had 760 states. We’re rebuilding it with eight.
Pagayo is a one-person company. AI agents write, review, test and release our code, entirely on Cloudflare. This week I stopped all of it.
Not because AI failed at writing code. Because the system around it kept growing. Every problem got a new rule, a new role, a new state. On the day the machine was supposed to get smaller, it grew by 503 lines.
Where we were, and where we’re going:
→ States per change: 760 → 8
→ AI roles around the builder: 9 → 3
→ Release machinery: 143,000 lines → target under 110,000
→ Avoidable standstill: 5 to 19 hours a day → target under 1
→ Tokens per accepted change: 6.6 million → lower, measured weekly
The fix isn’t new. It’s a rule from 2014 by Graydon Hoare, the creator of Rust: “automatically maintain a repository of code that always passes all the tests.” Test each change on top of the current main line. Green: main moves to exactly what was tested. Red: it goes back to its owner, main stays untouched, and nothing else waits. The money checks stay exactly as strict.
The first step already taught us something. When two processes try to move the same main line at once, exactly one lands, every time. Cloudflare Artifacts itself refuses the stale one. It works, but it isn’t documented, so we test it on every change that touches it.
What it means for merchants: what goes live in their shop is first tested exactly as it will run. And if something still goes wrong, the previous version is back within minutes.
The lesson so far: AI will happily keep adding complexity if nobody says stop. That’s still my job.
Next part: the first change that goes all the way to live on the new route.
u/Cloudflare
#AI #AIagents #Cloudflare #Ecommerce #Startups

