Allow cached assignment to override exclusion logic
from gitlab-org/growth/team-tasks#905 (comment 2690357931)
When an experiment is segmented into control that assignment sticks for the entire session.
Candidate segmentations conversely can be excluded at any future experiment block via the
excludemethod. While sometimes this is useful I think that many/most of our experiment flows could be greatly simplified if we could configure candidate to also be sticky.This would let us avoid the nuanced logic that is required to create stable exclude logic when the criteria we are checking is actively being built up during the user flow, like in registration cases.
Currently the logic flow in https://gitlab.com/gitlab-org/ruby/gems/gitlab-experiment#how-it-works makes me think that GLEX should already be honoring the sticky concept.
i.e. If we go through an experiment block and get assigned candidate and then we go through the next experiment block and qualify for exclusion, we should still use the cached value of candidate.
Need to dig into this if it is not the case.