November: The Crash That Went Around My Rules
The short version
I wrote rules to keep names out of Chalky's crash reports, and they passed every test. The first real crash on my phone went right around them.
If you've ever set up a filter, you know the feeling. You write the rule, you test it, it passes, and you stop thinking about it. The question nobody asks is whether everything actually goes through the filter.
That was my November with Chalky, the darts app. It was a big month for it: six test builds, a way to import your darts league, and the first crash reports. The crash reports are the part worth writing about.
WHAT I TESTED WHAT A HARD CRASH DOES
app hits an error app dies outright
| |
v v
my cleaning rules Sentry's own iPhone code
(names, emails, IDs out) writes the report, with
| its own trail of screen
v titles
Sentry |
v
Sentry
(never touches my rules)What I wanted
When Chalky breaks on someone's phone, I want to know about it. I picked Sentry's free plan on 25 November. A short report goes out: what broke, where in the code, which iPhone. The player sees nothing.
The catch is that a darts app is full of names. Your friends, your league, the tournament you named after the bar. So everything personal had to stay out. The rules for that live in one file: emails, account IDs and sign-in tokens get cut, screens are listed by pattern (a player's card, never which player), and no user is ever attached. Those rules run on made-up reports every time the code changes, and they pass.
What the real crash showed
On 25 November, on build 44, I sent a test report from my own iPhone and then a test crash, the kind where the app just dies.
The test crash came back with entries I'd never written. Screen titles: "Home", "Settings", "Find Boards".
Here's the mechanism. When the app hits an error but keeps running, the report passes through my rules on the way out. When the app dies outright, Sentry's own iPhone code writes the report and sends it the next time Chalky opens, and it never passes through my rules. That code keeps a trail of its own: every screen by its title, taps, system events. It's like checking IDs at the front door while the kegs come in through the back.
Those three titles were fixed words, so nothing personal went out. But three screens in Chalky put typed words in their title: another player's card, a tournament and a quick bracket. A hard crash right after opening one of those could have sent a name.
The part I don't love: my own notes said the iPhone side only holds the trail my rules had already cleaned. That was a guess. Sentry's page on what it collects doesn't mention screen titles, and I read the silence as a no.
A rule only protects what passes through it. A real phone shows you what goes around it.
The fix, and what isn't proven
Build 45 switches that trail off. Screens still show up, by pattern, from the side my rules can see. A check now fails if anyone turns the switch back on.
What I can't say yet is that it works. The switch is read by Sentry's prebuilt iPhone code, which I can't open. The proof is the same test crash on build 45, with a league, a named tournament and someone's player card opened first. That test hasn't been run.
What the build 44 test did prove: no IP address and no location in any of the three reports.
The rest of November
Chalky's ghosts got closer to real. I held out each player's last three league nights and played their ghosts against what really happened: 27 players, 233 Cricket legs. The ghosts were slow, about 70 darts a leg against 60 for real people. After the fixes it's 60.9 against 59.9.
The bots were off by two points. Since build 38 a bust counts as three darts, so the Beginner and Intermediate bots really averaged about 22 and 28.8 at 501 while their cards said 24 and 30. One number changed per bot, and over 100,000 simulated games each they average 24.01 and 30.00 again.
This site got rebuilt to a style guide, with headings in my own font and twelve hand-drawn icons. The status icon is a pint glass.
Crawler Manager had 572 commits, more than everything else combined, before its code work moved to my PC on 15 November. One number stuck with me: of 460 gear swaps the game's own rating called an upgrade, 14.3% made the crawler win fewer fights. A better rating is built and still switched off.
Where it stands
Build 45 is on TestFlight. The next thing I do with it is crash it on purpose, with a league, a tournament and someone's card open first, and read every line of the trail.
Brian Franke
brian@coasterlogic.com