fix(predict): preserve game market outcomes in staleness filtering cp-7.79.0#30699
Conversation
Skip stale-price outcome filtering and ranking penalties for game markets so draw-capable sports cards keep all moneyline outcomes visible in feeds.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|



Description
Fixes World Cup/sports game cards that could show only two outcomes for draw-capable moneyline games when one outcome had very low odds.
The shared market staleness filter removes outcomes priced at or below 5% or at or above 95%. That behavior is useful for multi-outcome non-game cards, but it breaks game cards that need the complete moneyline set. For example, Germany vs. Curacao has Germany, Draw, and Curacao outcomes, but Curacao can be priced below 5%. Once that outcome is filtered out, the card falls back to a binary path and the away-team button can open the
Notoken for the favorite instead of the underdog moneyline.This change skips stale-price outcome filtering and stale-price ranking penalties for game markets. Closed markets and ended games are still filtered out as before.
Changelog
CHANGELOG entry: Fixed a bug where sports game cards could hide low-probability outcomes and open the wrong prediction.
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/PRED-934?atlOrigin=eyJpIjoiZjVmNDJkY2I3NzBjNGQ4MjgwZWY5MjQ5ZjcyOTlkYWMiLCJwIjoiaiJ9
Manual testing steps
Screenshots/Recordings
Before
After
Testing
node .yarn/releases/yarn-4.14.1.cjs jest app/components/UI/Predict/utils/marketStaleness.test.tsPre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Scoped to Predict visibility/ranking utilities; closed and ended games remain hidden; non-game staleness behavior unchanged.
Overview
Game markets with a
gameattachment are now exempt from Predict’s stale-price outcome filtering (≤5% / ≥95%) and from staleness-based feed ranking penalties, matching the existing highlighted market behavior.getVisiblePredictMarketreturns the full market for open game markets after the usual closed/expired checks, so moneyline sets (e.g. home / draw / away) stay intact when an underdog is priced very low. Non-game cards still drop “dead” outcomes and can be deprioritized in the list.Tests cover full outcome preservation on game cards and unchanged ordering when a game market would otherwise be penalized.
Reviewed by Cursor Bugbot for commit 2ead89a. Bugbot is set up for automated code reviews on this repo. Configure here.