Skip to content

SDK drift: explicit false for withOrderbook/includeRawMatches is serialized on the wire in TypeScript but silently dropped in Python cluster queries #1702

Description

@realfishsam

Drift

TypeScript's appendQuery forwards any value that isn't undefined/null/'', so an explicit withOrderbook: false / includeRawMatches: false is sent on the wire as literal false. Python's fetch_matched_market_clusters/fetch_matched_event_clusters only ever add these keys when truthy, so an explicit False (identical to the parameter's own default) is indistinguishable from "not passed" and the key is never sent.

TypeScript SDK

sdks/typescript/pmxt/router.ts:122-126 (appendQuery) and its use in addClusterFilters at lines 153, 155.

Python SDK

sdks/python/pmxt/router.py:370-371, 373-374 (and the mirrored block at :425-429):

if with_orderbook:
    params["withOrderbook"] = True
if include_raw_matches:
    params["includeRawMatches"] = True

Expected

Both SDKs should send the same query keys for the same explicit parameter values — either both omit false/default values, or both always send the key when the caller passes it explicitly (which would require Python distinguishing "not passed" from "passed as False", e.g. via a sentinel default).

Impact

Narrow impact — only observable if the server's behavior for an omitted key differs from an explicit false value for the same key. Still a genuine, verifiable wire-format divergence between the two SDKs for these two cluster-query parameters.


Found by automated SDK cross-language drift audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions