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
Two issues for Kalshi, the first is the UnifiedEvent description. For kalshi_event_1 the description is description='If {x}0, 2026, then the market resolves to Yes.' Rather than the correct "If {x} is the first member of the Cabinet of Donald Trump to leave or announce they will leave (such as by quitting, being fired, or being impeached) after Mar 10, 2026, then the market resolves to Yes." I assume this is because the underlying code is looking for a common suffix to the description. However a new option was added to the event with slightly different suffix: "If Markwayne Mullin is the first member of the Cabinet of Donald Trump to leave or announce they will leave (such as by quitting, being fired, or being impeached) after Mar 30, 2026, then the market resolves to Yes."
Second is the label in MarketOutcome. In kalshi_event_1 the label is working as intended, however in kalshi_event_2 the label is label=':: Democratic' or label='Not :: Democratic'.
Fixed in 2.27.6 via #75 (plus follow-up hardening commits on the same branch).
UnifiedEvent.description no longer malforms when markets in the same event have slightly different trailing dates — replaced the prefix/suffix slicing with template-voting over rules_primary with the candidate name substituted for {x}.
MarketOutcome.label no longer surfaces structural :: Democratic values — label derivation now prefers yes_sub_title and ignores any value starting with ::.
Additional hardening: only templates containing {x} are eligible to win the vote (so an untemplatable rule can never leak a candidate name into the event description), and Unicode-aware word boundaries so non-ASCII candidate names template correctly. Regression tests cover both original cases plus no-majority and non-ASCII edge cases.
Merged to main as e3f7736. Will ship in the next npm/PyPI release.
Activity
0xharryriddle commentedon Apr 7, 2026
Just opened PR #75 to solve this problem. Hope to review sir, @realfishsam
realfishsam commentedon Apr 9, 2026
Fixed in 2.27.6 via #75 (plus follow-up hardening commits on the same branch).
UnifiedEvent.descriptionno longer malforms when markets in the same event have slightly different trailing dates — replaced the prefix/suffix slicing with template-voting overrules_primarywith the candidate name substituted for{x}.MarketOutcome.labelno longer surfaces structural:: Democraticvalues — label derivation now prefersyes_sub_titleand ignores any value starting with::.Additional hardening: only templates containing
{x}are eligible to win the vote (so an untemplatable rule can never leak a candidate name into the event description), and Unicode-aware word boundaries so non-ASCII candidate names template correctly. Regression tests cover both original cases plus no-majority and non-ASCII edge cases.Merged to main as e3f7736. Will ship in the next npm/PyPI release.