I just r+'ed a patch to improve this :) Note even with that patch it's possible this will still happen. We could replace with a pending/running task, and then it could fail after the fact. But at least the patch in that bug should stop us from replacing with a task that failed.
Bug 1677142 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I just r+'ed a patch to improve this :) Note even with that patch it's possible this will still happen. We could replace with a pending/running task, and then it could fail after the fact. But at least the patch in that bug should stop us from replacing with a task that has already failed.