fix(experimentation): keep variant assignment stable across rollout updates#7912
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
8451662 to
f05a0a8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7912 +/- ##
=======================================
Coverage 98.62% 98.62%
=======================================
Files 1488 1488
Lines 58543 58578 +35
=======================================
+ Hits 57737 57772 +35
Misses 806 806 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f05a0a8 to
aa1b95c
Compare
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression17 screenshots compared. See report for details. |
aa1b95c to
c5b1a63
Compare
…pdates Under v2 versioning, updating an experiment's rollout routed the segment override write through update_flag, which clones the override into a fresh feature state on every call. The multivariate split is salted on the feature state id, so each rollout update re-randomised the control/variant assignment for already-enrolled identities, contaminating exposure and conversion data. Once the rollout override exists, mutate it in place (preserving its id, and therefore the variant assignment) and rebuild the environment document by hand instead of publishing a new version. Creating the override, and v1 versioning, still go through update_flag, which already reuses the feature state.
c5b1a63 to
cae154b
Compare
Zaimwa9
left a comment
There was a problem hiding this comment.
Good as a temporary solution
docs/if required so people know about the feature.Changes
Under v2 versioning, updating an experiment's rollout went through
update_flag, which clones the segment override into a new feature state each time. The multivariate split is salted on the feature state id, so every update re-randomised control/variant for already-enrolled identities, corrupting the experiment data.Now, once the override exists, it's updated in place (id preserved → stable split) and the environment document is rebuilt directly. Creating the override, and all v1 versioning, still go through
update_flag.How did you test this code?
Added
test_apply_experiment_rollout__reapplied_under_v2__keeps_variant_assignment(fails onmain, passes here). Full experimentation + versioning unit suites andmake typecheckpass.