Skip to content

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

Closed
antonbelous0v wants to merge 1 commit into
dydxprotocol:mainfrom
antonbelous0v:codex/fix-websocket-gap-tracking
Closed

antonbelous0v wants to merge 1 commit into
dydxprotocol:mainfrom
antonbelous0v:codex/fix-websocket-gap-tracking

Conversation

@antonbelous0v

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

@antonbelous0v
antonbelous0v requested a review from a team as a code owner September 2, 2026 15:01
@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.

@antonbelous0v
antonbelous0v deleted the codex/fix-websocket-gap-tracking branch September 2, 2026 15:15
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