Upvote:1
You don't exit and re-enter the CTA; rather Ireland's application of the regime doesn't involve an open air/sea border with the UK, and Ireland processes arrivals from the UK separately (if arriving from Northern Ireland, non-EU/EFTA citizens are to report their entry)
In your example (PEK-DUB-EDI), passengers would either disembark at DUB for border control and re-board, or clear immigration at EDI. In the latter case, AFAIK British/Irish citizens travelling DUB-EDI could still use e.g. a driving licence and birth/naturalisation certificate to prove nationality