Skip to content

Router match lookup mode (getMarketMatches/getEventMatches) silently drops query and category even though both SDKs send them #2201

Description

@realfishsam

Gap

FetchMarketMatchesParams.query ("Keyword search across matched market titles") and .category ("Filter matches by category") carry no browse-only caveat in core's type docs — unlike sibling fields minDifference/sort, which are explicitly annotated "Browse mode only." Both SDKs expose query/category on fetchMarketMatches and fetchEventMatches and send them unconditionally. But once an identifier (marketId/slug/url/eventId) is present, core routes to getMarketMatches/getEventMatches (lookup mode), which build the outbound query string from only relation, minConfidence, limit, includePricesquery and category are dropped on the floor. This is distinct from already-filed issue #1962 (browse-mode minDifference/sort/includePrices drops in browseMarketMatches/browseEventMatches) — this finding is about lookup mode dropping different fields.

Core

core/src/router/client.ts:59-71 (getMarketMatches) and :73-85 (getEventMatches) — the outbound query object is built at lines 63–67 and 77–81 from relation, minConfidence, limit, includePrices only; params.query/params.category are never read. Contrast browseMarketMatches at client.ts:87-94, which does forward params.query and params.category.

Param docs (no browse-only caveat on query/category): core/src/router/types.ts:88-107.

TypeScript SDK

Sends them regardless of mode — sdks/typescript/pmxt/router.ts:268-269 (if (params.query) query.query = params.query; if (params.category) query.category = params.category;) and :356-357 for events.

Python SDK

Sends them regardless of mode — sdks/python/pmxt/router.py:194-198 and :289-292.

Evidence

core/src/router/client.ts:59-85getMarketMatches/getEventMatches build their query strings from a fixed field list that excludes query/category, in contrast to browseMarketMatches (client.ts:87-94), which explicitly includes both.

Impact

"Find matches for market X, but only in category Y" or "…whose title mentions Z" is accepted by both SDKs' typed signatures and silently returns unfiltered results whenever an identifier (marketId/slug/url/eventId) is also supplied — a behavior a caller has no way to detect short of reading core's source.


Found by automated Core-to-SDK surface coverage audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions