Conversation
jaeopt
left a comment
There was a problem hiding this comment.
Looks good! A few suggestions to consider.
There was a problem hiding this comment.
| * @param {string} experimentId | |
| * @param {string} ruleId |
There was a problem hiding this comment.
| experimentId: string, | |
| ruleId: string, |
There was a problem hiding this comment.
| const variation = await this.fetchVariation(ruleId, userContext.getUserId(), filteredAttributes); | |
| const variation = await this.fetchDecision(ruleId, userContext.getUserId(), filteredAttributes); |
There was a problem hiding this comment.
What about user attributes not in projectConfig.attributes?
There was a problem hiding this comment.
We can start with cmab.attributes? We can avoid walk-through all the user attributes.
In this way, we can also create the fixed order of filtered attributes -
for aId in cmab.attributes {
aKey = project.atrributes[aId]
if aKey in UserContext {
filteredAttribute.add()
There was a problem hiding this comment.
Updated.
also added test for attribute order insensitivity.
There was a problem hiding this comment.
Can we sort by keys? Same set of attributes can be passed in different orders in UserContext?
Summary
Test plan
Issues