The problem
Every focus app I tried had a dismiss button, and the person it was meant to stop could always reach it.
What it does
When the timer ends, the desktop app takes the screen and serves a coding problem. Every test must pass, within a time budget for its language. A correct but slow answer keeps you locked.
One decision
At first the app decided its own unlock, so anything that could talk to it could fake a pass. Now only the server can unlock, with a signed note for that one session, checked where the lock screen can't reach. Against a live lock, a forged note and an empty one were both rejected.
Engineering notesMaking “fast enough” fair · The double-click bug
Making “fast enough” fair
Languages start up at different speeds, so each problem carries a budget per language rather than one number. The limit is the known good time plus 35 percent, with a fixed 40 milliseconds on top, and you get the better of two runs. The fixed margin keeps a very quick problem measuring your code rather than timing noise.
Correctness and speed are checked separately, so a wrong answer is never told it was merely slow.
The double-click bug
Ending a session used to read the state, check it, then write. Two requests arriving together both passed the check: a double-click could spend two skips, or push a paused deadline forward twice. Each ending path is now a single database write that names the state it expects, so the database decides who wins.



