message: Fix gaps in scribe procotol handler if pending messages was empty
diff: @@ -134,18 +134,19 @@ export class ScribeLambda extends SequencedLambda {
  continue;
  }
  - const lastSequenceNumber = this.pendingMessages.peekBack()?.sequenceNumber ?? this.sequenceNumber;
  + const lastProtocolHandlerSequenceNumber =
  + this.pendingMessages.peekBack()?.sequenceNumber ?? this.protocolHandler.sequenceNumber;
  // Handles a partial checkpoint case where messages were inserted into DB but checkpointing failed.
  - if (value.operation.sequenceNumber <= lastSequenceNumber) {
  + if (value.operation.sequenceNumber <= lastProtocolHandlerSequenceNumber) {
  continue;
  }
  - // Ensure sequence numbers are monotonically increasing
  - if (value.operation.sequenceNumber !== lastSequenceNumber + 1) {
  + // Ensure protocol handler sequence numbers are monotonically increasing
  + if (value.operation.sequenceNumber !== lastProtocolHandlerSequenceNumber + 1) {
  // unexpected sequence number. if a pending message reader is available, ask for those ops
  if (this.pendingMessageReader !== undefined) {
  - const from = lastSequenceNumber + 1;
  + const from = lastProtocolHandlerSequenceNumber + 1;
  const to = value.operation.sequenceNumber - 1;
  const additionalPendingMessages = await this.pendingMessageReader.readMessages(from, to);
  for (const additionalPendingMessage of additionalPendingMessages) {
  