Skip to content

fix: surface websocket and feed hygiene issues#870

Merged
realfishsam merged 6 commits into
mainfrom
fix/audit-websocket-feed-hygiene
Jun 8, 2026
Merged

fix: surface websocket and feed hygiene issues#870
realfishsam merged 6 commits into
mainfrom
fix/audit-websocket-feed-hygiene

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Log previously swallowed websocket close/parse/connect errors across Gemini Titan, Kalshi, Opinion, and Polymarket US
  • Avoid per-message array/object allocations in Opinion and Binance/Chainlink feed paths
  • Make Gemini Titan orderbook level matching exact instead of tolerance-based

Validation

  • git diff --check

Fixes #811
Fixes #719
Fixes #275
Fixes #678
Fixes #679
Fixes #727
Fixes #809
Fixes #810
Fixes #812
Fixes #686
Fixes #687

@mintlify

mintlify Bot commented Jun 5, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
PMXT 🟢 Ready View Preview Jun 5, 2026, 2:22 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: FAIL

What This Does

Surfaces websocket/feed hygiene failures more explicitly instead of silently masking unsupported or malformed feed/websocket states.

Blast Radius

Several exchange websocket adapters plus Binance/Chainlink feed code and SDK API references.
Changed files reviewed: core/api-doc-config.generated.json, core/src/exchanges/gemini-titan/websocket.ts, core/src/exchanges/kalshi/websocket.ts, core/src/exchanges/opinion/websocket.ts, core/src/exchanges/polymarket_us/websocket.ts, core/src/feeds/binance/binance-feed.ts, core/src/feeds/chainlink/chainlink-feed.ts, sdks/python/API_REFERENCE.md, sdks/typescript/API_REFERENCE.md

Consumer Verification

Before (base branch):
Base branch (origin/main) does not include these changes. I reviewed the diff against the base and did not run full live-exchange before/after reproduction in this daily batch.

After (PR branch):
PR branch build PASS; authenticated local sidecar smoke PASS using POST /api/mock/fetchMarkets with x-pmxt-access-token, response snippet: {"success":true,"data":[{"marketId":"mock-m0","eventId":"mock-event-0","title":"Which party wins the 2026 harborland election?","description":"incididunt magna metus ut cupidatat aliquip dolore quis incididunt id do aenean aenean non dolor dolore tempor pharetra lorem fugiat aenean est voluptate ...

Test Results

  • Build: PASS (npm run build --workspace=pmxt-core)
  • Unit tests: PASS (npm test --workspace=pmxt-core -- --runInBand)
  • Server starts: PASS
  • E2E smoke: PASS (POST /api/mock/fetchMarkets; live venue-specific calls were not made)
  • Dependency install: skipped (existing workspace deps reused)

Findings

  1. Generated/API-doc artifacts changed without an obvious source/generator change; verify these are regenerated outputs, not hand edits. Files: core/api-doc-config.generated.json

PMXT Pipeline Check

  • Field propagation (3-layer): N/A
  • OpenAPI sync: N/A
  • Financial precision: OK
  • Type safety: OK
  • Auth safety: N/A

Semver Impact

patch -- bug fix/internal compatibility change unless SDK consumers rely on newly added APIs

Risk

The branch was built, core-tested, and authenticated-smoke-tested through the sidecar. Full live-exchange before/after behavior remains unverified for this daily batch; credentialed venue calls and venue API drift should be treated as residual risk unless covered by tests in this PR.

@realfishsam realfishsam merged commit bb341da into main Jun 8, 2026
12 checks passed
realfishsam added a commit that referenced this pull request Jun 8, 2026
Covers everything between 2.48.6 and HEAD plus the hosted-trading-mode
work on this branch — Added (7 bullets: hosted trading mode end-to-end,
Escrow namespace, hosted error hierarchy, 2 e2e drivers, 87 new
dispatch + error-mapping tests, feed listing surface), Changed (9
bullets: SDK 2.18.0 version bumps, new model fields, drift parity
sweep, dep refreshes), Fixed (12 bullets covering both the
hosted-mode bugs caught by the live $5 buy + sell and the unrelated
fixes that landed on main since 2.48.6 — #871 #870 #873 #874 #875 #876
#877 #879 #663 #872 + the three this branch adds), Docs (2 bullets).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment