Writing
Notes on building Hearso, the product decisions and the engineering ones, written as they happened. Every number in them comes from a run we can point at.
- I built a small software factory. Here is how it works and where it failedI set up a small software factory on an open-source project, added gates to it and ran it 47 times in six days. Its gates caught six real faults and raised five false alarms. Thirteen of the fifteen cleanup runs that passed every gate had still left tests asserting less.
- What does it cost to turn on TypeScript's strictest flags?I estimated 200 type errors and got 4,189. I planned six slices and merged 54 pull requests. I cleared two compiler flags twice. This is the whole release, with the numbers and the mistakes.
- How a lint autofix can change what your tests check without failing oneA dry run said 203 test files had problems a linter could fix for us, so I scheduled three slices of work around one command. Then I ran that command on a single file, and the plan did not survive it.
- We gave an AI assistant read-only access to our ops stack. Its best answer was 'I can't tell'When Hearso breaks, the evidence is scattered across five tools. I wanted an AI assistant that could read all of them and change none of them.
- Our load test found a real bug, and briefly inflated our own statsAt 00:40Z on 2026-09-28, our load test signed in 25 test hosts at once, and 25 rooms came out the other side as if guests had made them.
- A join that took 11 seconds, and the retry that locked players outOn 2026-09-26, one run of our browser tests failed with a guest stuck on the play page. They had pressed Join, and nothing happened.
- One database round trip was 17% of our median answerOn 2026-09-23, our WebSocket game service took a median of 3.7 seconds to confirm a player's answer. 22 of 41 answers got no reply at all within the client's 10-second limit.
- 20 failures in one morning, and not one was caught by a unit testBetween 02:10Z and 14:50Z on 2026-09-27 we shipped two releases, wired our real-time services into Grafana Cloud, and put keys on our leaderboard API. On the way, 20 things went quietly wrong.
- 23 pull requests passed review. The branch they made had three bugsTwenty-three pull requests passed review one at a time. The branch they built together still had three bugs, and none of those reviews was placed to see them.
- 42 write routes trusted SameSite=Lax, which trusts the whole siteForty-two write routes relied on one cookie attribute to keep other pages out. The attribute was doing a different job from the one we thought.
- Can two real-time services share one small VPS?Our Rust WebSocket service and our Kafka relay now live on one rented server with 2 vCPUs, 8 GiB of memory, and two neighbours we didn't put there.
- Freeing port 8080 shut down Docker, and 28 containers with itOne browser test out of seven came back 503 at 10:56Z. The code had not changed; the machine had, at 10:00:01Z, on a schedule I set two months earlier and forgot.
- Eleven route files compared Origin with an address nobody sentA browser check wanted 401 and got 403. The value our handlers compared against was not the address the browser had asked for.
- 67 live checks passed a page with two navigation barsEverything I could think of ran before I asked anyone else to look. It still missed the thing a fresh reader saw in under eight minutes.
- Eleven checks gave a verdict without looking. Four were mineA smoke alarm with a dead battery is silent in exactly the same way as a house that isn't on fire. In one night of release checks we found eleven that gave a verdict without looking, ten of them silently green, and four of them were mine.
- Hearso answers still ride a 1.5-second poll. Here's the socket pathA player taps an answer, and four other screens have to agree on what just happened. In Hearso's production games they find out by asking: every open page polls the server every 1.5 seconds.
- We broke our scripts 51 times. The real bugs were where we didn't lookA test that passes the moment you write it is unproven. So on 2026-09-18 we spent a night breaking our own scripts one line at a time, to find out which tests could actually fail.
- My soak runner said FAIL at minute 30. The service was fineAt minute 30 of a two-hour soak, my runner posted a progress entry listing nine failed conditions. The service was healthy, and the run was stopped at minute 38 anyway.
- Two coding agents shared one file for a night. It taught us 7 rulesI set two coding agents working overnight on two halves of one system, and gave them a single file to talk through. By morning that file recorded a lost lock, a kill signal sent to a process in the middle of a git rebase, and 3,200 junk rooms.
- Uptime Kuma dropped our login, and I was wrong about why three timesA monitoring check kept failing for exactly ten seconds and telling us nothing. Getting to the bottom of it took three wrong answers and one prediction written down in advance.
- Line coverage said we were done. Mutation testing disagreedThe four modules we were most afraid of score 100% under mutation testing. The three handlers we actually ship score 56%, 70% and 76%, and line coverage never hinted at it.
- Our benchmark passed at 239 ms p95, and we threw it awayOur first leaderboard benchmark passed with a p95 of 239 ms and zero errors. I threw it away anyway, because nobody could run it again and get the same experiment.
- 128 counters cap what a deep rank costs to read, not to writeOur rank query stops counting at 2,000 and falls back to 128 log-spaced counters. That bounds what a rank read costs. It does nothing for writes, and an earlier draft of mine said it did.
- One score is 11 writes, and our cost estimate lost its workingOne score submission does not cause one write. In our leaderboard's merged code, one accepted score writes 11 items and makes 3 strongly consistent reads.
- We store scores backwards, so the top 25 is one read and no sortReading the top 25 of our leaderboard is one query with no sorting anywhere, because the sort key stores every score inverted.