Ship winning variant: blanket rollout overrides existing release conditions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Feature request
Problem
When you end an experiment and ship the winning variant, we add a catch-all release condition (no properties, 100% rollout) at the top of the feature flag and set the variant distribution to 100/0. The catch-all condition matches all users, which silently overrides any existing targeting - scoped audiences (e.g., new users only), variant overrides, or partial rollouts are all ignored.
Two valid rollout behaviors
- Roll out to everyone - change variant distribution to 100/0 and add a catch-all condition so all users get the winning variant, not just the experiment audience. This is what we do today.
- Roll out to existing audience only - change variant distribution to 100/0 without touching release conditions. Users who matched before still match; users who didn't still don't.
Today we always do (1), which is wrong when the customer intentionally scoped their release conditions.
Proposed fix
Let the user choose between the two behaviors when shipping a variant. Default to (2) since it's the safer option - it preserves existing targeting. Customers who want full rollout can opt into (1) or manually update the flag.
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named; begin by locating the ship-winning-variant flow and the code that updates release conditions. Done means offering a choice between preserving existing targeting and adding a catch-all condition, with preservation as the default, while setting the winning variant to 100%.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100