Hey, I was looking into the experiment `source` va...
# give-feedback
p
Hey, I was looking into the experiment
source
value and found that experiments forced using a query parameter are evaluated here and returned with an
experiment
source here, which is somewhat unexpected. The same happens with variations forced through the browser extension here. Is this the intended behavior?
r
Hi! Thanks for the message. Can you say a bit more about what's unexpected?
p
The resulting source is one of the following based on the code:
Copy code
export type FeatureResultSource =
  | "unknownFeature"
  | "defaultValue"
  | "force"
  | "override"
  | "experiment"
  | "prerequisite"
  | "cyclicPrerequisite";
Without looking at the implementation, I would've expected query parameters or overrides through the extension to result in `force`/`override` values
s
I'm looking at the code and see different return methods. The type you shared accompanies the
source
param on the
getFeaturedResult
method. But there's also the
getResult
method. When using the SDK have you found that it returns unexpected results?
p
getFeaturedResult
returns the value defined in the code. However, I found it unexpected that forcing a value through a query string does not result in an
override
or
force
but on an
experiment
source value. Should we change this on
getFeaturedResult
? What about including the source for the experiment variant here? I could open a PR with the required changes if you think we should implement one.
r
A PR is welcome! It'll give the engineering team the ability to review the matter in more detail.