Skip to content

fix(websocket): bound missing message gap tracking - #2120

Open
AntonBelousovWEB wants to merge 1 commit into
dydxprotocol:mainfrom
AntonBelousovWEB:anton/fix-websocket-gap-tracking
Open

AntonBelousovWEB wants to merge 1 commit into
dydxprotocol:mainfrom
AntonBelousovWEB:anton/fix-websocket-gap-tracking

Conversation

@AntonBelousovWEB

Copy link
Copy Markdown

Summary

  • cap missing WebSocket message tracking at 1,000 IDs
  • trigger resync immediately when the cap would be exceeded
  • clear pending timers and invoke the timeout handler only once
  • add regression coverage for sequential messages, late arrivals, cleanup, and oversized gaps

Testing

  • pnpm vitest run src/bonsai/websocket/lib/__test__/missingMessageDetector.test.ts
  • pnpm eslint src/bonsai/websocket/lib/missingMessageDetector.ts src/bonsai/websocket/lib/__test__/missingMessageDetector.test.ts
  • pnpm tsc --noEmit

@AntonBelousovWEB
AntonBelousovWEB requested a review from a team as a code owner September 2, 2026 15:16
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

@AntonBelousovWEB is attempting to deploy a commit to the dYdX Trading Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant