BetterFit's iOS workout test timed out waiting for the app to come to the foreground. The old helper returned an empty string both when the driver reported no package and when the driver call threw. By the time the test failed, both paths looked identical.
I changed the launch helper to count successful queries, keep the last package it saw and keep the last query error. A successful response with no package still counts as a successful query. A later error keeps the previous package available for the timeout message.
The first simulator attempt after the change recorded 49 successful queries, last saw com.apple.springboard and recorded no query error. The test passed on its first retry in 23 seconds, and the runner marked it flaky. The first attempt's output showed that the driver was answering and had yet to report BetterFit in the foreground. The cause of the first-launch flake is still under investigation.