-
-
Notifications
You must be signed in to change notification settings - Fork 225
Conversation
realfishsam
commented
Jun 21, 2026
Validation update:
- Targeted local checks pass:
npm test --workspace=pmxt-core -- --runTestsByPath test/normalizers/exchange-normalizers.test.ts test/normalizers/exchange-normalizers-2.test.ts(300 passed)npm run build --workspace=pmxt-core
- The PR is mergeable and scoped to numeric response field typing/regression tests for Response drift: polymarket — markets[].liquidity and .volume are strings; passed through without numeric conversion #1211 , Response drift: limitless — data[].volume and .volumeFormatted are strings; passed through without numeric conversion #1212 , and Response drift: probable — markets[].volume24hr and .liquidity are strings; passed through without numeric conversion #1213 .
- GitHub generated-sync checks are currently red on unrelated pre-existing generated drift: API reference/sourceExchange docs, COMPLIANCE Hunch section, hosted client-method preservation, and missing Hunch SDK/OpenAPI exchange surfacing. I did not fold that broad unrelated generator drift into this focused response-drift PR.
realfishsam
commented
Jun 21, 2026
PR Review: PASS (NOT VERIFIED)
What This Does
Updates the core raw venue TypeScript models so live numeric fields that arrive as strings from Limitless and Probable are typed as number | string. This matters to SDK consumers because the existing normalizers already coerce those fields to numeric unified volume / liquidity values, and the raw types now match the venue payloads instead of forcing casts.
Blast Radius
Core exchange raw types for Limitless and Probable plus normalizer regression tests. No OpenAPI schema, SDK shim, auth, router, or generated SDK files are changed.
Consumer Verification
Before (base branch):
Static contract only: the old raw interfaces modeled LimitlessRawMarket.volumeFormatted, LimitlessRawMarket.volume, ProbableRawMarket.volume24hr, ProbableRawMarket.volume, and ProbableRawMarket.liquidity as number only, even though the PR fixtures describe live venue responses where those fields can be strings. I did not run a live consumer API before/after because this PR changes TypeScript source typing/test coverage, not runtime normalization logic.
After (PR branch):
Static contract now accepts the observed response drift:
// core/src/exchanges/limitless/fetcher.ts volumeFormatted?: number | string; volume?: number | string; // core/src/exchanges/probable/fetcher.ts volume24hr?: number | string; volume?: number | string; liquidity?: number | string;
Focused normalizer tests confirm string numeric fixtures still normalize to number-valued unified fields.
Test Results
- Build: PASS (
npm run build --workspace=pmxt-core) - Unit tests: PASS (300 passed, 0 failed:
test/normalizers/exchange-normalizers.test.ts,test/normalizers/exchange-normalizers-2.test.ts) - Server starts: PASS (
GET /healthsucceeded on local sidecar) - E2E smoke: NOT VERIFIED (no live venue/API consumer delta; runtime code path is unchanged)
Findings
No blocking findings.
PMXT Pipeline Check
- Field propagation (3-layer): N/A — no unified field or schema change; raw input typing only
- OpenAPI sync: N/A
- Financial precision: OK — no new arithmetic; existing normalizer coercion is covered by tests
- Type safety: OK — raw interfaces now match observed string-or-number venue payloads
- Auth safety: N/A
Semver Impact
patch -- type accuracy/regression coverage for existing normalized fields, with no public response-shape change.
Risk
Live venue verification was not performed, so this review verifies the static type contract and normalizer behavior rather than a live Limitless/Probable sidecar response.
Summary
volume/volumeFormattedpayload fields asnumber | stringvolume24hr/volume/liquiditypayload fields asnumber | stringFixes #1211
Fixes #1212
Fixes #1213
Test Plan
npm test --workspace=pmxt-core -- --runTestsByPath test/normalizers/exchange-normalizers.test.ts test/normalizers/exchange-normalizers-2.test.ts(300 passed)npm run build --workspace=pmxt-core