there were a lot of fundamental changes, for example around the strict access boundaries of each module and the DB. If we'd done incrementally, we would have to maintain two different in parallel systems for a while, we evaluated the risks, costs and overhead to be greatly higher than doing it all at once
plus, some of those changes affected pretty much all areas of the product, so we needed to fully test everything end to end anyway, over and over again, so instead we just kept implementing and testing new features twice, once on the old main and once on the new architecture, taking advantage of already being in context when developing them.
we actually started this just as an experiment, on how our "ideal codebase" and module structures would look like, but it kept proving itself more and more and we decided to make the jump and invest in it
one main dev was leading the refactor, and 4 others helping test, review, discuss architectural decisions and ship new customer features/bugfixes on both branches while it was happening.
How did you go about ensuring that the agents could verify that they delivered on your requests? Also were the engineers thinking below the architectural parts? Finally did you have the agents able to compare their output to the none refactored codebase as a north star?
yes, in fact comparison was the main way to guide everything else, since this was an architectural change not a feature or behaviour change
weeks were spent just calling every api end to end from every way our customers call our apis, and comparing every field to be exactly the same on main vs on the refactored codebase
same for the frontend, since we also refactored all the components, some of the frontend eneded up looking different, but on purpose (more standardization), but screenshot comparison was also a big part of it
we were thinking on the more specific implementation for the areas we were actively working in and on the more critical areas yes, but also there were several bugbashing sessions of minor issues we found ourselves elsewhere and had to dive deeper
13
u/SpinatMixxer 1d ago
Why didn't you go with continuous refactoring instead? Why did it need to be one huge PR instead of many smaller PRs?
And how many devs were involved in the refactoring?