Friday Shipped & Scarred · #20

I Fixed the Same Bug Four Times. My Third Fix Was Part of the Bug.

A value that can't survive its own save isn't well-defined state. It's a rumour about state.

By Marcin Firmuga·2026-08-14·3 min read·Friday Shipped & Scarred #20

I fixed the same bug four times. Fifth time, I found out my third fix was part of the bug.

This week I wanted Scaling Laws to stop pretending it had a market. Until now, release a better model and market share basically snapped into place. Great model on Tuesday? Congratulations, users appeared.

Bad quarter? Apparently everyone forgot you existed by Wednesday. That's not a market but a scoreboard. So I gave it memory.

Shipped

Before this week, a competitor was basically capability + brand + price. Player's model had architecture, purpose, serving economics and more. I was comparing two different creatures and calling it competition.

127 tests on Monday. 214 now.

And then one test refused to die.

Scarred

Save in year 4. Load it. Play through year 5. It has to end exactly like a run that was never interrupted. Because if loading changes the future, your save isn't really a save... It's a photograph of a game that no longer exists. It failed.

I found missing rival state. Fixed it. Still wrong.

Found another. Then another.

For a while numbers looked encouraging: 73.8 -> 75.9 -> 78.3. I thought I was closing in on one root cause. Nope. Separate bugs wearing the same coat.

And the one that kept the test red the longest? I introduced it while fixing the third one. Two dates looked almost identical: the day a rival originally planned to launch, and the day it now intended to. If a lab waits three months for better hardware, one moves. The other doesn't.

My restore code helpfully made them the same.

So every rival that decided to wait forgot that decision after loading and launched on schedule anyway. Beautiful.

Then this: 1.0999999999999999 saved, loaded back as: 1.1

Nobody would ever see the difference. Year five did. A value that can't survive its own save isn't well-defined state. It's a rumour about state.

Useful lesson wasn't about serialization. For three days I measured how far apart the two runs ended up. That told me damage, not cause. Once I started logging the first tick where they stopped agreeing, bugs that took evenings started taking minutes. First disagreement points at the cause. Final number shows the wreckage.

Instrument moment it breaks, not the size of hole at the end.

Driving a taxi by day. Arguing with my own save file by night. Still one red test.

I'm keeping it red until the game deserves green.

GameDevUnityTestingOpenToWork
This is the game behind the post. Scaling Laws is a free AI company tycoon for Windows: January 2022, twelve million dollars, no product. See the game, download it on itch.io or read how it works.
← #19My Writing Landed on Spotify. One Post Reached 14 People#21 →An Unreachable Progression System, 526 Green Tests
MF

Marcin Firmuga

Solo developer · HCK_Labs · building PC Workman and Scaling Laws in public

Every edition is written from that week's real commits. Newest posts premiere on LinkedIn - the archive lives here. More about me: my story.