Skip to content

fix(pm): make the retired canonical-market helpers fail fast - #21

Merged
VickyXAI merged 1 commit into
mainfrom
fix/retired-predexon-helpers
Aug 4, 2026
Merged

fix(pm): make the retired canonical-market helpers fail fast#21
VickyXAI merged 1 commit into
mainfrom
fix/retired-predexon-helpers

Conversation

@VickyXAI

@VickyXAI VickyXAI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Upstream probe (api.predexon.com directly, 3 runs each, 2026-08-04):
/v1/pm/markets, /v1/pm/markets/listings and /v1/pm/outcomes/{id} all return

410 "This endpoint has been sunset as of 2026-07-20. Market matching is discontinued."

pmMarkets / pmListings / pmOutcome have been calling them ever since. Payment was never
charged — the gateway returns before settlement — but the caller pays a round trip to learn the
endpoint is gone, and the JSDoc still advertised them as live Tier 1 endpoints.

Kept as throwing stubs rather than deleted. Removing a public method breaks property access
on upgrade, and this is a patch release. They now throw a new, exported RetiredEndpointError
(extends BlockrunError, so existing catch blocks still catch it) naming the sunset date and
pm("markets/search", { q }) as the replacement — before any network I/O.

pmSportsCategories / pmSportsMarkets keep working but gain a note: every sports/* path
returns a consistent upstream 500 as of 2026-08-04. That is a partner bug, not a sunset, so
the helpers stay callable for when it recovers.

eslint gains the standard argsIgnorePattern: "^_" so a deliberately unused parameter can keep
the public signature intact without a disable comment.

Companion changes: BlockRunAI/blockrun#336 (gateway), BlockRunAI/blockrun-llm#40 (Python SDK),
BlockRunAI/awesome-blockrun#33 (docs).

241 tests pass, including 5 new ones pinning that the stubs throw rather than call.

Upstream probe (api.predexon.com direct, 3 runs each, 2026-08-04): /v1/pm/markets,
/v1/pm/markets/listings and /v1/pm/outcomes/{id} all return

    410 "This endpoint has been sunset as of 2026-07-20. Market matching is
        discontinued."

pmMarkets / pmListings / pmOutcome have been calling them ever since. Payment
was never charged — the gateway returns before settlement — but the caller pays
a round trip to learn the endpoint is gone, and the JSDoc still advertised them
as live Tier 1 endpoints.

Kept as throwing stubs rather than deleted: removing a public method breaks
property access on upgrade, and this is a patch release. They now throw
RetiredEndpointError (new, exported, extends BlockrunError so existing catch
blocks still catch it) naming the sunset date and `pm("markets/search", { q })`
as the replacement — before any network I/O.

pmSportsCategories / pmSportsMarkets keep working but gain a note: every
sports/* path is returning a consistent upstream 500 as of 2026-08-04. That is a
partner bug, not a sunset, so the helpers stay callable for when it recovers.

eslint gains the standard argsIgnorePattern: "^_" so a deliberately unused
parameter can keep the signature intact without a disable comment.
@VickyXAI
VickyXAI merged commit 481fd9b into main Aug 4, 2026
3 checks passed
@VickyXAI
VickyXAI deleted the fix/retired-predexon-helpers branch August 4, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant