You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FIX] Dictionary↔model drift test for the FIX message set (analogous to REST TestRequestBodyDrift) #437
The REST SDK has hard-failing contract/drift tests (TestRequestParamDrift / TestRequestBodyDrift) that diff SDK models against the OpenAPI spec, parametrized over METHOD_ENDPOINT_MAP (per the "Drift tests hard-fail" convention in CLAUDE.md).
The FIX message layer (kalshi/fix/messages/*) has no analogous automated diff against the authoritative Kalshi FIX dictionary. Field tag/type/order faithfulness for the 8 message flows (session, order entry, drop copy, market data, order groups, RFQ, settlement) is currently guarded only by hand-written golden-wire + round-trip tests. A future dictionary revision (renamed tag, changed type) would silently pass until someone updates a test by hand.
Surfaced by the pre-PR adversarial review of #429 (settlement). Not a defect in any shipped flow — a coverage/infra gap for a money-bearing, hand-rolled codec.
Proposal
Check the Kalshi FIX dictionary XML into the repo (e.g. specs/kalshi-fix-dictionary.xml), mirroring specs/openapi.yaml.
Add a drift test that, for each registered FIX message model, diffs its declared fields (tag, FIX type, required-vs-optional) against the dictionary message/component definition — hard-failing on drift, with an EXCLUSIONS-style escape hatch (with reason) for the documented Kalshi-dialect deviations (e.g. NewOrderSingle omitting TransactTime, AllocAccount as INT, market-data messages absent from the stale v1.03 dictionary and derived from the docs instead).
Notes
The bundled dictionary is v1.03 and stale — it predates market data (V/W/X/Y/e/f and their fields are absent), so the MD models were derived from the docs. The drift test must account for this (either a newer dictionary or doc-derived exclusions for MD).
Activity
fix(fix): address #438 review — MarketResult names + settlement log/docs
fix(fix): address #438 review round 2 — settlement docs + test polish
feat(fix): market-settlement / post-trade reports (closes #429) (#438)
test(fix): dictionary<->model drift test for the FIX message set (closes
docs: FIX documentation + accuracy pass + release prep for 3.3.0 (#441)