Field notes · 17 Oct 2026
The run that played into the void
A player left a tab open for ten hours, came back, and drummed a whole run that scored nothing. Field notes on dead WebSockets — and why the fix lives in the start button, not the reconnect handler.
The bug arrived as a database row with a shape we'd seen before. One session: joined
at 08:44 in the morning, run_started at 18:21 in the evening, zero taps
stored, never finished. Someone opened OneDrum with their coffee, did something else all
day, came back after work and played. Almost certainly played well — and the
engine recorded none of it. No tap acknowledgements, no crowd lights, no end card.
From the player's side, the game simply declined to notice them.
Dead sockets die quietly
Between those two timestamps the laptop slept, or the WebView was backgrounded, or
the browser decided an idle connection wasn't worth keeping — any of them kills the
WebSocket that carries taps to the referee. The treacherous part is what happens next:
nothing. A dead socket doesn't throw when you talk to it; our send()
checks the connection state and quietly does nothing, which is correct behaviour and a
perfect trap. Every tap of a ninety-second run, swallowed without a sound. We found the
same database signature on a cluster of Android runs from July — tabs that had drifted
to the background and come back, playing into the same void.
For most games this is an annoyance. For OneDrum it's close to a broken promise: the whole point of server-certified scoring is that the referee actually witnesses the performance. A referee who stopped listening ten hours ago must not be mistaken for one who watched you miss.
The fix lives in the start button
The obvious repair — reconnect the moment the socket drops — is the one we didn't ship. A tab idling on the start screen can drop its connection over and over all day, and an eager reconnect would mint a fresh participant on the server for every drop, for a player who may never tap at all. So a drop on the start screen stays silent by design. The repair happens lazily, at the only moment it matters: when the player hits start. Before the clip is allowed to begin, the engine checks the socket and, if it's dead, re-joins the same session — picking up a fresh token too, since the old one has usually aged out by then — and waits for the new connection to open. A run can no longer begin on a socket that would swallow every tap.
Mid-run is the opposite trade
A socket that dies during a run gets the opposite treatment: one immediate, silent reconnect on the same token. The server-side room — the Durable Object that scores the run — still holds the participant and every point they've earned, so a resume loses nothing; the player sees at most a missed crowd-light. Each successful welcome from the server re-arms that one-shot retry, so a flaky connection gets a fresh chance per recovery rather than one chance per run.
And if the silent resume fails too? Then we tell the player — the "connection lost" toast, reload to rejoin. That fallback looks timid next to the machinery above it, but it's the honest move: the one repair that would always "succeed" at that point is a fresh join, and a fresh join means a fresh participant with a score of zero. We'd rather interrupt a run than quietly erase one. The rule that fell out of the fix is almost a design principle: reconnect silently where silence costs the player nothing; speak up the moment a repair would cost them something.
Verified the unglamorous way — killing sockets by hand in a real browser: dead socket on the start screen, press start, full run, end card; socket killed mid-play, same participant resumes, acknowledgements flow, final score lands. The referee stays in the room for the whole performance now. That's the least a referee can do.
Hear it for yourself — the drum calls, you answer: onedrum.io
How the referee scores what it witnesses — the audible clock, silent calibration, anti-spoof — is in the white paper and the dance-contest explainer. この記事の日本語版はこちら。 · More field notes