Does your code call ANY API entry points after submitting the test? The cancelled message should only ever appear if the test was successfully submitted but then the cancelTest.php API was called (or the test was cancelled in the UI).
Can you send me an email with the exact runtest.php URL you are requesting (including the test URL and API key)? You should be able to manually plug it into a browser and see if your script is performing the same way as the browser.
Do you have a bot or something that may be scraping the progress HTML and accidentally pushing the cancel button?
For 120912_8C_CSS I see a call being made to cancelTest.php shortly after a load of the result page from what looks like a private showslow instance (like 9 seconds after getting to the progress page).
The button is in a form so a normal bot shouldn’t trigger it.