release: v2.0.0#144
Conversation
Cuts the v2.0.0 release. Captures the full audit-driven hardening wave (30 audit findings closed across 5 parallel waves + cleanup) and the 3 deliberate breaking changes: Order.type rename, AccountApiLimits restructure, count/size/volume type retype. Changes: - CHANGELOG.md: finalize [Unreleased] → ## 2.0.0 — 2026-05-17 with a full release summary (Breaking, Added, Changed, Fixed, Security, Performance, Internal). - ROADMAP.md: rewrite around Shipped / Open trackers / Next milestone / Execution conventions. The wave-by-wave v1.2 plan is captured under Shipped as v2.0.0; CHANGELOG carries the detail. - README.md: document max_pages in the Pagination section, surface http2/limits/extra_headers in the KalshiConfig example. - docs/migration.md: new v1.x → v2.0 section at the top covering the 3 breaking changes + the non-breaking behavior shifts (unbounded *_all() by default, uniform extra="allow", WS callback fan-out). - pyproject.toml + kalshi/__init__.py: 1.1.0 → 2.0.0. - CLAUDE.md: active milestone → post-v2.0. - tests/integration/helpers.py: add wait_until_not_found inverse poller. - tests/integration/test_order_groups.py::test_delete: use wait_until_not_found so the demo's query-exchange propagation lag after DELETE doesn't make the test flap. - AGENTS.md: GitNexus stat refresh after Wave 5 + #142 + #143 merges. Verify: - uv run pytest tests/ --ignore=tests/integration -q → 1808 passed - uv run pytest tests/integration/ → 215 passed, 30 skipped - uv run ruff check . → clean - uv run mypy kalshi/ --strict → clean (76 source files) Closes #11 (release-cut milestone tracker). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code Review — v2.0.0 Release Cut (PR #144)This PR is a release packaging commit — it finalizes the v2.0.0 version bump, promotes CHANGELOG entries from OverviewThe diff touches:
What Looks GoodVersion bump is consistent. Both CHANGELOG is complete and well-structured. Breaking changes are at the top with before/after code snippets. Security, performance, and fixed sections are all present and reference issue numbers. This is the right format for a major release entry.
Migration guide is thorough. The three breaking changes each have a Python snippet showing the before/after. The ROADMAP collapse is appropriate. Replacing the exhaustive wave-by-wave plan with a short shipped summary + next-milestone candidates is the right post-release shape. The execution conventions section is kept, which is useful for future contributors. Security items are documented. URL leakage, trade-data log scrub, SHA-pinned CI actions, Issues and SuggestionsMinor: CHANGELOG intro paragraph is ambiguous about what shipped vs. what's in the PR. Minor: True, but both Minor: Non-issue observation: Verify: test count in CHANGELOG matches actual suite. Security Check
No security concerns. Test Coverage
VerdictReady to merge. The issues above are all documentation-level nits; none are blockers. The version bump is consistent, the CHANGELOG is complete, the migration guide covers all three breaking changes, and the one functional addition ( Tag |
The release commit replaced `with pytest.raises(KalshiNotFoundError):` in test_order_groups.py::test_delete with the new wait_until_not_found helper, but left the import behind. CI's ruff caught F401. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code Review — PR #144: release: v2.0.0This is a clean, well-organized release PR. Almost all of the diff is documentation; the only executable changes are a version bump and one integration-test helper addition. Comments below are organized by section. OverviewWhat this PR does: Promotes all audit-wave work already merged into
Code quality
def wait_until_not_found(
fetch: Callable[[], object],
*,
timeout: float = 15.0,
interval: float = 0.5,
) -> None:
The swap from an immediate DocumentationCHANGELOG.md
docs/migration.md
README.md
ROADMAP.md
Version consistencyBoth Potential issues / risks
SummaryApprove. The release PR is well-structured. Documentation is thorough and internally consistent. The only functional code addition ( The minor issues (logger placement, milestone label specificity) are polish-level and not release blockers. |
Summary
Cuts the v2.0.0 release. This packages the full audit-driven hardening wave (30 audit findings closed across 5 parallel waves + integration cleanup + #114 follow-up) plus the 3 deliberate breaking changes that drove the major version bump.
Release contents
See
CHANGELOG.mdfor the full list. Major beats:Breaking (3)
Order.type→Order.order_type(wire format unchanged viavalidation_alias).AccountApiLimits.read_limit/.write_limitremoved; replaced by.read/.writeof typeRateLimit. Newkalshi.RateLimitmodel exposed.DollarDecimal→FixedPointCount(runtime values stillDecimal).Added —
max_pageskwarg on every public*_all()method (sync + async, 38 signatures).KalshiConfig.http2+KalshiConfig.limits. 23 model re-exports.ConnectionManager.mark_streaming()public API.Changed —
*_all()is now truly unbounded by default (removed silent 1000-page cap). Uniformextra="allow"policy on every response model. WS callbacks no longer suppress queue delivery (fan-out + WARNING at register-time).Fixed —
/account/limits+/search/tags_by_categoriesnow parse against the live server. WS recv-loop: 5 reconnect races, narrowed exception ladder, sentinel-broadcast on backpressure / unexpected exception. WS seq-watermark rolls back on backpressure (no silent desync). Multi-ticker gap clears every ticker.Retry-Afterrejects negative/NaN/infinite and honorsRetry-After: 0. Single parse path on WS hot side (~0.9 µs + ~3 µs / msg saved).Security — Spec-sync supply-chain hardening (per-fingerprint drift issues, no auto-PRs, contents:read). URL leakage scrubbed from
KalshiError.__str__. Trade-data leakage scrubbed from WS dispatch log. Claude actions SHA-pinned + Dependabot + nightlypip-audit+ sigstore attestations + integration-nightly PEM shred. pytest bumped to clear CVE-2025-71176.Performance —
MessageQueue.qsize()O(n) → O(1). AWS Full Jitter REST backoff.RecordingTransportO(N²) → O(1) amortized.OrderbookManager.apply_deltaO(n) → O(1) via price-indexed dict.Test plan
uv run pytest tests/ --ignore=tests/integration -q→ 1808 passed, 52 warningsuv run pytest tests/integration/ --tb=no -q(against demo with secrets configured) → 215 passed, 30 skipped, 0 faileduv run ruff check .cleanuv run mypy kalshi/clean (strict, 76 source files)v2.0.0after merge — triggers PyPI release workflow with sigstore attestationsMigration
See
docs/migration.mdfor the focused v1.x → v2.0 guide.Closes #11