Skip to content

fix(stations): 20-city Kalshi universe — drop 4 phantom cities, add NOLA/OKC/SATX#125

Open
helloiamvu wants to merge 1 commit into
mainfrom
fix/settlement-registry-20-cities
Open

fix(stations): 20-city Kalshi universe — drop 4 phantom cities, add NOLA/OKC/SATX#125
helloiamvu wants to merge 1 commit into
mainfrom
fix/settlement-registry-20-cities

Conversation

@helloiamvu

Copy link
Copy Markdown
Member

Summary

The KALSHI_SETTLEMENT_STATIONS registry drifted from the live exchange. Verified against the live Kalshi API on 2026-07-15 (GET /trade-api/v2/series?category=Climate and Weather + per-series settlement_sources):

  • Removed 4 phantom cities — DTW, CVG, BNA, SLC have no daily-temperature markets (every series probe returns 404: KXHIGHTDTW, KXHIGHDTW, KXHIGHTCVG, KXHIGHTBNA, KXHIGHTSLC, KXHIGHSLC). Their StationInfo records remain as bare weather stations (the Phase 23 precedent).
  • Added 3 real market cities the registry missed (series 200 with settlement_sources):
    • NOLAKMSY (KXHIGHTNOLA; CLI site=LIX&issuedby=MSY; NOT Lakefront KNEW)
    • OKCKOKC (KXHIGHTOKC; CLI site=OUN&issuedby=OKC)
    • SATXKSAT (KXHIGHTSATX; CLI site=EWX&issuedby=SAT; NOT Stinson KSSF)
  • KNOWN_WRONG_STATIONS gains KNEW + KSSF.

This is parity-critical: a backtest keyed to the phantom four settled against data no market resolves on.

Also in this change

  • _KALSHI_TICKER_ALIASES now covers the live KXHIGHT<CITY> / KXLOWT<CITY> series family (plus KXHIGHPHIL, KXHIGHNYD, KXHIGHTEMPDEN). Previously settles_for("kalshi:KXHIGHTATL-…") failed city-ticker resolution for every city except Las Vegas (whose TLV key is itself an artifact of this parsing).
  • Core catalog kalshi venue tags updated in lockstep (filter_by_venue("kalshi") == 20).
  • Satellite backfill roster: Kalshi∪Polymarket union 66 → 65, satellite roster 65 → 64; infra/batch.tf and run-weather-backfill.yml task math updated (note: the next full fleet run uses task_count = 64 × years).
  • Schemas + generated TS data modules re-exported via codegen.
  • Python + TS contract tests re-pinned to the 20-city universe, with new pinned tests for NOLA/OKC/SATX and a phantom-cities regression guard.

Test plan

  • pytest packages/core/tests packages/markets/tests packages/weather/tests — green (one pre-existing unrelated failure in tests/test_parity.py::test_dataset_is_research_alias reproduces on clean main).
  • TS: @mostlyrightmd/core 806 passed; @mostlyrightmd/markets 296 passed (after building core).
  • Downstream: unblocks the Kaggle dataset publish in kaggle-datasets (its build script imports this registry from PyPI — needs a release with this fix).

🤖 Generated with Claude Code

…om cities, adds NOLA/OKC/SATX

The v0.1.0 scope doc drifted from the live exchange (verified 2026-07-15
against GET /trade-api/v2/series?category=Climate and Weather + per-series
settlement_sources):

- DTW/CVG/BNA/SLC have no Kalshi daily-temperature markets (all series
  probes 404) — dropped from KALSHI_SETTLEMENT_STATIONS; their station
  records remain as bare weather stations (Phase 23 precedent).
- NOLA→KMSY (CLI issuedby=MSY, NOT Lakefront KNEW), OKC→KOKC, SATX→KSAT
  (NOT Stinson KSSF) are live markets the registry missed — added, with
  KNEW/KSSF added to KNOWN_WRONG_STATIONS.
- _KALSHI_TICKER_ALIASES now covers the live KXHIGHT<CITY>/KXLOWT<CITY>
  series family (plus KXHIGHPHIL/KXHIGHNYD/KXHIGHTEMPDEN), which
  previously failed city-ticker resolution for every city but Las Vegas.
- Core venue tags, satellite backfill roster (union 66→65, satellite
  roster 65→64, batch.tf/workflow task math), schemas, and generated TS
  data modules updated in lockstep; Python + TS contract tests re-pinned.

Python: core/markets/weather suites green (one pre-existing unrelated
failure in tests/test_parity.py reproduces on clean main). TS: core 806
passed, markets 296 passed after building core.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Docs-required check: PASS

API-surface change includes docs updates — no reminder needed.

API-surface files changed:

packages/core/src/mostlyright/_compose.py
packages/markets/src/mostlyright/markets/catalog/kalshi_stations.py
packages/weather/src/mostlyright/weather/satellite/_roster.py

Docs files changed:

CHANGELOG.md

@github-actions

Copy link
Copy Markdown

Parity ticket gate: PASSED

parity-ticket-check: PR touches BOTH Python and TypeScript trigger surfaces — paired-language change satisfies the gate.

See CROSS-SDK-SYNC.md §2 for the workflow.

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