message: Issue Implement storing and comparing last op to increase coverage for data loss / data overwrite scenarios
  Closes
diff: @@ -1290,8 +1290,9 @@ export class DeltaManager
  // We only extract the most obvious fields that are sufficient (with high probability) to detect sequence number
  // reuse.
  // Also payload goes to telemetry, so no PII, including content!!
  + // Note: It's possible for a duplicate op to be broadcasted and have everything the same except the timestamp.
  private comparableMessagePayload(m: ISequencedDocumentMessage) {
  - return `${m.clientId}-${m.type}-${m.minimumSequenceNumber}-${m.referenceSequenceNumber}`;
  + return `${m.clientId}-${m.type}-${m.minimumSequenceNumber}-${m.referenceSequenceNumber}-${m.timestamp}`;
  }
  private enqueueMessages(
  @@ -1316,6 +1317,9 @@ export class DeltaManager
  this.updateLatestKnownOpSeqNumber(messages[messages.length - 1].sequenceNumber);
  }
  + const n = this.previouslyProcessedMessage?.sequenceNumber;
  + assert(n === undefined || n === this.lastQueuedSequenceNumber);
  +
  for (const message of messages) {
  // Check that the messages are arriving in the expected order
  if (message.sequenceNumber <= this.lastQueuedSequenceNumber) {
  @@ -1448,7 +1452,7 @@ export class DeltaManager
  /**
  * Retrieves the missing deltas between the given sequence numbers
  */
  - private fetchMissingDeltas(telemetryEventSuffix: string, from: number, to?: number) {
  + private fetchMissingDeltas(telemetryEventSuffix: string, fromArg: number, to?: number) {
  // Exit out early if we're already fetching deltas
  if (this.fetching) {
  return;
  @@ -1459,6 +1463,21 @@ export class DeltaManager
  return;
  }
  + assert(fromArg === this.lastQueuedSequenceNumber, "from arg");
  + let from = fromArg;
  +
  + const n = this.previouslyProcessedMessage?.sequenceNumber;
  + if (n !== undefined) {
  + // If we already processed at least one op, then we have this.previouslyProcessedMessage populated
  + // and can use it to validate that we are operating on same file, i.e. it was not overwritten.
  + // Knowing about this mechanism, we could ask for op we already observed to increase validation.
  + // This is especially useful when coming out of offline mode or loading from
  + // very old cached (by client / driver) snapshot.
  + assert(n === fromArg, "previouslyProcessedMessage");
  + assert(from > 0, "not positive");
  + from--;
  + }
  +
  this.fetching = true;
  this.getDeltas(telemetryEventSuffix, from, to, (messages) => {
  