Skip to content

Validate ResendRequest sequence ranges before replay #790

Open

Description

@hiohiohio

ResendRequest handling does not fully validate BeginSeqNo(7) and EndSeqNo(16) before processing the requested range. Invalid requests can produce no response or an invalid GapFill instead of a Reject. Malformed integer values are also reported as missing fields.

For example, with NextSenderMsgSeqNum = 11:

BeginSeqNo EndSeqNo Problem
0 0 Invalid starting sequence number
-1 10 Negative starting sequence number
7 -1 Negative ending sequence number
10 7 Reversed finite range
11 0 Range starts at an unsent sequence number

Expected behavior

  • Distinguish missing required fields from malformed integer values.
  • Reject nonpositive starting numbers, negative ending numbers, and reversed finite ranges.
  • Reject ranges starting at or beyond NextSenderMsgSeqNum() as an explicit engine policy.
  • Interpret open-ended requests according to the FIX version:
    • EndSeqNo=999999 for FIX 4.0–4.1.
    • EndSeqNo=0 for FIX 4.2 onward.
    • Treat 999999 as a finite endpoint in FIX 4.2 onward.
  • Preserve valid single-message requests and the existing behavior of clamping the end to the last sent sequence number.
  • Send a Reject without replaying messages or generating a GapFill for invalid requests.

Reject handling must also preserve inbound sequencing. When a rejected ResendRequest has an out-of-order or duplicate MsgSeqNum(34), it must not advance NextTargetMsgSeqNum(). Otherwise, an unprocessed inbound message can be skipped.

Scope

This issue covers ResendRequest input validation and the associated Reject sequencing.

The following are outside its scope:

  • Common integer-parser overflow detection.
  • Initiating inbound gap recovery after servicing an out-of-order ResendRequest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions