A long time ago, I explained how to draw arrows for open and closed immersions in tikz-cd. Back then I already mentioned that my solution is not completely satisfactory. Yun Hao took up the challenge, and significantly improved my implementation.

His example produces the following result

Observe that the position of the circle will be perfect in each font, whereas my solution was greatly font-dependent on how good the result was.

Many thanks to him for letting sharing his code!