Given a change (and the changeset it's part of), this routine will load the push encoder for the foreign replica's type and call integrate_change on it.
To avoid publishing prophet-private data, It skips any change with a record type that record_type starts with '__'.
This is probably a bug.
Walk the set of transactions on the ticket whose id you've passed in, looking for updates by the 'current user' which happened after start_time and before now. Then mark those transactions as ones that originated in SD, so we don't accidentally push them later.
Record that this replica was the original source of $foreign_transaction_id (with changeset $changeset)
Given a transaction id, will return true if this transaction originated in Prophet and was pushed to the foreign replica or originated in the foreign replica and has already been pulled to the Prophet replica.
This is a mapping of all the transactions we have pushed to the remote replica we'll only ever care about remote sequence #s greater than the last transaction # we've pulled from the remote replica once we've done a pull from the remote replica, we can safely expire all records of this type for the remote replica (they'll be obsolete)
We use this cache to avoid integrating changesets we've pushed to the remote replica when doing a subsequent pull
lookup the uuid for the remote record id. If we don't find it, construct it out of the remote url and the remote uri path for the record id;
When pushing a record created within the prophet cloud to a foreign replica, we need to do bookkeeping to record the prophet uuid to remote id mapping.