posthog
posthog copied to clipboard
Cohorts incorrectly matching on all users when conditions were set up using properties with mismatched types
Bug description
See this thread for details and more context: https://posthog.slack.com/archives/C034XD440RK/p1719258942611049
Tim was able to fix this issue for the user, but it's hard to say how widespread this is, and it's very scary that we're not evaluating flags correctly in this situation.
Fixing this issue will require:
- figuring out why this type mismatch situation is causing the feature flag to evaluate to true in the event that we have this type mismatch
- fixing the issue
How to reproduce
- create a new cohort
- pick a string type property and have it match on some numbers
- switch the property to a numeric property
- notice that your cohort now matches everyone, instead of just people that match that condition