R337 End a wait as soon as what you wait for fails
When you wait for something to finish, such as a process, a CI run or a merge, end the wait not only when it succeeds but also as soon as it fails, errs or can no longer finish, instead of waiting out a time limit.
Reason
A wait that ends only on success goes on after what it waits for has failed: the work that depends on it stands still, and the wait holds resources for nothing until a time limit runs out or someone notices (Art. II §6(1)).
Verification
What is waited for has failed, erred or can no longer finish when, for example, the process exits with an error or is gone, the CI run fails or is cancelled, or the pull request is closed or its merge is refused. Ending the wait means going on with the work, such as handling the failure or reporting it.
Violated when a wait an agent runs, itself or through a loop it wrote, goes on after what it waits for has failed, erred or can no longer finish, where the state of what it waits for (such as the process’s exit status, the CI run’s conclusion or the pull request’s state) already shows it.