Reviewing the committed patch I noted that the "CheckForStandbyTrigger()" after the delay was removed.
If we promote the standby during the delay and don't check the trigger immediately after the delay, then we will replay undesired WALs records.
The attached patch add this check.
Regards,