fix(experiments): apply maturity filter to retention metrics#58970
Conversation
|
🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down. Add the Most PRs don't need this. Real regressions still get caught on master and fix-forward. |
|
Reviews (1): Last reviewed commit: "fix(experiments): apply maturity filter ..." | Re-trigger Greptile |
|
Size Change: -5.51 kB (0%) Total Size: 118 MB 📦 View Changed
ℹ️ View Unchanged
|
andehen
left a comment
There was a problem hiding this comment.
Nice 👍 Simple change.
But, maturity is now counted from first exposure, not from the start event. So consider this example with a 7 day retention window:
- Day 1: user is exposed
- Day 20: user does the start event
- Day 21: experiment analysis runs
The user was marked mature on day 8 (exposure + 7d retention window), so they're included in the analysis. But the retention window from their start event is only 1 day in. We count them as "did not retain" when really they've barely had a chance.
So ideally we should count this from the start_event I think. I would assume that is what most users expect?
Fixing that is a larger change, but I think we should consider that in a follow-up PR. Would at least be good to point this out in the doc-string for future readers.
|
Hmm good point @andehen. Thanks for unblocking - I'll do this properly in a follow up. |
…on-maturity-filter # Conflicts: # products/replay_vision/frontend/generated/api.schemas.ts # services/mcp/src/api/generated.ts
Problem
The "Require completed conversion window" toggle does nothing for retention metrics. The feature only checks the
conversion_windowfield, but retention metrics store their time window inretention_window. So when you run a day-7 retention experiment, the denominator gets diluted by everyone who hasn't been around long enough to reach day 7.Changes
retention_window_endfor retention metrics, so the toggle works whether or not a conversion window is also set.How did you test this code?
Added
test_only_count_matured_users_without_conversion_windowcovering both the direct and precomputed exposure paths. All existing maturity tests across funnel, mean, ratio, and retention still pass.Publish to changelog?
no