fix(spec-drift): reconcile OpenAPI 3.25.0 nightly contract failures (#475)#476
Merged
Conversation
…475) Pin vendored specs to upstream 3.25.0 and absorb the two required-side nightly failures: MarginMarket.schedule (plus nested MarginMarketSchedule) and the core POST /portfolio/intra_exchange_instance_transfer endpoint map entry (unimplemented — currently not available; live on PerpsClient). Closes #475
Review: fix(spec-drift) — reconcile OpenAPI 3.25.0 (#475)Reviewed the diff ( OverviewSmall, well-scoped drift fix with two independent changes:
Correctness
Test coverage
Style/conventions
Risk / blast radius
Nit
Overall: solid, surgical fix that matches CLAUDE.md's spec-first conventions. No blocking issues found. |
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.
Summary
Reconciles the SDK to upstream OpenAPI 3.25.0 so the nightly strict contract suite goes green again. Closes #475.
Two hard failures from the scheduled
Spec Drift Detectionrun:MarginMarket.schedule(perps) — new required field referencing nestedMarginMarketSchedule(is_open,next_close_ts,next_open_ts). The schedule object is null for 24/7 markets; when present the open/close timestamps are Unix epoch seconds and themselves nullable by phase.POST /portfolio/intra_exchange_instance_transfer(core) — newly listed on the core OpenAPI, marked currently not available. Already implemented onPerpsClient.transfers.transfer_instance(same path/schema). Recorded in_UNIMPLEMENTED_ENDPOINTSrather than dual-shipping a disabled core surface.Changes
openapi.yaml3.24.0 → 3.25.0, plus asyncapi / perps / perps_scm refreshesMarginMarketSchedulemodel; requiredschedule: MarginMarketSchedule | NoneonMarginMarketPERPS_CONTRACT_MAP_UNIMPLEMENTED_ENDPOINTSwith reasonNon-goals
KalshiClientimplementation of the intra-exchange transfer (endpoint disabled upstream; available on the perps client). Follow-up when Kalshi enables it.omitted_subtrader_countleft as-is (non-blocking).Test plan
uv run pytest tests/test_contracts.py— 666 passeduv run pytest tests/perps/— 507 passeduv run mypy kalshi/— cleanuv run ruff checkon touched files — clean