fix(pm): make the retired canonical-market helpers fail fast - #21
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream probe (
api.predexon.comdirectly, 3 runs each, 2026-08-04):/v1/pm/markets,/v1/pm/markets/listingsand/v1/pm/outcomes/{id}all returnpmMarkets/pmListings/pmOutcomehave been calling them ever since. Payment was nevercharged — 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 andpm("markets/search", { q })as the replacement — before any network I/O.pmSportsCategories/pmSportsMarketskeep working but gain a note: everysports/*pathreturns a consistent upstream
500as of 2026-08-04. That is a partner bug, not a sunset, sothe helpers stay callable for when it recovers.
eslint gains the standard
argsIgnorePattern: "^_"so a deliberately unused parameter can keepthe 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.