When applying oplog entries from a tenant migration, single-phase index builds that get aborted due to some external event, like a replication state transition, perform un-timestamped catalog writes.
Single-phase index builds timestamp the first catalog write to add the index entry here. This uses the onStartIndexBuildSinglePhase OpObserver to generate a timestamp by writing a no-op oplog entry. However, if the index build gets interrupted, it needs to remove the index entry from the catalog by performing another write. Today, this second catalog write is un-timestamped and triggers an invariant.
We'd probably have to do something similar that we do for the first catalog write, by writing a no-op oplog entry to generate a timestamp.