At first I thought the new ratchet key is created with each first incoming message. After that I believed it depends on the implementation. But after closer look at the signal documentation and following picture, I am left even more confused.
The picture above shows Alice sending message A2 and after that receiving message B2 from Bob, which uses his old key. How is this possible? Shouldn't Bob update his key on receiving Alice's A2 message. Message A2 features a new ratchet key, and should trigger DH ratchet on Bob side and update his Receiving and Sending chain, thus his next message (B2) would use a newly created key?
What I am missing here?