In the next diff, I am going to change the way target_message is handled. Looking at the code and in history, when target_message was introduced, it was mainly for getRelatedMessages query (stack ending with D12737).
To be able to test it somehow, I decided to first implement detailed tests on how target_message is utilized - I used Claude code for this, and it did a surprisingly good job.