Just Write a Test for It
Published on: 2025-05-19 13:54:21
This is a short appreciation post about Rust continuously guiding me towards doing The Right Thing™.
Google Summer of Code 2025 is just around the corner, which means that a bunch of new contributors started sending pull requests to various Rust projects. One of the most popular projects seems to be bors, a from-scratch implementation of a merge queue bot that we aim to use to manage pull requests in the main Rust compiler repository.
In the past couple of weeks, I have reviewed and merged tens of PRs in bors. Sadly, soon after I figured out that some of them broke the (staging) deployment of the bot. This was quite annoying, because I was deliberately trying to design the bot, tests and CI so that something like this shouldn’t happen. In practice, we would probably detect this issue in the staging environment, so it hopefully wouldn’t reach production, but it’s still a situation that I would like to avoid as much as possible.
After investigating for a bit, I realized that the issue
... Read full article.