5) try to run pg_ctl promote while the server is in archive restore 6) it will block until timeout, and not promote until restore_command exits abnormally
On what basis are you considering this a bug? Or, IOW, what do you expect to happen? It doesn't seem possible for the promotion to actually happen as the server knows additional WAL must exist that it hasn't yet restored since all attempts to restore WAL have succeeded.