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.

  1. engineering31 min readI 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.
  2. engineering27 min readWhat 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.
  3. testing25 min readHow 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.
  4. reliability10 min readWe 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.
  5. reliability33 min readOur 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.
  6. reliability13 min readA 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.
  7. testing20 min readOne 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.
  8. testing50 min read20 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.
  9. testing13 min read23 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.
  10. engineering16 min read42 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.
  11. reliability19 min readCan 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.
  12. reliability17 min readFreeing 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.
  13. engineering17 min readEleven 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.
  14. testing13 min read67 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.
  15. testing15 min readEleven 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.
  16. architecture19 min readHearso 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.
  17. testing11 min readWe 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.
  18. testing13 min readMy 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.
  19. engineering12 min readTwo 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.
  20. reliability12 min readUptime 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.
  21. testing8 min readLine 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.
  22. testing8 min readOur 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.
  23. architecture11 min read128 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.
  24. architecture12 min readOne 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.
  25. architecture22 min readWe 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.
HearsoHEARSO · LOADING

Loading, 0%

Never goes backwards. Never lies about being done. Under a second on a good day.

ASSETS · STATE · HANDSHAKE
Help improve Hearso

With your permission, we measure how you use Hearso (pages, buttons, your display name, your squad's name and your games) and record sessions and click heatmaps of how pages are used. We never send your first name, last name, email, phone number or passwords to analytics, and recordings hide them. You can change this in Settings after signing in. Hearso also keeps anonymous totals of rounds, players, and live rooms without this permission; see the player guide.