Skip to content

fix(core): address spec response drift batch#964

Open
realfishsam wants to merge 2 commits into
mainfrom
fix/easy-spec-response-drift-2
Open

fix(core): address spec response drift batch#964
realfishsam wants to merge 2 commits into
mainfrom
fix/easy-spec-response-drift-2

Conversation

@realfishsam
Copy link
Copy Markdown
Contributor

Summary

  • surface venue minimum order size/tick-size metadata for Polymarket US and Polymarket CLOB books
  • refresh small OpenAPI drift for Polymarket CLOB/Data, Kalshi, and Metaculus specs/generated specs
  • correct Hyperliquid allMids HIP-4 lookup keys and unwrap paginated Polymarket trade responses

Issues

Fixes #902
Fixes #901
Fixes #900
Fixes #895
Fixes #893
Fixes #892
Fixes #890
Fixes #887
Fixes #800

Test Plan

  • node YAML parse for touched spec files
  • npm run build --workspace=pmxt-core

@realfishsam
Copy link
Copy Markdown
Contributor Author

PR Review: FAIL

What This Does

Updates venue specs/normalizers for response drift and adds unified market/order-book metadata such as minimum order size and tick size.

Blast Radius

Polymarket specs/API clients/fetcher/normalizer, Polymarket US normalizer, Hyperliquid/Metaculus utils, core/src/types.ts, OpenAPI/docs.

Consumer Verification

Before (base branch):
Base did not expose these new drift fields (for example minOrderSize) in the unified core types. A full before/after sidecar comparison was not run because the PR fails tests.

After (PR branch):
PR adds UnifiedMarket.minOrderSize in core/src/types.ts, but SDK model propagation is incomplete: schema-drift tests report missing minOrderSize in the TypeScript SDK and min_order_size in the Python SDK.

Test Results

  • Build: PASS
  • Unit tests: FAIL (schema-drift: 2 failed, 642 passed, 3 skipped)
  • Server starts: NOT VERIFIED after failing tests
  • E2E smoke: FAIL (blocked by schema-drift failure)

Findings

  1. core/src/types.ts:92 adds UnifiedMarket.minOrderSize, but sdks/typescript/pmxt/models.ts:43 UnifiedMarket and sdks/python/pmxt/models.py:56 UnifiedMarket do not include the corresponding SDK fields. The repo’s schema-drift test fails with missing minOrderSize / min_order_size, which means SDK consumers would silently lose the new field even though core/OpenAPI expose it.

PMXT Pipeline Check

  • Field propagation (3-layer): ISSUE — core type field is not propagated to both SDK model layers
  • OpenAPI sync: OK for generated OpenAPI/docs touched in the PR
  • Financial precision: N/A
  • Type safety: ISSUE — schema-drift tests fail
  • Auth safety: N/A

Semver Impact

minor -- adds new response fields, but incomplete SDK propagation blocks merge.

Risk

No consumer-path verification was performed after the failing schema-drift tests; the main production risk is publishing a core field that SDK users cannot see.

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