Skip to main content

Module conformance

Module conformance 

Source
Expand description

Output checks for the order book stream contract.

BookStreamChecker consumes the [OrderBookDeltas] an adapter emits and rejects the first batch that breaks the contract:

  • Every batch ends with F_LAST; an earlier F_LAST ends an event group inside the batch, and each group is checked on its own, as the DataEngine publishes them.
  • A snapshot group starts with Clear, continues with Add deltas, and flags every delta F_SNAPSHOT; an empty snapshot is a lone Clear.
  • An incremental group carries no F_SNAPSHOT and no Clear, and follows a snapshot.
  • Sequences increase within a snapshot episode when the checker requires it.
  • The maintained book stays consistent, and a closed book emits nothing.

Harnesses compare the maintained book with venue truth through BookStreamChecker::verify, which also counts verified episodes so a run can require every recovery to be checked.

Structs§

BookStreamChecker
Checks adapter order book output against the book stream contract.

Enums§

BookContractViolation
A batch or book state that breaks the order book stream contract.