Skip to content

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

Merged
VickyXAI merged 3 commits into
mainfrom
fix/retired-predexon-helpers
Aug 4, 2026
Merged

fix(pm): make the retired canonical-market helpers fail fast#40
VickyXAI merged 3 commits 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."

pm_markets / pm_listings / pm_outcome 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 docstrings still advertised them as live Tier 1 endpoints.

Kept as raising stubs rather than deleted. Removing a public method breaks from x import
and attribute access on upgrade, and this is a patch release. They now raise a new, exported
RetiredEndpointError naming the sunset date and pm("markets/search", q=...) as the
replacement — before any network I/O, on all four client surfaces (sync + async × HTTP +
Solana).

pm_sports_categories / pm_sports_markets keep working but gain a warning: 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 whenever it recovers.

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

451 unit tests pass, including 8 new ones pinning that the stubs raise 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."

pm_markets / pm_listings / pm_outcome have been shipping calls to 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 docstrings
still advertised them as live Tier 1 endpoints.

Kept as raising stubs rather than deleted: removing a public method breaks
`from x import` and attribute access on upgrade, and this is a patch release.
They now raise RetiredEndpointError (new, exported) with the sunset date and
`pm("markets/search", q=...)` as the replacement — before any network I/O, on
all four client surfaces (sync + async × HTTP + Solana).

pm_sports_categories / pm_sports_markets keep working but gain a warning: 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 whenever it recovers.
1bcMax added 2 commits August 4, 2026 15:38
Only repositions the RetiredEndpointError entries in the import block and
__all__ — ruff 0.16.0 (the pinned CI version) sorts these differently than the
newer ruff I had installed locally, which is why it passed here and failed there.
@VickyXAI
VickyXAI merged commit 21d8804 into main Aug 4, 2026
4 checks passed
@VickyXAI
VickyXAI deleted the fix/retired-predexon-helpers branch August 4, 2026 20:42
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