feat(experiments): support configurable baseline variants - #37
Open
lordspline wants to merge 1 commit into
Open
Conversation
🦔 Hogbox preview · ❌ build failedThe preview didn't come up for commit Previews are optional and never block merging. A failure here is often a hogland or tailnet hiccup rather than anything in your PR, so the check stays green and this comment is the status. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Experiment creators cannot choose which variant acts as the statistical baseline, so every comparison assumes a variant keyed
control.This blocks exact-case variant keys and experiments whose natural baseline has another name.
Closes PostHog#30796
Changes
stats_configwithout normalizing its case.controlwhen present, then fall back to their first configured variant.Create an experiment with
ChallengerselectedResults with
Challengeras the baselineResults after switching the baseline to
ControlHow did you test this code?
Control,TreatmentA, andChallengervariants in the local app.Challengercomparison values in the results UI.Controland verified recalculated+40%and-40%deltas with baseline-first ordering.👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Automatic notifications
Docs update
No matching product guide lives in this repository. The UI copy and generated API and MCP schemas document the setting and fallback.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
/improving-drf-endpoints,/adopting-generated-api-types,/writing-ui-components,/writing-tests,/writing-user-facing-copy,/writing-code-comments,/implementing-mcp-tools, and/writing-pr-descriptions.stats_configpersistence to preserve compatibility and materialized inferred baselines before variant order can change.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.