Thanks for the links to the blogs. I was wondering how it worked and the "How it works" bit on that page said nothing. Nice that they've explained it. It looks like the blog does answer your questions though:
> The interface which Replay uses for the recording boundary is the API between an executable and the system libraries it is dynamically linked to.
As bhackett confirmed, you're right about recording at the system library call level. I wasn't sure if it was more of an analogy or only referred to a version of Replay targeting backend servers written in other languages like Go, especially since the author mentioned hooking into the JS runtime in https://medium.com/replay-io/effective-determinism-54cc91f56.... But it looks like I misunderstood, and their browser product is their generic record/replay library integrated into Firefox, rather than a reimplementation of the same concepts.
> The interface which Replay uses for the recording boundary is the API between an executable and the system libraries it is dynamically linked to.
I assume the ordered locks use a global order.