Wednesday Code Autopsy · #16

An Optimizer's Most Important List Is Not What It May Touch

It is what it must never touch.

By Marcin Firmuga·2026-07-08·5 min read·Wednesday Code Autopsy #16

Last week, I almost froze my own computer to death.

Best month of my life as a developer. PC Workman is on the Microsoft Store. HackerNoon approved my story about it, and it got picked up for the Decentralize AI Hackathon by Nosana and Arweave. I still catch myself grinning at my desk like an idiot.

Let me tell you about the scariest bug I caught all year, because I caught it on myself, on purpose, before it ever reached you.

PC Workman can suspend idle apps to free resources. One function does it: sleep_app. Give it a process, it freezes it. It had exactly one safety rule: never touch an anti-cheat. But that was the only rule.

I was stress-testing before a Store update, 100% CPU, full RAM, hours-long sessions, when my screen went white and stayed white. Total freeze. Restart to recover.

The optimizer had done its job a little too well. sleep_app was perfectly happy to freeze dwm.exe, the process that literally draws your screen. White. Forever. explorer.exe, your taskbar and desktop. Gone. And PC Workman itself, the app suspending its own process, hanging the hand that feeds it.

App Hibernation fires at about 15 minutes. That is exactly when it hit. The optimizer had been quietly walking toward the one process you cannot live without.

The fix is not scattered if statements

It is one guard every process action already calls, taught two new truths:

One list. Four features hardened at once: hibernation, TURBO, RAM flush, the overlay.

The scary part: it passed every test I had, because my tests never told it to freeze dwm.exe. You do not write a test for the thing you did not know you had to protect.

An optimizer's most important list is not what it is allowed to touch. It is what it must never touch.

Catching the white screen on my own desk, at 100% load, beats catching it in a Store review every time.

BuildInPublicPythonWindowsTesting
This is the project behind the post. PC Workman is a free, open-source Windows system monitor with an offline AI assistant - everything described here is real, shipped code. Download it or read the source.
← #15It Is Live on the Microsoft Store
MF

Marcin Firmuga

Solo developer · HCK_Labs · building PC Workman 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.